Skip to content

Instantly share code, notes, and snippets.

View mlb_stadium.json
[{"team":"Anaheim Angels","address":"2000 Gene Autry Way, Anaheim, CA. 92806","lat":33.799572,"lng":-117.889031},{"team":"Arizona Diamondbacks","address":"P.O. Box 2095, Phoenix, AZ. 85001","lat":33.452922,"lng":-112.038669},{"team":"Atlanta Braves","address":"P.O. Box 4064, Atlanta, GA. 30302","lat":33.74691,"lng":-84.391239},{"team":"Baltimore Orioles","address":"333 W. Camden Street, Baltimore, MD. 21201","lat":39.285243,"lng":-76.620103},{"team":"Boston Red Sox","address":"4 Yawkey Way, Boston, MA 02215","lat":42.346613,"lng":-71.098817},{"team":"Chicago Cubs","address":"1060 Addison Street, Chicago, IL 60616","lat":41.947201,"lng":-87.656413},{"team":"Chicago White Sox","address":"333 W. 35th Street, Chicago, IL 60616","lat":41.830883,"lng":-87.635083},{"team":"Cincinnati Reds","address":"100 Cinergy Field, Cincinnati, OH 45202","lat":39.107183,"lng":-84.507713},{"team":"Cleveland Indians","address":"2401 Ontario Street, Cleveland, OH 44115","lat":41.495149,"lng":-81.68709},{"team":"Colorado Rockies","ad
View README.md

mean (red) and total (black) rWAR by birth-state.

@bdilday
bdilday / README.md
Last active Aug 29, 2015
expansion of the US
View README.md

Expansion of the US. Map is zoomable.

@bdilday
bdilday / README.md
Last active Aug 29, 2015
rWAR (aggregate) weighted mean geographic center
View README.md

A map showing the time-evolution geographic center of the US, weighted by aggregate rWAR.

@bdilday
bdilday / README.md
Last active Aug 29, 2015
rWAR (year-to-year) weighted mean geographic center
View README.md

A map showing the time-evolution geographic center of the US, weighted by aggregate rWAR.

View README.md

This gist collects some ipython notebooks to compute baseball prospectus' CSAA and DRA using retrosheet data. The database queries are in Python and the model fitting in R.

View README.md

A visualization of some data from the 2010 U.S. Census. This was created for the University of Illinois Coursera class on data visualization.

My submission uses data on the population and area of US states, based on the 2010 census, and was obtained from the census.gov website. The data are displayed using bar charts built with d3 and the visualization includes an interactive sorting feature and a text display if you hover the mouse over a bar. Because area and volume are less effective in communicating quantitative differences than length, I was interested in the idea of using length to display area or volume. I applied the guideline of using desaturated colors for the fills of the bars. I included density as a sorting option, but didn't display it as a bar since it is computable from population and area. This is motivated by Edward Tufte's guidelines of removing redundent elements of the visualization.

@bdilday
bdilday / README.md
Created Aug 8, 2015
letter-to-letter network
View README.md

A visualization of letter-to-letter network data. This was created for the University of Illinois Coursera class on data visualization.

These data were obtained from the SCOWL (Spell Checker Oriented Word Lists) database, available here, http://wordlist.aspell.net. I generated a medium-sized database of English words, capital words, and abbreviations, and then computed the number of occurrences of letter #1 being succeeded by letter #2. The nodes are connected by chords, and the width of the chords represents the fraction of links from letter #1 that terminate on letter #2. The angle of the arc for each letter represents the fraction of all letters. Hovering the mouse on an arc highlights the links from that arc and fills the table with the letter-to-letter fractions. Hovering the mouse on a chord displays the letter-to-letter fractions.

@bdilday
bdilday / LICENSE
Last active Oct 23, 2017
building a crossword - datavis.is.kewl
View LICENSE
MIT License
Copyright (c) 2017 Ben Dilday
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@bdilday
bdilday / HOF_metrics.csv
Created Sep 13, 2015
HOF selector - bar chart - test ii
View HOF_metrics.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 6 should actually have 31 columns, instead of 27. in line 5.
pname,plid,birthYear,minyr,fWar,rWar,fwa2,rwa2,fwa3,rwa3,fwa4,rwa4,fwa5,rwa5,fwa7,rwa7,fwb3,rwb3,fwb5,rwb5,fwb7,rwb7,fDoom,rDoom,fJAWS,rJAWS,ibat,hofmon,hofstd,ithisyear,poz100
JackMorris,morrija02,1955,1977,52.50,43.90,21.10,21.00,10.10,11.60,3.00,5.20,0.80,1.00,-0.00,-0.00,15.00,16.00,22.40,25.20,29.70,32.60,55.49,53.69,41.10,38.25,0,122,39,0,0
NoodlesHahn,hahnno01,1879,1899,39.60,46.00,25.40,33.90,19.40,27.90,13.40,21.90,7.40,15.90,0.40,5.00,20.20,25.20,31.90,39.50,38.70,46.00,55.49,65.97,39.15,46.00,0,62,31,0,0
WarrenSpahn,spahnwa01,1921,1942,81.30,92.70,44.60,58.60,27.40,41.40,14.10,26.20,5.90,15.40,-0.00,5.20,19.60,26.20,30.90,38.50,40.80,49.70,78.82,95.05,61.05,71.20,0,260,66,0,43
KennyRogers,rogerke01,1964,1989,46.80,51.20,17.00,24.60,6.70,14.50,1.50,8.10,-0.00,3.30,-0.00,0.50,13.50,18.30,20.60,28.10,27.30,35.20,49.98,60.86,37.05,43.20,0,66,29,0,0
RickWise,wiseri01,1945,1964,49.80,32.20,21.70,11.20,11.70,3.80,4.80,1.10,1.00,-0.00,-0.00,-0.00,16.00,12.50,24.80,18.70,32.00,24.50,56.14,40.10,40.90,28.35,