Skip to content

Instantly share code, notes, and snippets.

View apcj's full-sized avatar

Alistair Jones apcj

  • Neo Technology
  • London
View GitHub Profile
@apcj
apcj / README.md
Last active August 29, 2015 14:24 — forked from mbostock/.block

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

Compare this display to a force layout with curved links, a force layout with fisheye distortion and a matrix diagram.

MERGE (person:Person{name:"Alistair"})
MERGE (role:Role{name:"Software Engineer"})
MERGE (company:Company{name:"Neo Technology"})
CREATE (empl:Employment{from: 2011})
MERGE (person)-[:CURRENT]->(empl)
MERGE (empl)-[:WORKS_AT]->(company)
MERGE (empl)-[:ROLE]->(role)
// Determine whether first story already exists
@apcj
apcj / machine.js
Created December 5, 2019 21:57
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions