Skip to content

Instantly share code, notes, and snippets.

View enjalot's full-sized avatar

Ian Johnson enjalot

View GitHub Profile
@enjalot
enjalot / index.html
Created October 24, 2011 23:21 — forked from ZJONSSON/index.html
D3 - using SVG Bounding Box to get the "automatic padding"
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js?2.0.0"></script>
<style>
path { fill:none;stroke:black}
</style>
<head>.
<body>
@enjalot
enjalot / .gitignore
Last active November 16, 2020 03:55 — forked from ejfox/package.json
package-lock.json
node_modules
secret
output*
bubbles0*
*.mp4
*.png
*.json
@enjalot
enjalot / alex4.js
Created August 4, 2020 23:54 — forked from ejfox/alex4.js
const { load } = require("@alex.garcia/observable-prerender");
const puppeteer = require("puppeteer");
async function main() {
let mapWidth = 1920
let mapHeight = 1080
// let startDate = "20200301"
let startDate = "20200420"
var r = 480,
format = d3.format(",d"),
fill = d3.scale.category20c();
var keeper;
var bubble = d3.layout.pack()
.sort(null)
.size([r, r]);
@enjalot
enjalot / index.html
Created December 11, 2011 02:58 — forked from mbostock/.block
d3.js sin waves
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style type="text/css">
body {
background: #333;
}
@enjalot
enjalot / api-metadata.tsv
Last active December 15, 2016 05:30 — forked from anonymous/api-metadata.tsv
4000 blocks api usage
id description username
675512 Rainbow Voronoi mbostock
705856 stroke-dasharray mbostock
714554 Moiré Patterns mbostock
844752 d3.nest mbostock
846688 Circular Layout mbostock
846710 Circular Layout (Recursive) mbostock
847677 Circular Layout (Slider) mbostock
846704 Circular Layout (Arc) mbostock
849853 Circular Layout (Raindrops) mbostock
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.state {
fill: #ccc;
}
.county-border {
fill: none;

such force

drag me!

GEO.id GEO.id2 GEO.display-label HD01_VD01 HD02_VD01
1400000US36001000100 36001000100 Census Tract 1, Albany County, New York 2235 294
1400000US36001000200 36001000200 Census Tract 2, Albany County, New York 5412 792
1400000US36001000300 36001000300 Census Tract 3, Albany County, New York 6421 740
1400000US36001000401 36001000401 Census Tract 4.01, Albany County, New York 2412 188
1400000US36001000403 36001000403 Census Tract 4.03, Albany County, New York 4540 500
1400000US36001000404 36001000404 Census Tract 4.04, Albany County, New York 4902 544
1400000US36001000501 36001000501 Census Tract 5.01, Albany County, New York 3481 476
1400000US36001000502 36001000502 Census Tract 5.02, Albany County, New York 3747 370
1400000US36001000600 36001000600 Census Tract 6, Albany County, New York 3864 543
@enjalot
enjalot / crime.csv
Created November 11, 2013 18:12 — forked from ejs06003/crime.csv
Crime Count
Family Dispute 2724
Simple Assault 2408
M/V Violations 2280
Suspicious Activity 2003
Threatening 1296
Criminal Mischief 877
Other Investigation 847
Found Property 824
Mental Cases 823