Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graphology/graphology
A robust & multipurpose Graph object for JavaScript & TypeScript.
https://github.com/graphology/graphology
graph
Last synced: 2 days ago
JSON representation
A robust & multipurpose Graph object for JavaScript & TypeScript.
- Host: GitHub
- URL: https://github.com/graphology/graphology
- Owner: graphology
- License: mit
- Created: 2016-08-24T16:59:27.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-22T09:58:33.000Z (20 days ago)
- Last Synced: 2024-12-03T02:04:34.760Z (9 days ago)
- Topics: graph
- Language: JavaScript
- Homepage: https://graphology.github.io
- Size: 7.63 MB
- Stars: 1,308
- Watchers: 18
- Forks: 86
- Open Issues: 80
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-node-based-uis - graphology - Utilities and algorithms for all kinds of graphs (Javascript Libraries / Graph Utilities)
- awesome-frontend-graph-library - https://github.com/graphology/graphology
- awesome-web-visualization-frameworks - Graphology - Multipurpose Graph lib; serves as base lib for other graph visualization libraries. (Uncategorized / Uncategorized)
README
[![Build Status](https://github.com/graphology/graphology/workflows/Tests/badge.svg)](https://github.com/graphology/graphology/actions) [![DOI](https://zenodo.org/badge/66482976.svg)](https://zenodo.org/badge/latestdoi/66482976)
# Graphology
`graphology` is a robust & multipurpose `Graph` object for JavaScript and TypeScript.
It aims at supporting various kinds of graphs with the same unified interface.
A `graphology` graph can therefore be directed, undirected or mixed, allow self-loops or not, and can be simple or support parallel edges.
Along with this `Graph` object, one will also find a comprehensive [standard library](https://graphology.github.io/standard-library/) full of graph theory algorithms and common utilities such as graph generators, layouts, traversals etc.
Finally, `graphology` graphs are able to emit a wide variety of [events](https://graphology.github.io/events), which makes them ideal to build interactive renderers for the browser. It is for instance used by [sigma.js](https://www.sigmajs.org/) as its data backend.
## Installation
To install `graphology` using npm, run the following command:
```
npm install graphology
```*Legacy bundle*
Standalone builds of `graphology` and its full standard library can be found in the repository's [releases](https://github.com/graphology/graphology/releases) if you can only rely on your own `script` tags to load code.
```html
const graph = new graphology.Graph();
const {UndirectedGraph, DirectedGraph} = graphology;
const density = graphologyLibrary.metrics.graph.density(graph);
```
Be warned that the standard library bundle often lags behind and is not always completely up to date.
*TypeScript usage*
Note that `graphology` also exports type declaration that are installed along using peer dependencies so it can be used with [TypeScript](https://www.typescriptlang.org/) out of the box.
If your version of npm is a bit old, you may need to install `graphology-types` yourself if the peer dependency resolution is not made for you already:
```
npm install graphology-types
```It can also be useful to pin `graphology-types` version in your `package.json` to avoid resolution issues sometimes.
## How to cite
`graphology` is published on [Zenodo](https://zenodo.org/) as [![DOI](https://zenodo.org/badge/66482976.svg)](https://zenodo.org/badge/latestdoi/66482976)
You can cite it thusly:
> Guillaume Plique. (2021). Graphology, a robust and multipurpose Graph object for JavaScript. Zenodo. https://doi.org/10.5281/zenodo.5681257
## Changelog
A complete changelog can be found [here](https://github.com/graphology/graphology/blob/master/CHANGELOG.md).