Skip to content

Instantly share code, notes, and snippets.

@kjordahl
kjordahl / dnd.js
Created July 10, 2016 02:51 — forked from johan/dnd.js
Draggable Spinny Globe from Mike Bostock's SVG Open 2011 keynote
// http://www.html5rocks.com/en/tutorials/file/dndfiles/
d3.select('svg')
.on('dragover', handleDragOver)
.on('drop', handleFileSelect)
;
function handleFileSelect() {
var event = d3.event
, files = event.dataTransfer.files // FileList object
, about = []
@kjordahl
kjordahl / cat311.json
Created September 29, 2012 16:01
NYC 311 map using D3 and Leaflet
{"1024000": {"taxi": 18, "squeegee": 0, "noise": 112, "radioactive": 0, "street_condition": 7, "snow": 0, "sewer": 0, "graffiti": 0, "food_poisoning": 3, "streetlight": 0, "total": 210, "hpd": 0}, "3072000": {"taxi": 1, "squeegee": 0, "noise": 22, "radioactive": 0, "street_condition": 93, "snow": 17, "sewer": 12, "graffiti": 2, "food_poisoning": 4, "streetlight": 25, "total": 963, "hpd": 309}, "3080200": {"taxi": 9, "squeegee": 0, "noise": 120, "radioactive": 0, "street_condition": 82, "snow": 8, "sewer": 12, "graffiti": 21, "food_poisoning": 1, "streetlight": 83, "total": 3300, "hpd": 2392}, "4029100": {"taxi": 12, "squeegee": 0, "noise": 74, "radioactive": 0, "street_condition": 65, "snow": 36, "sewer": 14, "graffiti": 14, "food_poisoning": 18, "streetlight": 50, "total": 1993, "hpd": 655}, "4005900": {"taxi": 55, "squeegee": 0, "noise": 282, "radioactive": 0, "street_condition": 111, "snow": 14, "sewer": 10, "graffiti": 22, "food_poisoning": 2, "streetlight": 123, "total": 2752, "hpd": 688}, "3088400": {"t
@kjordahl
kjordahl / cat311.json
Created September 29, 2012 14:27
NYC 311 map using D3 and Leaflet
{"1024000": {"taxi": 18, "squeegee": 0, "noise": 112, "radioactive": 0, "street_condition": 7, "snow": 0, "sewer": 0, "graffiti": 0, "food_poisoning": 3, "streetlight": 0, "total": 210, "hpd": 0}, "3072000": {"taxi": 1, "squeegee": 0, "noise": 22, "radioactive": 0, "street_condition": 93, "snow": 17, "sewer": 12, "graffiti": 2, "food_poisoning": 4, "streetlight": 25, "total": 963, "hpd": 309}, "3080200": {"taxi": 9, "squeegee": 0, "noise": 120, "radioactive": 0, "street_condition": 82, "snow": 8, "sewer": 12, "graffiti": 21, "food_poisoning": 1, "streetlight": 83, "total": 3300, "hpd": 2392}, "4029100": {"taxi": 12, "squeegee": 0, "noise": 74, "radioactive": 0, "street_condition": 65, "snow": 36, "sewer": 14, "graffiti": 14, "food_poisoning": 18, "streetlight": 50, "total": 1993, "hpd": 655}, "4005900": {"taxi": 55, "squeegee": 0, "noise": 282, "radioactive": 0, "street_condition": 111, "snow": 14, "sewer": 10, "graffiti": 22, "food_poisoning": 2, "streetlight": 123, "total": 2752, "hpd": 688}, "3088400": {"t