From 0d2a9c9fd6c16ced9c684354690cc62dfd3d58f0 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Wed, 21 May 2014 15:11:13 +0200 Subject: Enable expensive check, but require at least 2 tweets per user --- bubble.js | 6 ++++-- preprocess.js | 7 +++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bubble.js b/bubble.js index d6868a3..c37426e 100644 --- a/bubble.js +++ b/bubble.js @@ -4,11 +4,11 @@ /* settings */ // whether to enable expensive features -var I_GOT_MONEY = 0; +var I_GOT_MONEY = 1; // whether to ignore lonely users var KILL_LONERS = true; // if positive, then users with fewer than this number of tweets will be ignored -var USER_MIN_TWEET_COUNT = 0; +var USER_MIN_TWEET_COUNT = 2; // if true, enable sticky nodes unless Ctrl is held. If false, stick only if // ctrl is held (the inverse). var STICKY_DEFAULT = true; @@ -399,6 +399,8 @@ X disabled edge positioning, 84 ticks, chromium 70 ticks in 31.3s, chromium (disabled title elements) [69,30.3] 73 ticks in 30.8s, chromium (title elements enabled) [68,30.4] 62 ticks in 30.2s, chromium (removed 2x 'g' elements) [60,31.8] + +55 ticks in 32.9s, chromium (with collision check) [54,30.4] */ } else { run(); 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); -- cgit v1.2.1