项目作者: ndejong

项目描述 :
Generate a GraphML graph datafile representing the Keybase.io network based on an origin Keybase user id value.
高级语言: Python
项目地址: git://github.com/ndejong/keybase-network-graph.git
创建时间: 2019-01-06T10:43:12Z
项目社区:https://github.com/ndejong/keybase-network-graph

开源协议:

下载


Keybase Network Graph

Generate a GraphML graph datafile representing the Keybase.io
network based on an origin Keybase user id value.

Usage

Step 1: Determine the user id (uid) you wish to center the network graph data collection around. This is easily
achieved by visiting Keybase.io for the user, reviewing any element in the user chain and
finding the uid value from the JSON payload data shown.

Step 2: Run keybase-network-graph.py as per the example below, start small --depth=1 since the networks can
blow out very large very quickly. The tool is single threaded so it will take some time collecting all the required
data. Data is stored in the --path so no Keybase data should be requested more than once.

Step 3: Load the output GraphML file in Gephi (like Photoshop for graphs) - GraphML has the broadest set of
graph features supported in Gephi hence the data-format choice.

Step 4: Explore the data set…

Example

  1. $ ./keybase-network-graph.py --uid 3195b4ddeb6f4c4250ab2b5ff7c68b19 --depth 1
  2. processing:3195b4ddeb6f4c4250ab2b5ff7c68b19 depth:0 uid_total:1
  3. complete:3195b4ddeb6f4c4250ab2b5ff7c68b19 followers_added:17
  4. ...
  5. processing:96ef480ac888bdff3ecb2a8f6e368b00 depth:1 uid_total:326
  6. complete:96ef480ac888bdff3ecb2a8f6e368b00 followers_added:0
  7. GraphML file: /tmp/keybase-network-graph/3195b4ddeb6f4c4250ab2b5ff7c68b19.graphml

Command Line Arguments

  1. $ ./keybase-network-graph.py -h
  2. usage: keybase-network-graph.py [-h] --uid <uid> [--depth <depth>]
  3. [--path <path>] [--nograph]
  4. Keybase Network Grapher
  5. optional arguments:
  6. -h, --help show this help message and exit
  7. --uid <uid> Initial uid to start collecting data on, required.
  8. --depth <depth> Maximum depth of user connections to collect data on,
  9. default = 1
  10. --path <path> Maximum depth of user connections to collect data down to,
  11. default = /tmp/keybase-network-graph
  12. --nograph Prevent GraphML generation.

Gephi Hints

Learn to use the “Ego Filter”

An Ego Filter allows you to filter out the noise from a graph focusing in on just one node, this helps focus your
visualisations - article here on Ego Filters

Use the username label

The username label can be enabled using the icons at the bottom of the visualisation, the following Youtube video may
help - https://www.youtube.com/watch?v=eu1mibcOrN0

Other Gephi tutorials

The following Gephi tutorial is also quite helpful - https://www.youtube.com/watch?v=dSx5_PjaWVE

Issues with Gephi on Ubuntu

Ubuntu 18.04 (and 18.10) does not run Gephi out of the box due to an incompatible default version of Java. This can be
resolved by installing openjdk-8-jdk and updating the alternatives configuration as such

  1. sudo apt-get install openjdk-8-jdk
  2. sudo update-java-alternatives --list
  3. sudo update-alternatives --config javac
  4. sudo update-alternatives --config java

Gephi Visualization Samples of Keybase networks

screenshot_101043.png

screenshot_075321.png

screenshot_074349.png