A ruby script to generate a digraph for Twitter followers, with separate node points for common nodes. There are two scripts:
- Script 1
twitter_digraph.rbhandles at max 10 users and max 200 followers for each user. (You will need to wait for 45mins - 1hr for this to run successfully with one key. Minimum 4 keys are required for this program to run successfully in one go. It will take around 10 mins - decreases as the number of keys increases) - Script 2
twitter_small_digraph.rbhandles at max 8 users and max 25 followers for each user. (Faster to run and requires only one key)
ruby-2.1.4fortwitter_digraph.rbandruby-1.9.3fortwitter_small_digraph.rb- Two gems in both versions of ruby -
twitterandgchartrb(Rungem install gem_namefor both)
ruby twitter_digraph.rb Username1 Username2 .. Username10ruby twitter_small_digraph.rb Username1 Username2 ... Username 8
After the script runs succesfully, a dot file will be generated in the same directory. To generate the digraph, run the following commands:
circo graph.dot -Tpng -o graph.pngcirco graph_small.dot -Tpng -o graph_small.png
The .png files will contain the digraph between nodes containing screen names of each user. Red nodes denote common followers between any two users. You may change the color or style of common nodes by editing the corresponding dot files. (In this case graph.dot)