Skip to content

Instantly share code, notes, and snippets.

View williaster's full-sized avatar
🧑‍🚀

Chris Williams williaster

🧑‍🚀
View GitHub Profile
@williaster
williaster / cereal-detailed.csv
Last active August 29, 2015 14:20
Linked charts using Square's crossfilter.js library
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 November 30, 2020 04:15
Updating bar chart with dropdown
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 / 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 / boroughs.geo.json
Created May 25, 2015 21:40
Plotting map data with d3.js and topojson.js
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@williaster
williaster / NYC_crime_sampled-with-random-days_n10000.csv
Created May 26, 2015 05:55
Linking map data to an interactive timeline in d3
We can't make this file beautiful and searchable because it's too large.
,longitude,latitude,TOT,CR,TIME,MO,YR
11445,-73.815096691856,40.730042983825,1,GRAND LARCENY,08/18/2013,8,2013
28999,-73.952908646328,40.712911787046,1,BURGLARY,12/13/2013,12,2013
47769,-73.965113813189,40.639836513136004,1,GRAND LARCENY,03/30/2013,3,2013
41099,-73.940220588697,40.686660435376,1,FELONY ASSAULT,10/08/2013,10,2013
5526,-74.01374696977,40.643527230173,1,FELONY ASSAULT,01/12/2013,1,2013
80610,-73.93018764409601,40.678047177018,1,GRAND LARCENY,09/28/2013,9,2013
61115,-73.852676931635,40.825408292824996,1,FELONY ASSAULT,03/03/2013,3,2013
30888,-74.01304006111201,40.621802314197,1,GRAND LARCENY OF MOTOR VEHICLE,12/07/2013,12,2013
56956,-73.867258463997,40.831623571388,1,ROBBERY,01/29/2013,1,2013
@williaster
williaster / NYC_crime_sampled-with-random-days_n10000.csv
Created May 26, 2015 06:05
Linking map data to an interactive timeline in d3
We can't make this file beautiful and searchable because it's too large.
,longitude,latitude,TOT,CR,TIME,MO,YR
11445,-73.815096691856,40.730042983825,1,GRAND LARCENY,08/18/2013,8,2013
28999,-73.952908646328,40.712911787046,1,BURGLARY,12/13/2013,12,2013
47769,-73.965113813189,40.639836513136004,1,GRAND LARCENY,03/30/2013,3,2013
41099,-73.940220588697,40.686660435376,1,FELONY ASSAULT,10/08/2013,10,2013
5526,-74.01374696977,40.643527230173,1,FELONY ASSAULT,01/12/2013,1,2013
80610,-73.93018764409601,40.678047177018,1,GRAND LARCENY,09/28/2013,9,2013
61115,-73.852676931635,40.825408292824996,1,FELONY ASSAULT,03/03/2013,3,2013
30888,-74.01304006111201,40.621802314197,1,GRAND LARCENY OF MOTOR VEHICLE,12/07/2013,12,2013
56956,-73.867258463997,40.831623571388,1,ROBBERY,01/29/2013,1,2013
@williaster
williaster / NYC_crime_sampled-with-random-days_n10000.csv
Created May 26, 2015 06:11
Linking map data to an interactive timeline in d3
We can't make this file beautiful and searchable because it's too large.
,longitude,latitude,TOT,CR,TIME,MO,YR
11445,-73.815096691856,40.730042983825,1,GRAND LARCENY,08/18/2013,8,2013
28999,-73.952908646328,40.712911787046,1,BURGLARY,12/13/2013,12,2013
47769,-73.965113813189,40.639836513136004,1,GRAND LARCENY,03/30/2013,3,2013
41099,-73.940220588697,40.686660435376,1,FELONY ASSAULT,10/08/2013,10,2013
5526,-74.01374696977,40.643527230173,1,FELONY ASSAULT,01/12/2013,1,2013
80610,-73.93018764409601,40.678047177018,1,GRAND LARCENY,09/28/2013,9,2013
61115,-73.852676931635,40.825408292824996,1,FELONY ASSAULT,03/03/2013,3,2013
30888,-74.01304006111201,40.621802314197,1,GRAND LARCENY OF MOTOR VEHICLE,12/07/2013,12,2013
56956,-73.867258463997,40.831623571388,1,ROBBERY,01/29/2013,1,2013
@williaster
williaster / .block
Created June 24, 2016 18:10
Collision Detection
license: gpl-3.0
@williaster
williaster / .block
Last active October 10, 2016 23:26
Weighted Voronoi (sort of)
license: mit