summaryrefslogtreecommitdiff
path: root/preprocess.js
diff options
context:
space:
mode:
Diffstat (limited to 'preprocess.js')
-rw-r--r--preprocess.js7
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);