Skip to content

Instantly share code, notes, and snippets.

@mayblue9
mayblue9 / .block
Created July 27, 2016 03:47 — forked from mbostock/.block
Bounded Force Layout
license: gpl-3.0
@mayblue9
mayblue9 / .block
Created July 27, 2016 02:30 — forked from mbostock/.block
Sticky Force Layout
license: gpl-3.0
@mayblue9
mayblue9 / sigma.fruchterman.js
Created July 26, 2016 00:28 — forked from sheymann/sigma.fruchterman.js
Fruchterman-Reingold layout plugin for Sigma.js with automatic cooling and stopping condition.
/**
* Linkurious 2012, all rights reserved.
* Sébastien Heymann <[email protected]>,
* Romain Yon <[email protected]>
*
* Please use http://jsbeautifier.org/ and indent with 2 spaces.
*
* Lib docs:
* http://twitter.github.com/bootstrap/
* http://docs.jquery.com/
@mayblue9
mayblue9 / 50_top_paid_chicago_lobbyists.json
Created July 25, 2016 07:27 — forked from christophermanning/50_top_paid_chicago_lobbyists.json
Chicago Lobbyists Force-Directed Graph Visualization
{"links":[{"target":1,"source":0},{"target":2,"source":0},{"target":3,"source":0},{"target":4,"source":0},{"target":5,"source":0},{"target":6,"source":0},{"target":7,"source":0},{"target":8,"source":0},{"target":9,"source":0},{"target":10,"source":0},{"target":11,"source":0},{"target":12,"source":0},{"target":13,"source":0},{"target":14,"source":0},{"target":15,"source":0},{"target":16,"source":0},{"target":17,"value":22,"source":0},{"target":18,"value":24,"source":0},{"target":19,"value":28,"source":0},{"target":20,"value":19,"source":0},{"target":21,"value":19,"source":0},{"target":22,"value":26,"source":0},{"target":23,"value":28,"source":0},{"target":25,"source":24},{"target":26,"source":24},{"target":27,"source":24},{"target":28,"source":24},{"target":29,"source":24},{"target":30,"source":24},{"target":31,"source":24},{"target":32,"source":24},{"target":33,"source":24},{"target":34,"source":24},{"target":35,"value":1,"source":24},{"target":36,"value":12,"source":24},{"target":23,"value":1,"source":24},{"
@mayblue9
mayblue9 / README.md
Created July 25, 2016 01:50 — forked from nitaku/README.md
Basic force layout (ID-based, zoomable, fixed random seed)
#!/usr/bin/env python
import networkx as nx
import matplotlib.pyplot as plt
import math
from random import random
from numpy import arange
N = 1000
K = 5
@mayblue9
mayblue9 / .block
Created July 19, 2016 08:46 — forked from mbostock/.block
Resizable Force Layout
license: gpl-3.0
@mayblue9
mayblue9 / README.md
Created July 19, 2016 04:56 — forked from hlucasfranca/README.md
Force layout graph with colour-coded node neighbours.

First attempt at making a colour-coded graph, with code snippets inspired from the D3 community.

Green => Friend and follower.

Red => Follower

Blue => Friend.

Improvements needed:

@mayblue9
mayblue9 / index.html
Created July 19, 2016 02:25 — forked from syntagmatic/index.html
Force-Directed Parallel Coordinates
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Force-Directed Parallel Coordinates</title>
<style type="text/css">
html {
margin: 0;
}
body {
@mayblue9
mayblue9 / index.html
Created July 19, 2016 02:05 — forked from phil-pedruco/index.html
Click to zoom with table and map in D3
<!DOCTYPE html>
<meta charset="utf-8">
<style>
@import url(mapStyle.css);
</style>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<body>