npm install networkjsNetworkX clone in JavaScript!
Implemented modules :
* Degree Centrality
* Betweenness Centrality
* Eigenvector Centrality
* Installation
* Usage
* Command Line
* Library
* API Reference
* Run Tests
* Change Log
* Install Nodejs
* For command line install the tool via npm : npm install -g networkjs
* For library usage : npm install --save networkjs
* Makefile is also provided which will automatically install latest node if not present and then install the command line tool. To run, type the following :
``sh`
make
make install
See full options available : networkjs --help
* -s,--source
Provide the column name for Source Node. Default value = "Source"
* -t,--target
Provide the column name for Target Node. Default value = "Target"
* -w,--weight
Provide the column name for Weight Node. Default value = "Weight"
* -d,--degree:
Run Degree centrality measure over the given dataset, which is defined as the
number of links incident upon a node.
* -b,--betweenness:
Run Betweenness centrality measure over the given dataset, which for a node is
defined as the number of times a node acts as a bridge along the shortest path
between two other nodes.
* -e,--eigenvector:
Run Eigenvector centrality measure over the given dataset, which calculates
the influence of a node in the network. It assigns relative scores to all
nodes in the network based on the concept that connections to high-scoring
nodes contribute more to the score of the node in question than equal
connections to low-scoring nodes.
* -v,--verbose:
Print detailed logs and events
* -h,--help:
Display command line help usage for the methods available
For more details consult the man page : man networkjs
Import the required modules either using AMD require or ES6 import :
`js
import nj from 'networkjs'
const Graph = nj.datastructures.Graph
const {betweenness_centrality,
degree_centrality,
eigenvector_centrality} = nj.algorithms.centrality
// Add edges
let G = new Graph()
G.add_edges_from([[1,2],[2,3]])
`
* read_csvadd_node
* add_nodes_from
* remove_node
* get_node
* order
* has_node
* num_nodes
* get_nodes
* is_directed
* add_edge
* add_edges_from
* add_weighted_edges_from
* remove_edge
* remove_edges_from
* has_edge
* neighbors
* degree_iter
* nbunch_iter
*
* degree_centralitybetweenness_centrality
* eigenvector_centrality
*
``
npm test
* Changed the command line usage for providing Source, Target and Weight column headers
* Updated command line interface, now provide Source, Target and Weight headers directly
* Command line output in csv by default. To get json output provide flag --json`
* Fix babel module.exports issue
* Add man pages
* Patch fix again broken library import
* Patch fix broken library import
* Experimental Library Support
* Minor fixes
* Better readme
* Project is now public
* Published as npm package
* Supports command line features
* Initial release, supports Degree centrality, Betweenness centrality and Eigenvector centrality
* Added Tests