book

Report

As a class, we brainstormed and came up with a long list of further questions we can ask based on the "self-introduction" data. Out of these questions, our team chose to tackle on the following:

(who changed their comment?)

return _.pluck(_.pluck(_.filter(data.comments, function(n){
return (n.created_at != n.updated_at)}), 'user'),'login')

Their names are

[
 "KevinKGifford",
 "kjblakemore"
]
.

Who has the oldest account?

return _.pluck(_.sortBy(data.comments, function(comment){
	return comment.user.id;
}), 'user.login');

[
 "willzfarmer",
 "jocr1627",
 "co-bri",
 "AndreyShprengel",
 "zhya215",
 "fadhilfath",
 "94kazakov",
 "SankethSukumarShetty",
 "satchelspencer",
 "karisantos",
 "drewdinger",
 "boanding",
 "hswitte",
 "ZachLamb",
 "kjblakemore",
 "calebhsu",
 "twagar95",
 "Malaokia",
 "anbe6083",
 "Linenfelser",
 "DomoYeti",
 "nicolele",
 "pail4944",
 "tiro6090",
 "KevinKGifford",
 "sumi6109"
]

Who wrote the most for thier comment

return _.pluck(_.sortBy(data.comments, function(comment){
		return _.size(comment.body.split(""));
		}).reverse(), 'user.login');

[
 "Linenfelser",
 "nicolele",
 "94kazakov",
 "pail4944",
 "karisantos",
 "sumi6109",
 "willzfarmer",
 "KevinKGifford",
 "zhya215",
 "boanding",
 "calebhsu",
 "satchelspencer",
 "co-bri",
 "DomoYeti",
 "hswitte",
 "kjblakemore",
 "twagar95",
 "jocr1627",
 "SankethSukumarShetty",
 "tiro6090",
 "ZachLamb",
 "AndreyShprengel",
 "drewdinger",
 "fadhilfath",
 "Malaokia",
 "anbe6083"
]

When did people post comments?

var counts = _.groupBy(_.map(_.pluck(data.comments, 'created_at'), function(r) {
    return parseInt(r.slice(9, 10));
}), function(i) {
    return i;
});
var vals = [];
for (i = 0; i < 8; i++) {
    try {
        vals.push(counts[i].length);
    } catch(err) {
        vals.push(0);
    }
}
return vals;

1,2,0,2,16,2,3,0

We can visualize this...