Skip to content

Instantly share code, notes, and snippets.

View scotthmurray's full-sized avatar
🤔

Scott Murray scotthmurray

🤔
View GitHub Profile
@scotthmurray
scotthmurray / index.html
Last active November 20, 2015 17:14 — forked from mbaba/index.html
Map circles text
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="//d3js.org/d3.v3.min.js"></script>
<link href='https://fonts.googleapis.com/css?family=Lato:400,100,300,400italic,900,700,100italic,300italic,700italic,900italic&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="main.css">
<title>Voivodeships of Poland</title>
</head>
@scotthmurray
scotthmurray / index.html
Created November 19, 2015 06:04 — forked from murtra/ESP_adm2.json
map not working
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Map of Spain</title>
<script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style type="text/css">
body {
margin: 0;
@scotthmurray
scotthmurray / index.html
Created November 12, 2015 19:00 — forked from mbaba/index.html
Stacked bar chart - elections in Poland
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<link rel="stylesheet" type="text/css" href="main.css">
<title>Parliamentary elections</title>
</head>
<body>
@scotthmurray
scotthmurray / cropsVertical.csv
Last active November 8, 2015 22:29
Crops planted 1929-2015 (not working)
year corn soy wheat sorghum
1929 99.13 2.43 67.18 3.52
1930 103.92 3.07 67.56 3.48
1931 109.36 3.84 66.46 4.44
1932 113.02 3.7 66.28 4.4
1933 109.83 3.54 69.01 4.35
1934 100.56 5.76 64.06 2.4
1935 99.97 6.97 69.61 4.6
1936 101.96 6.13 73.97 2.79
1937 97.17 6.33 80.81 4.92
@scotthmurray
scotthmurray / index.html
Last active November 6, 2015 23:16 — forked from dyorama/index.html
Number of disaster per year in the top 20 french cities by natural disaster
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Stacked area chart</title>
<script type="text/javascript" src="//d3js.org/d3.v3.min.js"></script>
<style type="text/css">
body {
background-color: white;
@scotthmurray
scotthmurray / index.html
Last active November 6, 2015 22:34 — forked from cpopolo/index.html
Supermarket Electricity Data
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bar Chart, Framed</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<style type="text/css">
body {
margin: 0;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Bringing home the vegetables</title>
<script src="//d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style type="text/css">
body {
margin: 0;
@scotthmurray
scotthmurray / evolution.csv
Last active November 1, 2015 16:12 — forked from MariellaCC/evolution.csv
Ghg emissions' evolution by country, 2012 - scatterplot
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 25 columns, instead of 4. in line 6.
Country,annee1990,annee1991,annee1992,annee1993,annee1994,annee1995,annee1996,annee1997,annee1998,annee1999,annee2000,annee2001,annee2002,annee2003,annee2004,annee2005,annee2006,annee2007,annee2008,annee2009,annee2010,annee2011,annee2012,evolution
Australia,24.32,24.1,24.05,23.93,23.7,24.17,24.21,24.61,25.15,25.34,25.57,25.88,25.63,25.45,25.79,25.67,25.6,25.6,25.47,24.85,24.48,24.26,23.97,-1.44
Austria,10.17,10.59,9.62,9.55,9.62,10.03,10.4,10.33,10.24,10.01,10.02,10.48,10.64,11.33,11.21,11.25,10.85,10.48,10.42,9.58,10.11,9.85,9.5,-6.59
Belgium,14.34,14.49,14.31,14.16,14.68,14.83,15.19,14.31,14.82,14.17,14.23,14.11,14.01,14.01,14.05,13.56,13.12,12.56,12.68,11.41,11.96,10.88,10.47,-26.99
Canada,21.34,20.8,21.15,20.99,21.46,21.81,22.33,22.6,22.66,22.9,23.51,23.02,22.95,23.39,23.28,22.82,22.34,22.76,21.94,20.44,20.49,20.33,20.03,-6.14
Czech Republic,18.93,17.67,16.05,15.44,14.46,14.69,15.08,14.73,14.05,13.33,14.25,14.31,14,14.29,14.43,14.26,14.32,14.26,13.63,12.79,13.03,12.89,12.51,-33.91
Denmark,13.62,15.62,14.4
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 59 columns, instead of 53. in line 1.
Fuel,generation,1/1/01,3/1/01,6/1/01,9/1/01,1/1/02,3/1/02,6/1/02,9/1/02,1/1/03,3/1/03,6/1/03,9/1/03,1/1/04,3/1/04,6/1/04,9/1/04,1/1/05,3/1/05,6/1/05,9/1/05,1/1/06,3/1/06,6/1/06,9/1/06,1/1/07,3/1/07,6/1/07,9/1/07,1/1/08,3/1/08,6/1/08,9/1/08,1/1/09,3/1/09,6/1/09,9/1/09,1/1/10,3/1/10,6/1/10,9/1/10,1/1/11,3/1/11,6/1/11,9/1/11,1/1/12,3/1/12,6/1/12,9/1/12,1/1/13,3/1/13,6/1/13,9/1/13,1/1/14,3/1/14,6/1/14,9/1/14,1/1/15
coal,mWh generation,482.291606,454.879372,516.3348,450.450164,458.892491,458.378691,528.516458,487.342714,493.297409,454.507588,532.094143,493.837609,496.4489319,466.1292397,523.9260866,491.7962911,496.4446213,471.9081978,545.3207271,499.1994996,489.1773847,468.1294669,538.8661553,494.3381275,499.1533241,477.2757064,544.5798768,495.4466762,510.2851021,472.9422043,528.6662966,473.9076436,448.3712629,405.6948018,458.6390002,443.1991882,470.7699532,435.7158679,506.0914909,434.7129666,443.9590679,419.6450351,488.8075026,381.0183997,348.4885835,343.5291233,438.2199257,383.805312,392.2851863,369.6303986,435.
@scotthmurray
scotthmurray / NZNationalParks.csv
Last active September 27, 2015 21:19 — forked from tgerard/NZNationalParks.csv
Visitors to NZ National Parks
NP 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012
Abel Tasman 28800 31100 31700 54400 48200 57900 93000 94400 95800 96700 110700 119300 106800 120800 110500 95300
Fiordland 196100 234500 205100 250300 239300 273000 308400 393700 409700 438000 439900 441200 385700 392700 371400 338700
Westland 205500 207300 233900 278900 271500 280900 342300 362400 386000 372800 376700 379300 341400 357300 312100 288800
Aoraki/Mt Cook 154300 147100 135500 158400 143100 158100 157700 209900 201000 192200 172700 201800 170400 186600 146900 155700
Tongariro 32100 41900 45500 48600 51800 55100 80800 96700 100300 95000 97800 83200 102100 110000 141500 114000
Paparoa 11700 30100 33400 40500 40500 44400 71200 87700 98300 116700 97400 121200 130800 165800 127500 114200