1.0.0 • Published 2 years ago

ngraph.gexf v1.0.0

Weekly downloads
16
License
MIT
Repository
github
Last release
2 years ago

ngraph.gexf

Gephi gexf file parser for server and browser. This library is a part of ngraph project. See demo here: Talking with Gephi

build status

usage

This library allows you to load gexf files into ngraph.graph.

var fs = require('fs');
var gexf = require('ngraph.gexf');
var graph = gexf.load(fs.readFileSync('myfile.gexf', 'utf8'));
// graph is now normal grpah and can be used by ngraph modules

You can also store graph into gexf file format:

var gexf = require('ngraph.gexf');

var binTree = require('ngraph.generators').balancedBinTree(5);
var gexfFileContent = gexf.save(binTree);

Details

This library supports node.js and browser runtime (via browserify). When used from node.js it uses libxmljs library for quick parsing of xml files. When used in a browser it uses browser's capabilities to read and query xml files.

Because of this, library size is really small when served in the browser:

  • 24kb - unminified
  • 13kb - minified
  • 4kb - gzipped

Current implementation is really basic and does not support some of the gexf features:

Adding Hierarchy and Phylogeny is relatively easy and they will be implemented if such need arise. Dynamics - requires to think a little bit to better represent graph's timeline.

install

With npm do:

npm install ngraph.gexf

license

MIT

1.0.0

2 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

8 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago