Skip to content

Instantly share code, notes, and snippets.

View williaster's full-sized avatar
🧑‍🚀

Chris Williams williaster

🧑‍🚀
View GitHub Profile
@williaster
williaster / index.html
Last active August 29, 2015 14:20
Plotting map data using d3, Leaflet, and Open Street Map
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Leaflet + Open Street Map</title>
<!-- Leaflet + d3 libraries -->
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<!-- Leaflet CSS -->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
@williaster
williaster / cereal-detailed.csv
Last active November 30, 2020 04:15
Updating bar chart with dropdown
cereal manufacturer type calories protein fat sodium fiber carbs sugars shelf potassium vitamins serving size weight cups per serving
100%_Bran Nabisco C 70 4 1 130 10 5 6 3 280 25 1 0.33
100%_Natural_Bran Quaker Oats C 120 3 5 15 2 8 8 3 135 0 1 -1
All-Bran Kelloggs C 70 4 1 260 9 7 5 3 320 25 1 0.33
All-Bran_with_Extra_Fiber Kelloggs C 50 4 0 140 14 8 0 3 330 25 1 0.5
Almond_Delight Ralston Purina C 110 2 2 200 1 14 8 3 -1 25 1 0.75
Apple_Cinnamon_Cheerios General Mills C 110 2 2 180 1.5 10.5 10 1 70 25 1 0.75
Apple_Jacks Kelloggs C 110 2 0 125 1 11 14 2 30 25 1 1
Basic_4 General Mills C 130 3 2 210 2 18 8 3 100 25 1.33 0.75
Bran_Chex Ralston Purina C 90 2 1 200 4 15 6 1 125 25 1 0.67
@williaster
williaster / cereal.csv
Last active August 29, 2015 14:20
d3 scatterplot with tooltips
cereal manufacturer calories sugar
Apple_Cinnamon_Cheerios General Mills 110 10
Apple_Jacks Kelloggs 112 14
Cap'n'Crunch Quaker Oats 120 12
Cheerios General Mills 110 1
Cinnamon_Toast_Crunch General Mills 120 9
Cocoa_Puffs General Mills 110 13
Corn_Flakes Kelloggs 100 5
Corn_Pops Kelloggs 111 12
Froot_Loops Kelloggs 110 17
@williaster
williaster / cereal-detailed.csv
Last active August 29, 2015 14:20
Linked charts using Square's crossfilter.js library
100%_Bran Nabisco C 70 4 1 130 10 5 6 3 280 25 1 0.33
100%_Natural_Bran Quaker Oats C 120 3 5 15 2 8 8 3 135 0 1 -1
All-Bran Kelloggs C 70 4 1 260 9 7 5 3 320 25 1 0.33
All-Bran_with_Extra_Fiber Kelloggs C 50 4 0 140 14 8 0 3 330 25 1 0.5
Almond_Delight Ralston Purina C 110 2 2 200 1 14 8 3 -1 25 1 0.75
Apple_Cinnamon_Cheerios General Mills C 110 2 2 180 1.5 10.5 10 1 70 25 1 0.75
Apple_Jacks Kelloggs C 110 2 0 125 1 11 14 2 30 25 1 1
Basic_4 General Mills C 130 3 2 210 2 18 8 3 100 25 1.33 0.75
Bran_Chex Ralston Purina C 90 2 1 200 4 15 6 1 125 25 1 0.67