||7 years ago|
|extlib||7 years ago|
|out||7 years ago|
|README.md||7 years ago|
|graph.py||7 years ago|
Graph the Feds
This script crawls FOAF files from GNU social profiles and attempts to graph the connections between instances and users.
- Python 2 (tested with 2.7.10)
- tldextract (tested with 1.6)
- rdflib (tested with 4.2.0)
Give the script a profile to start crawling and it'll go on from there.
Optionally give it a maximum number of FOAF files to fetch and parse (defaults to 5).
python2 ./graph.py http://example.org/profile --max=5
To stop the script before it reached "max", press Ctrl+C.
The script should terminate gracefully and generate a .gexf file with the data it had time to collect.
Once the data collection is done, run the following to convert the data to json:
python2 ./extlib/InteractiveVis/server/gexf2Json.py out/graph.gexf out/data.json
To see the graph, open ./out/index.html in your browser.
You can find an example of the results here: http://sandbox.chromic.org/graph/out/index.html
The script fetched approximately 55 FOAFs to generate that graph.
This is a work-in-progress. I don't know python that well. Pull-requests welcome!