Skip to content

Instantly share code, notes, and snippets.

View johan's full-sized avatar

Johan Sundström johan

View GitHub Profile
@johan
johan / CHE.geo.json
Created May 20, 2012 19:13 — forked from johan/lines.json
Swiss railroad detail geo-JSON, c/o swisstrains.ch 2012-05-19
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@johan
johan / lines.json
Created May 20, 2012 18:45 — forked from johan/lines.json
Swiss railroad detail geography JSON, c/o swisstrains.ch 2012-05-19
This file has been truncated, but you can view the full file.
{ "1": [ [46.727144, 6.579807, 0]
, [46.728009, 6.580875, 126.15]
, [46.728987, 6.58204, 266.7]
, [46.730101, 6.583268, 422.13]
, [46.731077, 6.584301, 556.36]
, [46.732324, 6.585232, 712.29]
, [46.733661, 6.586194, 878.24]
, [46.73493, 6.587092, 1035.24]
, [46.735995, 6.587862, 1167.56]
, [46.736744, 6.588539, 1265.64]
@johan
johan / lines.json
Created May 20, 2012 18:20 — forked from johan/map_lines.js
Swiss railroad geography as pure JSON, c/o swisstrains.ch 2012-05-19
{ "1": [[46.727144, 6.579807, 0], [46.746532, 6.607534, 3112]]
, "4": [[46.806329, 6.642031, 0], [46.850339, 6.722199, 7992]]
, "5": [[46.850339, 6.722199, 0], [46.877512, 6.757468, 4303]]
, "6": [[46.877512, 6.757468, 0], [46.899357, 6.781262, 3120]]
, "7": [[46.899357, 6.781262, 0], [46.929504, 6.811392, 4120]]
, "8": [[46.929504, 6.811392, 0], [46.959745, 6.835334, 4036]]
, "9": [[46.959745, 6.835334, 0], [46.966751, 6.847635, 1237]]
, "11": [[46.979883, 6.877393, 0], [46.985642, 6.908226, 2479]]
, "14": [[47.014811, 6.982413, 0], [47.038340, 7.023455, 4200]]
, "15": [[47.038340, 7.023455, 0], [47.051921, 7.039871, 1987]]
@johan
johan / dnd.js
Created December 4, 2011 22:03 — forked from johan/dnd.js
Drag and drop geo-json feature files to paint your planet!
// 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 = []
@johan
johan / dnd.js
Created November 25, 2011 06:55 — forked from johan/index.html
Spinny Globe with drag-and-drop-geojson-file support
// 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 = []
@johan
johan / index.html
Created November 25, 2011 00:24 — forked from johan/dnd.js
Animated Draggable Spinny Globe
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>d3.js Spinny Globe from Mike Bostock's SVG Open 2011 keynote</title>
<script src="http://mbostock.github.com/d3/d3.js"></script>
<script src="http://mbostock.github.com/d3/d3.geo.js"></script>
<link type="text/css" rel="stylesheet" href="http://mbostock.github.com/d3/talk/20111018/style.css"/>
<link type="text/css" rel="stylesheet" href="http://mbostock.github.com/d3/talk/20111018/colorbrewer/colorbrewer.css"/>
<style type="text/css">
@johan
johan / index.html
Created November 11, 2011 09:32 — forked from johan/index.html
Google Maps + D3 + USGS
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<title>Earthquakes &gt; 1.0 the past week</title>
<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<script src="http://mbostock.github.com/d3/d3.js?2.5.0"></script>
<script src="http://mbostock.github.com/d3/d3.csv.js?2.5.0"></script>
<script src="http://mbostock.github.com/d3/d3.time.js?2.5.0"></script>
<style type="text/css">
@johan
johan / 2011-10-26.csv
Created November 8, 2011 10:14 — forked from johan/README.md
Page load time histograms
page time count
root 2 80
root 4 38
root 6 16
root 8 3
root 10 2
root 12 1
root 14 1
root 16 3
root 20 2
@johan
johan / README.md
Created November 6, 2011 22:37 — forked from johan/README.md
Bay Area earthquake responses by zip code
@johan
johan / README.md
Created November 6, 2011 21:44 — forked from johan/README.md
California earthquake responses by zip code