Skip to content

Instantly share code, notes, and snippets.

View eliot84's full-sized avatar

Eliot eliot84

  • Miami, Fl
View GitHub Profile
@eliot84
eliot84 / index.html
Created April 4, 2016 19:34
Week 11 Maps
<!DOCTYPE html>
<html>
<head>
<title>Drug Abuse Related Arrests 2014</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
@eliot84
eliot84 / drugTrends.csv
Last active January 2, 2018 23:51
Week 10: Small Multiples
Drug Year Eighth Tenth Twelfth
Alcohol Year 2012 29.50 54.00 69.40
Alcohol Year 2013 27.80 52.10 68.20
Alcohol Year 2014 26.80 49.30 66.00
Alcohol Year 2015 26.10 47.10 64.00
Cigarettes Year 2012 15.50 27.70 39.50
Cigarettes Year 2013 14.80 25.70 38.10
Cigarettes Year 2014 13.50 22.60 34.40
Cigarettes Year 2015 13.30 19.90 31.10
E-Cigarettes Year 2012 0 0 0
Country Year Meningitis_encephalitis Respiratory_infections Sepsis Pertussis Malaria Measles HIV_Aids Diarrhoeal_diseases Asphyxia_trauma
Angola Year 2013 5461 26392 7199 897 19405 627 1778 22465 14245
Angola Year 2012 5747 26910 7149 893 19692 1278 1769 23655 14150
Angola Year 2000 9282 25989 4172 931 21138 1103 1179 27209 9800
Angola Year 2001 9452 26463 4784 918 21232 3889 1276 27064 9715
Angola Year 2011 6107 27282 7044 911 21331 573 1704 24567 13909
Angola Year 2002 9628 27141 5269 931 21793 5054 1373 26969 10068
Angola Year 2006 10465 30754 6064 1047 22022 602 1590 27001 12620
Angola Year 2003 9840 28190 5219 964 22530 1786 1466 27015 11186
Angola Year 2005 10242 29865 5742 1014 23066 297 1601 26962 12292
@eliot84
eliot84 / index.html
Created March 21, 2016 02:16
Week 9: Stacked Transition
<!DOCTYPE html>
<!-- code loosely inspired by this block https://gist.github.com/mstanaland/6100713 -->
<meta charset="utf-8">
<style>
body {
font: 12px sans-serif;
padding: 50px;
}
@eliot84
eliot84 / deaths_04yearsold_2013percent.csv
Created March 14, 2016 02:15
Week 8: Finished Bar Homework
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 11 columns, instead of 8 in line 7.
Country,Meningitis_encephalitis,Respiratory_infections,Sepsis,Pertussis,Malaria,Measles,Congenital_anomalies,HIV_AIDS,Diarrhoeal_diseases,Asphyxia_trauma
India,0.042488278,0.233534888,0.145938913,0.007182025,0.009314662,0.046933792,0.123114044,0.00663867,0.184781579,0.200073149
Democratic Republic of the Congo,0.040686134,0.221728479,0.075842245,0.01386753,0.212434283,0.06908283,0.048008834,0.02005919,0.150790387,0.147500089
Indonesia,0.025829262,0.27277861,0.106128312,0.01262,0.030445137,0.076689828,0.185003315,0.017677822,0.092133369,0.180694346
Pakistan,0.042190621,0.28618202,0.163435643,0.021985945,0.001921226,0.020857808,0.075568204,0.000843982,0.175454966,0.211559586
Nigeria,0.043200357,0.207813651,0.071262349,0.016492104,0.287175958,0.007996224,0.044873945,0.042612526,0.133019132,0.145553754
Ethiopia,0.034238059,0.262054587,0.115549659,0.028521607,0.043578469,0.034427597,0.081432904,0.034783927,0.140515542,0.22489765
Afghanistan,0.052876527,0.315089385,0.112120879,0.01908775,9.43381E-05,0.061885819,0.0
@eliot84
eliot84 / elections.csv
Created February 29, 2016 04:26
Week 7: Transition plot
state rep2012 dem2012 rep2008 dem2008
Alabama 61 38 61 39
Alaska 55 41 60 38
Arizona 54 44 54 45
Arkansas 61 37 59 39
California 38 59 37 61
Colorado 47 51 45 54
Connecticut 40 58 38 61
Delaware 40 59 37 62
Florida 49 50 48 51
@eliot84
eliot84 / gasHistory.csv
Created February 29, 2016 00:50
Week 7: Dots on Lines
1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
1.107 1.161 1.246 1.318 1.255 1.096 1.315 1.584 1.665 1.484 1.546 1.650 1.692 2.092 2.653 3.050 3.104 4.146 2.695 3.511 3.889 3.716 3.778 1.837
@eliot84
eliot84 / index.html
Created February 22, 2016 23:16
Week 6: Line Plot
<!DOCTYPE html>
<!-- Modification of an example by Scott Murray from Knight D3 course -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Line Chart with Multiple Lines</title>
<style type="text/css">
body {
background-color: white;
@eliot84
eliot84 / index.html
Created February 16, 2016 01:56
Week5:Barchart
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Adding Labels</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 {
background-color: gray;
@eliot84
eliot84 / floridaschools2014.csv
Created February 16, 2016 01:26
extra credit scatterplot
District Dropouts Enrolled
ALACHUA 212 8769
BAKER 5 1281
BAY 113 7833
BRADFORD 14 938
BREVARD 142 22450
BROWARD 1643 85986
CALHOUN 13 659
CHARLOTTE 146 6082
CITRUS 69 5304