gephi_keeper

DESCRIPTION:

gephi_keeper is a Ruby conversion gem that links YourTwapperKeeper (your.twapperkeeper.com/) to Gephi (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.

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:

Recipe used for the 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

Example Gephi files:

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

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

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

LICENSE:

(The MIT License)

Copyright © 2011 Commander Johnson <[email protected]>

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.