Giter Club home page Giter Club logo

bigma's Introduction

bigma

Spatialize huge graphs in CLI with graphology then explore them on the web with Sigma.js.

Install:

git clone https://github.com/medialab/bigma
cd bigma
npm install

Spatialize a graph:

The script requires an edges CSV structured as Souce,Target,Weight.

# Run NB_FA2_ITERATIONS iterations with ForceAtlas2 and render PNG snapshots every NB_ITERATIONS_BETWEEN_MINIATURE_PNG_SNAPSHOTS:
node spatialize-network.js <EDGELIST_AS_SOURCE-TARGET-WEIGHT.CSV> <NB_FA2_ITERATIONS> <NB_ITERATIONS_BETWEEN_MINIATURE_PNG_SNAPSHOTS>

# The script can restart new iterations after a full run or a run interrupted by CTRL+C, using the positions CSV file dumped by the previous run (which should be named such as "ORIGINALFILE.CSV_positions_after_N_FA2Iterations.csv"):
node spatialize-network.js <ORIGINALFILE.CSV_positions_after_N_FA2Iterations.csv> <NB_EXTRA_FA2_ITERATIONS> <NB_ITERATIONS_BETWEEN_MINIATURE_PNG_SNAPSHOTS>

# Graphs are plotted by default with an identical size for all nodes, you can add an extra argument to use the nodes degrees as size:
node spatialize-network.js <EDGELIST_AS_SOURCE-TARGET-WEIGHT.CSV> <NB_FA2_ITERATIONS> <NB_ITERATIONS_BETWEEN_MINIATURE_PNG_SNAPSHOTS> 1

If you have ImageMagick's convert tool installed, you can visualize the spatialization evolution as a gif by running:

./build_gif.sh <ORIGINAL_EDGELIST.CSV>

Visualize the output on the web:

npm start

Then visit http://localhost:3000/.

First load in the top-right box the positions CSV produced by the script, then the original edges file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.