Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cmdjohnson/gephi_keeper

gephi_keeper is a Ruby conversion gem that links YourTwapperKeeper (http://your.twapperkeeper.com/) to Gephi (http://www.gephi.org) by converting JSON output from YTK to Gephi's GEXF format.
https://github.com/cmdjohnson/gephi_keeper

Last synced: 3 months ago
JSON representation

gephi_keeper is a Ruby conversion gem that links YourTwapperKeeper (http://your.twapperkeeper.com/) to Gephi (http://www.gephi.org) by converting JSON output from YTK to Gephi's GEXF format.

Awesome Lists containing this project

README

        

= gephi_keeper

* http://github.com/cmdjohnson/gephi_keeper

== DESCRIPTION:

gephi_keeper is a Ruby conversion gem that links YourTwapperKeeper (http://your.twapperkeeper.com/) to Gephi (http://www.gephi.org) by converting JSON output from YTK to Gephi's GEXF format.

YourTwapperKeeper is a self-hosted service that archives tweets. Gephi is a graph visualization tool. YTK exports the archived tweets in a number of formats, one of which is JSON. The JSON files produced by YTK are converted by gephi_keeper into Gephi-readable GEXF files.

The GEXF files can then be processed by Gephi to produce colorful graph representations of Twitter output.

== FEATURES/PROBLEMS:

- Dynamic graphs: use the Gephi timeline to watch the network evolve over time.
- Attributes: Number of tweets per user, number of mentions per user.
- Node color is based on Twitter activity: a very active user is colored red whilst a not-so-active user is black.
- Node size is based on other Twitter users' activity: a user that is mentioned many times is larger than a user that is not.
- Parents: when user A mentions user B, user B becomes A's parent.
- Edges are plotted automatically between interacting users: when user A mentions user B, an edge is created.
- Edge weight is based on the activity from user A to user B. When user A mentions B many times, the edge weight in increased.

Please note that YourTwapperKeeper is limited to 10,000 tweets when exporting in the JSON format. In order to circumvent this limitation, the software should be extended to also support importing YTK's "Excel" format which is really nothing more than an ordinary HTML table. The "Excel" format is not limited to 10,000 tweets.

Gephi (version 0.8beta) scales edge weights. This is not really a problem but appears as a 'glitch' when walking through a population's timeline. Given a population with only two edges, one of weight 1 and one of weight 2, the latter edge will be rendered noticeably thicker than the former. This status quo is upheld as long as edges of weight 1 are added to the population. However, if another edge of weight higher than 2 is added, the edge of weight 2 will 'suddenly' appear thinner than it was previously since it is not the heaviest edge anymore.

== SYNOPSIS:

Input a file into gephi_keeper and pipe the output to a gzipped output file:

$ gephi_keeper -f input_file.json | gzip > output_file.gexf.gz

== REQUIREMENTS:

gephi_keeper needs these gems in order to run properly:
- json (for JSON input)
- options_checker
- builder (for XML output)

== INSTALL:

$ sudo gem install gephi_keeper

== EXAMPLES:

Screenshots:

https://github.com/cmdjohnson/gephi_keeper/raw/master/examples/screenshots/twitter_gephi_keeper_1.png

https://github.com/cmdjohnson/gephi_keeper/raw/master/examples/screenshots/twitter_gephi_keeper_2.png

Recipe used for these screenshots:
1. Import oracle.gexf
2. Layout: Fruchterman Reingold
3. Enable labels
4. Rank label size based on num_mentions, min_size = 0.5 and max_size = 3

Some more screenshots:

Same shot as no. 1, but with a different color ranking scheme (gradient) and different layout (Yifan Hu Multilevel)

https://github.com/cmdjohnson/gephi_keeper/raw/master/examples/screenshots/twitter_gephi_keeper_3.png

List of nodes

https://github.com/cmdjohnson/gephi_keeper/raw/master/examples/screenshots/twitter_gephi_keeper_4.png

Example Gephi files:

Hashtag #oracle (3,000 tweets) https://github.com/cmdjohnson/gephi_keeper/raw/master/examples/output/oracle.gexf.gz

Hashtag #java (5,000 tweets) https://github.com/cmdjohnson/gephi_keeper/raw/master/examples/output/java.gexf.gz

Hashtag #twitter (10,000 tweets) https://github.com/cmdjohnson/gephi_keeper/raw/master/examples/output/twitter.gexf.gz

== LICENSE:

(The MIT License)

Copyright (c) 2011 Commander Johnson

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.