# ngraph.modularity

> modularity gephi js adoptation

Latest version **1.0.5** (published 2015-04-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install ngraph.modularity
pnpm add ngraph.modularity
yarn add ngraph.modularity
bun add ngraph.modularity
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2015-04-04 |
| First published | 2015-04-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 10 |
| Author | Zig Green |
| Maintainers | zig-green |
| Keywords | sna, graph, community, detection, network, algorithm |

## Links

- npm: https://www.npmjs.com/package/ngraph.modularity
- Repository: https://github.com/ZigGreen/modularity
- Issues: https://github.com/ZigGreen/modularity/issues
- npm.io page: https://npm.io/package/ngraph.modularity

## Dependencies (1)

- [ngraph.centrality](https://npm.io/package/ngraph.centrality.md) ^0.1.2

## Alternatives

- [apollo-link-http-common](https://npm.io/package/apollo-link-http-common.md) — 879.0K weekly downloads
- [react-relay](https://npm.io/package/react-relay.md) — 336.8K weekly downloads
- [relay-test-utils](https://npm.io/package/relay-test-utils.md) — 181.6K weekly downloads
- [@vendure/core](https://npm.io/package/@vendure/core.md) — 14.8K weekly downloads
- [@pnpm/deps.graph-sequencer](https://npm.io/package/@pnpm/deps.graph-sequencer.md) — 13.4K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2015-04-04
- 1.0.4 — 2015-04-02
- 1.0.3 — 2015-04-02
- 1.0.2 — 2015-04-02
- 1.0.1 — 2015-04-01
- 1.0.0 — 2015-04-01

## README

# Modularity 

Community detection algorithm based on graph modularity metric.
It is code adaptation of [Gephi](https://github.com/gephi/gephi) [Modularity.java](https://github.com/gephi/gephi/blob/master/modules/StatisticsPlugin/src/main/java/org/gephi/statistics/plugin/Modularity.java) to javascript.

# usage

``` javascript
var dot = require('ngraph.fromdot')
    , Modularity = require('../Modularity')
    , centrality = require('ngraph.centrality')
    ;

var g  = dot('digraph G { a -> b; b -> c; c -> a; a -> d; d -> e; e -> f; f -> d; f -> g; g -> e; }');
var modularity = new Modularity;

var communities = modularity.execute(g);

console.dir(communities);
```

# install

With [npm](https://npmjs.org):

```
npm install ngraph.modularity --save
```

# license

MIT

---
_Source: https://npm.io/package/ngraph.modularity · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
