https://github.com/cytoscape/cytoscape.js-arbor

The Arbor physics simulation layout for Cytoscape.js

https://github.com/cytoscape/cytoscape.js-arbor

Science Score: 20.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.2%) to scientific vocabulary

Keywords

cytoscapejs cytoscapejs-extension

Keywords from Contributors

graph-theory visualisation
Last synced: 11 months ago · JSON representation

Repository

The Arbor physics simulation layout for Cytoscape.js

Basic Info
  • Host: GitHub
  • Owner: cytoscape
  • License: mit
  • Language: JavaScript
  • Default Branch: master
  • Size: 32.2 KB
Statistics
  • Stars: 3
  • Watchers: 17
  • Forks: 3
  • Open Issues: 0
  • Releases: 0
Topics
cytoscapejs cytoscapejs-extension
Created almost 11 years ago · Last pushed over 8 years ago
Metadata Files
Readme License

README.md

cytoscape-arbor

DOI

Description

The Arbor physics simulation layout for Cytoscape.js

The arbor layout gives relatively slow and poor results compared to other physics simulation layouts. Consider using cose, cose-bilkent, or cola instead.

The arbor layout uses a force-directed physics simulation. For more information about Arbor and its parameters, refer to its documentation.

Notes about Arbor:

  • For webworkers to work properly, you need to point your browser to a server URL (e.g. http://) rather than a local address (e.g. file://).
  • Please note that the liveUpdate option can potentially be expensive, so if you are concerned about running time (e.g. for large graphs), you should set it to false.
  • Arbor does some automatic path finding because it uses web workers, meaning you have to directly include it in a <script> in your <head>. Therefore, you can not combine arbor.js with your other JavaScript files — as you probably would as a part of the minification of the scripts in your webapp.
  • You probably want to use the version of arbor.js included with Cytoscape.js (or the unpatched, original arbor.js if you are unaffected by the issues it contains). If using npm, note that Arbor is not downloaded as an npm package automatically and needs special attention when including it as explained in the point above.

Dependencies

  • Cytoscape.js ^2.4.0 || ^3.0.0
  • Arbor.js >= 0.91
  • jQuery, as required by Arbor

Usage instructions

Download the library: * via npm: npm install cytoscape-arbor, * via bower: bower install cytoscape-arbor, or * via direct download in the repository (probably from a tag).

require() the library as appropriate for your project:

CommonJS: ```js var cytoscape = require('cytoscape'); var cyarbor = require('cytoscape-arbor'); var arbor = require('arbor');

cyarbor( cytoscape, arbor ); // register extension ```

AMD: js require(['cytoscape', 'cytoscape-arbor', 'arbor'], function( cytoscape, cyarbor, arbor ){ cyarbor( cytoscape, arbor ); // register extension });

Plain HTML/JS has the extension registered for you automatically, because no require() is needed.

API

Call the layout, e.g. cy.layout({ name: 'arbor', ... }), with the following options:

```js var defaults = { animate: true, // whether to show the layout as it's running maxSimulationTime: 4000, // max length in ms to run the layout fit: true, // on every layout reposition of nodes, fit the viewport padding: 30, // padding around the simulation boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } ungrabifyWhileSimulating: false, // so you can't drag nodes during layout randomize: false, // uses random initial node positions on true

// callbacks on layout events ready: undefined, // callback on layoutready stop: undefined, // callback on layoutstop

// forces used by arbor (use arbor default on undefined) repulsion: undefined, stiffness: undefined, friction: undefined, gravity: true, fps: undefined, precision: undefined,

// static numbers or functions that dynamically return what these // values should be for each element // e.g. nodeMass: function(n){ return n.data('weight') } nodeMass: undefined, edgeLength: undefined,

stepSize: 0.1, // smoothing of arbor bounding box

// function that returns true if the system is stable to indicate // that the layout can be stopped stableEnergy: function( energy ){ var e = energy; return (e.max <= 0.5) || (e.mean <= 0.3); },

// infinite layout options infinite: false // overrides all other options for a forces-all-the-time mode }; ```

Publishing instructions

This project is set up to automatically be published to npm and bower. To publish:

  1. Set the version number environment variable: export VERSION=1.2.3
  2. Publish: gulp publish
  3. If publishing to bower for the first time, you'll need to run bower register cytoscape-arbor https://github.com/cytoscape/cytoscape.js-arbor.git
  4. Make a release on GitHub to automatically register a new Zenodo DOI

Owner

  • Name: Cytoscape Consortium
  • Login: cytoscape
  • Kind: organization

GitHub Events

Total
Last Year

Committers

Last synced: 12 months ago

All Time
  • Total Commits: 31
  • Total Committers: 3
  • Avg Commits per committer: 10.333
  • Development Distribution Score (DDS): 0.387
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Max Franz m****z@g****m 19
Alexander Li a****0@g****m 6
Manfred Cheung m****n@u****a 6
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 4
  • Total pull requests: 0
  • Average time to close issues: 5 months
  • Average time to close pull requests: N/A
  • Total issue authors: 4
  • Total pull request authors: 0
  • Average comments per issue: 3.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ignorabilis (1)
  • pmall (1)
  • mabossert (1)
  • palakons (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • npm 51 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 20
  • Total maintainers: 5
npmjs.org: cytoscape-arbor

The Arbor physics simulation layout for Cytoscape.js

  • Versions: 10
  • Dependent Packages: 1
  • Dependent Repositories: 2
  • Downloads: 51 Last month
Rankings
Dependent repos count: 7.7%
Forks count: 8.9%
Downloads: 11.6%
Average: 12.5%
Stargazers count: 13.2%
Dependent packages count: 21.1%
Last synced: 12 months ago
bower.io: cytoscape-arbor

The Arbor physics simulation layout for Cytoscape.js

  • License: MIT
  • Latest release: 1.4.1
    published over 8 years ago
  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.1%
Forks count: 20.1%
Average: 22.6%
Stargazers count: 27.8%
Dependent repos count: 37.5%
Last synced: 12 months ago

Dependencies

package.json npm
  • gulp ^3.8.8 development
  • gulp-jshint ^1.8.5 development
  • gulp-prompt ^0.1.1 development
  • gulp-replace ^0.4.0 development
  • gulp-shell ^0.2.9 development
  • jshint-stylish ^1.0.0 development
  • run-sequence ^1.0.0 development