summaryrefslogtreecommitdiff
path: root/js/preprocess.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/preprocess.js')
-rw-r--r--js/preprocess.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/preprocess.js b/js/preprocess.js
index d65c7db..65d27c3 100644
--- a/js/preprocess.js
+++ b/js/preprocess.js
@@ -11,7 +11,7 @@ function filterEdges(data, ratelimit_max) {
var users = {};
//data.nodes.length = 10000;
data.nodes.forEach(function (user, i) {
- users[user.group] = user;
+ users[user.userid] = user;
});
var ratelimit_count = 0;
@@ -70,12 +70,12 @@ function preprocess(data, options) {
var hasRelated = {};
data.nodes = data.nodes.filter(function (d) {
/* Uncomment if it seems to be useful.
- if (!(d.group in hasRelations) && d.tweetCount >= 100) {
+ if (!(d.userid in hasRelations) && d.tweetCount >= 100) {
console.log('Keeping lonely user with', d.tweetCount, 'tweets');
return true;
}
*/
- return d.group in hasRelations;
+ return d.userid in hasRelations;
});
console.log('Nodes count (after dropping loners):', data.nodes.length);
}
@@ -83,7 +83,7 @@ function preprocess(data, options) {
// prepare data for force layout: map user IDs to indices
var userIds_indices = {};
data.nodes.forEach(function (user, i) {
- userIds_indices[user.group] = i;
+ userIds_indices[user.userid] = i;
});
console.log('UserID to index map:', userIds_indices);