Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Irfan Nadiadi Learning Challenge 9 #19

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions 1a.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>D3</title>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.4.12/d3.min.js"></script>
<style type="text/css">
.chart rect {
fill: steelblue;
}

.chart text {
fill: white;
font: 10px sans-serif;
text-anchor: end;
}
</style>
</head>
<body>
<script type="text/javascript">
var w = 600;
var h = 600;
var barHeight = 10;
var xscale = d3.scale.linear().range([0, w]);

d3.json("https://api.github.com/orgs/csci-4830-002-2014/repos",
function(error, data) {
xscale.domain([0, d3.max(data, function(d) { return d.forks_count; })]);


dataset = data;


var svg = d3.select("body")
.append("svg")
.attr("class", "chart")
.attr("width", w)
.attr("height", h);
svg.attr("height", barHeight * data.length);

var bar = svg.selectAll("g")
.data(dataset)
.enter().append("g")
.attr("transform", function(d, i) { return "translate(0," + i * barHeight + ")"; });

bar.append("rect")
.attr("width", function(d) { return xscale(d.forks_count); })
.attr("height", barHeight - 1);

bar.append("text")
.attr("x", function(d) { return xscale(d.forks_count) - 3; })
.attr("y", barHeight / 2)
.attr("dy", ".35em")
.text(function(d) { return d.forks_count; });


});
</script>
</body>
</html>
92 changes: 46 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
# Name

write-your-name
Irfan Nadiadi

# How many points have you earned?

0/100
100/100

(Make your own calculation and replace the number 0 with the points you think you've earned.)

# How many hours have you spent on this?

fill-in-your-answer
4

# When did you first start working on this week's learning challenges?

fill-in-your-answer
Sunday Evening. Sorry, my Senior Design project has been getting the best of me.

# What is the most difficult part about this week's challenge?

fill-in-your-answer
Nothing in particular. Time committment, perhaps, though this challenge was certainly shorter than last weeks.

# Show and tell (8 points)

## Link (2 points)

[title-of-the-article](http://link-to-an-article-about-machine-learning-use-for-big-data)
[Spotify's Secret Weapon](http://www.thembj.org/2014/10/spotifys-secret-weapon/)

## Discuss how you may apply the machine learning technique mentioned in this article to another interesting problem (6 points).

fill-in-your-answer
This article describes Spotify's acquisition of The Echo Nest, a company that specializes in music intelligence. Their software combs massive amounts of data online, nearly anything pertaining to music, and uses the data to enhance its own ability at predicting music listening behaviors. Such predictions are very valuable for users, as they're going to be more satisfied when the software continues to find music that they're grooving to. Considering how much data is available online, it is interesting to see how valuable such novel data applications can really be. The Echo Nest makes it so that users no longer have to go searching for music they feel like listening to. Rather, the software predicts for them. This begs the question, are there other ways data can be used to enhance people's lives in ways that similar to this one?

# D3 IV

## Checkpoints (3 points x 4 = 12 points)

# 1. (3 points)

![image](image.png?raw=true)
![image](checkpoints/check1.png)

[checkpoint](checkpoint.html)
[checkpoint](check1.html)

# 2. (3 points)

![image](image.png?raw=true)
![image](checkpoints/check2.png)

[checkpoint](checkpoint.html)
[checkpoint](check2.html)

# 3. (3 points)

![image](image.png?raw=true)
![image](checkpoints/check3.png)

[checkpoint](checkpoint.html)
[checkpoint](check3.html)

# 4. (3 points)

![image](image.png?raw=true)
![image](checkpoints/check4.png)

[checkpoint](checkpoint.html)
[checkpoint](check4.html)

## Challenges (4 points x 3 = 12 points)

# 1. (4 points)

![image](image.png?raw=true)
![image](challenges/challenge1.png)

# 2. (4 points)

![image](image.png?raw=true)
![image](challenges/challenge2.png)

# 3. (4 points)

![image](image.png?raw=true)
![image](challenges/challenge3.png)

[challenge3](challenge3.html)

Expand All @@ -82,89 +82,89 @@ fill-in-your-answer

### 1 (6 points)

[mongodb js code collecting github events about our course](mongodb-github.js)
[mongodb js code collecting github events about our course](mongo/mongodb-github.js)

### 2 (6 points)

![terminal output of mongodb query](screenshot.png?raw=true)
![terminal output of mongodb query](mongo/checkpoints/check2.png)

## Challenge 1 (4 points x 10 = 40 points)

### 1 (4 points)

> db.course_events.[complete this query]
> db.course_events.findOne({'actor.login':'Irfann1'})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/1.png)

### 2 (4 points)

> db.course_events.[complete this query]
> db.course_events.findOne({'actor.login':'Irfann1'},{'actor':'1'})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/2.png)

### 3 (4 points)

> db.course_events.[complete this query]
> db.course_events.find({'actor.login' : { $in : ['doubleshow', 'chrisbopp']}}, {'actor.login':1, created_at:1})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/3.png)

### 4 (4 points)

> db.course_events.[complete this query]
> db.course_events.findOne({'type' : 'PushEvent'})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/4.png)

### 5 (4 points)

> db.course_events.[complete this query]
> db.course_events.find({'type' :'PushEvent'}, {'payload.commits.author.name':1})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/5.png?raw=true)

### 6 (4 points)

> db.course_events.[complete this query]
> db.course_events.findOne({'type' :'IssuesEvent'}, {'payload':1})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/6.png?raw=true)

### 7 (4 points)

> db.course_events.[complete this query]
> db.course_events.find({'type' :'IssuesEvent'}, {'payload.issue.user.login':1})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/7.png?raw=true)

### 8 (4 points)

> db.course_events.[complete this query]
> db.course_events.find({'type' :'IssuesEvent', 'payload.issue.state': 'closed'}, {'payload.issue.id':1, 'payload.issue.state':1})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/8.png?raw=true)

### 9 (4 points)

> db.course_events.[complete this query]
> db.course_events.find({'type' :'IssuesEvent', 'payload.issue.state': 'open'}, {'payload.issue.user.login':1, 'payload.issue.state':1})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/9.png?raw=true)

### 10 (4 points)

> db.course_events.[complete this query]
> db.course_events.find({'type' :'IssuesEvent', 'payload.issue.comments' : {$gt : 0}}, {'payload.issue.user.login':1, 'payload.issue.comments':1})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/10.png?raw=true)


## Challenge 2 (8 points x 2 = 16 points)

### 1 (8 points)

{question-in-plain-English}
What does a pull request look like?

> db.course_events.[complete this query]
> db.course_events.fineOne({'type':'PullRequestEvent' });

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/challenge\ 2a.png?raw=true)

### 2 (8 points)

{question-in-plain-English}
Who was the most recent person to create a pull request?

> db.course_events.[complete this query]
> db.course_events.find({'type':'PullRequestEvent','payload.action':'opened'},{'actor.login':1,'payload.pull_request.created_at':1}).sort({'payload.pull_request.created_at':-1})

![screenshot](screenshot.png?raw=true)
![screenshot](mongo/challenges/challenge\ 2b.png?raw=true)
Loading