Giter Site home page Giter Site logo

ngraph's Introduction

ngraph

Ngraph is a set of graph related algorithms. It can be used in a browser or on the server side. This repository is a collection of examples, which show how to use some of them or build your own.

What is available?

Currently this library is work in progress. I will add demos as quickly as I can.

Serialization

  • Dot files serializer from/to
  • (Gephi) gexf file - Source; Demo
  • Binary format - space-efficient format for large graphs. E.g. 5 million edges, 1 million nodes requires only 23 MB of space.

Offline layout

Sometimes doing layout in the browser is not feasible (e.g. the graph is too large to achive decent performance). In that case we can compute layout offline and provide static positions to the browser.

  • ngraph.offline.layout is an npm module to perform such layout. If this module is too slow, you can also try:
  • ngraph.native which is fully implemented in C++ and is 9x faster thant javsript version.

Interactive renderer

This is set of libraries that use ngraph modules to provide rendering in the browser:

  • VivaGraph, one of the fastest graph drawing libraries is now constructed from ngraph modules. It is an opinionated set of modules packed together.
  • ngraph.pixel - Fast 3D graph renderer based on low level ShaderMaterial from three.js

Clusters/Community Detection

  • ngraph.cw - fast community detection algorithm, based on label propagation
  • ngraph.louvain - another state of the art algorithm, uses modularity optimization.

Graph metrics

  • ngraph.pagerank - computes PageRank of a graph.
  • ngraph.hits - alternative to PageRank. Implements Hubs and authorities (HITS) algorithm

Other

There are plenty modules within ngraph family: this npm search shows most of them

Building your own modules

This repositry has multiple examples how to build your own module which suits your needs best:

Video

Here is an introduction video to this library: Browserify Monolith. This library has also appeared in TEDx talk at Stanford: The Beauty I See in Algebra by Margot Gerritsen

Why?

I built vivagraph to learn javascript two years ago. I definitely learned a lot and vivagraph itself is a pretty decent graph drawing library.

However vivagraph is built in monolithic way. For example, if I wanted to add new streaming traversal API I could not justify it inside monolithic "graph drawing" library.

Ngraph opens huge possibilities, with each module being available on npm. Now you can pick just what you need and swap out parts which are not relevant to your project.

I'm not abandoning vivagraph by any means. Quite the opposite, this repository is a next step of evolution.

How to run examples locally?

ngraph is powered by npm. All examples require a bundle.js file, which is produced by executing npm start command inside folder with example. Make sure you have all modules installed inside a folder (npm install inside folder with example will download all dependencies).

Looking for alternatives?

I'm trying to put up a list of all known graph drawing libraries. Please find it here

license

MIT

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.