Home

Awesome

Oligrapher

Oligrapher is a JavaScript app for visualizing network graphs. It allows a user to design a nice-looking network graph using a combination of imported or manually entered data, and to create a collection of annotations for a graph.

Oligrapher was originally developed by LittleSis before it was separated into a standalone library. LittleSis has a large collection of maps created with Oligrapher.

Oligrapher is built with React and Redux and is bundled with esbuild

Oligrapher Demo Screenshot

Features

Install

To run Oligrapher app in a web page, include oligrapher.js and oligrapher.css on your page and create a element for the map:

<link rel="stylesheet" href="oligrapher.css">
<script src="oligrapher.js"></script>

<div id="example-oligrapher"></div>

<script>
const oli = new Oligrapher({ isEditor: true, domId: "example-oligrapher" })
</script>

See defaultState.ts for configuration options

Development

To run this app in development mode:

git clone https://github.com/public-accountability/oligrapher
cd oligrapher
npm install
npm run dev
npm run serve

Then point your browser to localhost:8000 to view a blank graph.

Also available:

Production build: npm run build

Development build: npm run build-dev

Build css: npx sass app/oligrapher.scss build/oligrapher.css --style=compressed

Run tests: npm test

Data Schema

Node Attributes

Edge Attributes

Caption Attributes

Annotation Attributes

The annotations array should conforms to the following schema:

[
  {
    header: "The Revolving Door",
    text: "Goldman Sachs has many former executives with top positions in the federal government.",
    nodeIds: [...],
    edgeIds: [...],
    captionIds: [...]
  },
  {
    header: "Treasury Department",
    text: "Former Treasury Secretary Robert Rubin was co-chair of Goldman before joining the Clinton Administration in 1993." ,
    nodeIds: [...],
    edgeIds: [...],
    captionIds: []
  },
  ...
]

If no node, edge, or captions are highlighted, the graph will have its normal appearance when viewing the annotation. If there are highlights, non-highlighted content will appear faded.