Skip to content

Instantly share code, notes, and snippets.

@Ognami
Ognami / data.json
Created September 27, 2019 15:32
Network Graph with Overlapping Nodes (v4)
View data.json
{
"nodes": [
{"id": "1"},
{"id": "2"},
{"id": "3"},
{"id": "4"},
{"id": "5"},
{"id": "6"},
{"id": "7"},
{"id": "8"},
@Ognami
Ognami / index.html
Last active July 23, 2018 17:32
Mapping individual state.
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v4.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script>
var margin = {top: 0, right: 0, bottom: 0, left: 0},
width = 960 - margin.left - margin.right,
@Ognami
Ognami / index.html
Last active April 23, 2018 16:45
Zooming Gradient Range Scale
View index.html
<!doctype html>
<meta charset="utf-8">
<html>
<head>
<title>Gradient Range</title>
<style>
body {
font-family: "Trebuchet MS", Helvetica, sans-serif;
}
@Ognami
Ognami / data.json
Created March 13, 2017 18:08
Network with Click and Drag
View data.json
{
"nodes":[
{"name":"node1","group":1},
{"name":"node2","group":2},
{"name":"node3","group":2},
{"name":"node4","group":3}
],
"links":[
{"source":2,"target":1,"weight":1},
{"source":0,"target":2,"weight":3}
@Ognami
Ognami / data.json
Last active January 23, 2017 22:08
Basic Network Chart
View data.json
{
"nodes": [
{"id": "Ognami", "group": 1},
{"id": "Harvey", "group": 9},
{"id": "Gus", "group": 9},
{"id": "Pierre", "group": 6},
{"id": "Pam", "group": 9},
{"id": "Leah", "group": 9},
{"id": "Wiz", "group": 9},
{"id": "Sam", "group": 2},
@Ognami
Ognami / data.csv
Last active January 20, 2017 00:32
Pie Chart With Data Select Option
View data.csv
name arrow type region
bob wood black
joe composite black
jane carbon yellow
susan aluminum white
john aluminum black
mark fiberglass red
tammy carbon yellow
alice fiberglass blue
sam wood red
@Ognami
Ognami / data.csv
Last active January 18, 2017 04:30
Horizontal Stacked Bar Chart With Groups
View data.csv
Name team gamea gameb gamec
Player 1 b 2000 3000 2000
Player 2 a 0 0 2000
Player 3 a 1000 3000 2000
Player 4 a 0 3000 0
Player 5 b 1000 3000 0
Player 6 b 1000 0 2000
Player 7 b 1000 3000 2000
Player 8 a 1000 0 0
Player 9 b 0 4500 0