Skip to content

Instantly share code, notes, and snippets.

@jashcny
jashcny / index.html
Created January 18, 2016 20:55
Week 1: CSV data.
<!DOCTYPE html>
<!-- This was one of Scott Murray's Knight D3 course files, modified a bit. -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loading CSV Data with D3</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
</head>
<body>
@jashcny
jashcny / index.html
Last active October 14, 2016 16:06
Week 2: Paragraph Data load
<!DOCTYPE html>
<!-- This was one of Scott Murray's Knight D3 course files, modified a bit. -->
<html lang="en">
<head>
<meta charset="utf-8">
<title>Loading CSV Data with D3</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
</head>
<body>
@jashcny
jashcny / index.html
Last active October 14, 2016 15:56
Week 2: Toggle
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<title>Toggle</title>
<!-- Code example for class extracted from http://datatools.urban.org/Features/wealth-inequality-charts/ with code from Tim Meko and Ben Chartoff -->
<style>
body {
@jashcny
jashcny / index.html
Last active October 14, 2016 16:06
Week 2: Two Charts
<html>
<head>
<style>
body {
font-family: Arial, sans-serif;
font-size: 12px;}
.highcharts-tooltip h3 {
margin: 0.3em 0;
}
@jashcny
jashcny / index.html
Last active October 14, 2016 16:07
Week 3: D3 Table.
<!DOCTYPE html>
<html lang="en">
<head>
<style>
@import url(https://fonts.googleapis.com/css?family=Lato:400,700italic);
@import url(https://fonts.googleapis.com/css?family=Raleway:400,700);
th {
padding-left: 70px;
@jashcny
jashcny / index.html
Created February 8, 2016 18:10
Week4: Sortable Heatmap table
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Preschool Program Spending by state</title>
</head>
<style>
@import url(https://fonts.googleapis.com/css?family=Lato:400,700italic);
@jashcny
jashcny / index.html
Last active October 14, 2016 15:59
Week 4: SVG fixes
<html lang="en">
<head>
<meta charset="utf-8">
<title>SVG Shapes</title>
<style>
svg {
background-color: lightgray;
}
@jashcny
jashcny / emission.csv
Created February 8, 2016 18:19
Week4: Starter Bars
species emissions
Beef Cattle 2495
Dairy Cattle 2128
Pigs 668
Buffalo 618
Chickens 612
Small Ruminants 474
Other Poultry 72
@jashcny
jashcny / guncrime.csv
Last active October 18, 2016 20:24
Week 5: Scatterplot
District State GunDeaths Ownership DeathRate
West Alaska 144 61.7 19.8
South Alabama 860 48.9 17.6
West Arizona 941 32.3 14.1
South Arkansas 501 58 16.8
West California 3026 20.1 7.7
West Colorado 619 34.3 11.5
Northeast Connecticut 161 16.6 4.4
South Delaware 100 5.3 10.3
South Florida 2442 32.5 11.9
@jashcny
jashcny / emission.csv
Created February 15, 2016 16:08
Week 5: Bar chart labels
Beef Cattle 2495
Dairy Cattle 2128
Pigs 668
Buffalo 618
Chickens 612
Small Ruminants 474
Other Poultry 72