diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-05-21 15:11:13 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-05-21 15:11:13 +0200 |
commit | 0d2a9c9fd6c16ced9c684354690cc62dfd3d58f0 (patch) | |
tree | 4d2100cf09f83050c281fb110ef79abf7e916058 /preprocess.js | |
parent | 4dcd08342068f22fbdf76b606fdae759a0a50f4b (diff) | |
download | d3viz-0d2a9c9fd6c16ced9c684354690cc62dfd3d58f0.tar.gz |
Enable expensive check, but require at least 2 tweets per user
Diffstat (limited to 'preprocess.js')
-rw-r--r-- | preprocess.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/preprocess.js b/preprocess.js index 7de2717..d65c7db 100644 --- a/preprocess.js +++ b/preprocess.js @@ -9,6 +9,7 @@ function filterEdges(data, ratelimit_max) { // map userID to nodes var users = {}; + //data.nodes.length = 10000; data.nodes.forEach(function (user, i) { users[user.group] = user; }); @@ -68,6 +69,12 @@ function preprocess(data, options) { if (options.kill_loners) { var hasRelated = {}; data.nodes = data.nodes.filter(function (d) { + /* Uncomment if it seems to be useful. + if (!(d.group in hasRelations) && d.tweetCount >= 100) { + console.log('Keeping lonely user with', d.tweetCount, 'tweets'); + return true; + } + */ return d.group in hasRelations; }); console.log('Nodes count (after dropping loners):', data.nodes.length); |