GithubHelp home page GithubHelp logo

gzzgz / ggraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pcbje/ggraph

0.0 2.0 0.0 43 KB

Graph visualization of big messy data

Home Page: https://gransk.com/ggraph.html

License: Apache License 2.0

JavaScript 88.94% HTML 8.30% CSS 2.76%

ggraph's Introduction

ggraph - Graph visualization for messy data

Build Status Coverage Status

This is a library built on top D3 with the goal of improving how we work with large and messy graphs. It extends the notion of nodes and links with groups of nodes. This is useful when multiple nodes are in fact the same thing or belong to the same group.

Live demo: https://gransk.com/ggraph.html

Some examples of nodes that may belong together:

  • IPs in the same subnet
  • Emails / monikers
  • File fingerprints
  • Bitcoin addresses in same wallet
  • Alternative spellings and typos

Data model

The easiest apporach is to call ggraph.convert with a valid D3 object:

var graph = {
  nodes:[
    {id: "Maria West", type: "female"},
    {id: "Hazel Santiago", type: "male"},
    {id: "Sheldon Roy", type: "male"}    
  ],
  links: [
    {source: "Maria West", target: "Hazel Santiago", value:100},
    {source: "Maria West", target: "Sheldon Roy"}    
  ]
}

converted = ggraph.convert(graph);

Usage

Initialization:

ggraph.init('container', 25); // Marker timeout
ggraph.draw(converted);

Merge nodes into groups:

// Merge selected
ggraph.merge(selection.all());

// Into single group
ggraph.merge(['Maria West', 'Sheldon Roy']);

// Into several groups
ggraph.merge([
  ['A', 'B'],
  ['C', 'D']
]);

Split and remove:

ggraph.split(['Maria West', 'Sheldon Roy']);
ggraph.remove(['Maria West', 'Hazel Santiago']);

Building

git clone https://github.com/pcbje/ggraph && cd ggraph
npm install
node_modules/.bin/karma start tests/cover.conf.js
node_modules/.bin/karma start tests/watch.conf.js
node_modules/.bin/grunt min

Disclaimer

This is a work in progress. Contributions are very much welcome!

ggraph's People

Contributors

pcbje avatar

Watchers

James Cloos avatar Laplace_Monster avatar

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.