Skip to content

Instantly share code, notes, and snippets.

View nategood's full-sized avatar

Nate Good nategood

View GitHub Profile
@nategood
nategood / index.html
Last active November 6, 2015 18:02
Animate Multiple Paths
<!DOCTYPE html>
<html>
<head>
<title>Animate Multiple Paths</title>
<script src="http://d3js.org/d3.v3.min.js"></script>
<style type="text/css">
html, body {
font: 12px Helvetica;
margin: 0; padding: 0;
height: 100%;
@nategood
nategood / README.md
Last active April 26, 2019 14:29
DUI Trends and Ride Sharing

DUI Arrests in Philadelphia

Judges recently ordered Uber and Lyft to cease operations in Pittsburgh stating "The commission is ... charged with ensuring the public safety." I decided to investigate how ride-sharing has impacted one of the biggest public safety dangers on the road, drunk driving. Sadly, the data available for Pittsburgh is incomplete so I turned to our sister city, Philadelphia, as they have had ride-sharing available since mid 2012. If you have questions, please feel free to contact me at code@nategood.com or via twitter, @nategood.

This data visualization takes a look at DUI trends in the Philadelphia area for the last decade and highlights the time frames where various ride sharing options became available in the area. The x-axis represents time (on a monthly interval) and the y-axis represents normalized DUI activity. Click on the menu items on the r

@nategood
nategood / README.md
Last active April 26, 2019 14:30
Florida has better things to do than baseball

Florida has better things to do than baseball

Measuring fan loyalty with MLB attendance and wins

Visualization comparing MLB attendance vs. wins over the past decade. The viz loosely shows the obvious: win more ball games and more people will show up; however upon diving in there are a few interesting anomalies...

  • Cubs fans love misery Regardless of wins, everyone still shows up to see if the goat's curse will ever be lifted in Chicago.
  • The Twins have it backwards They were playing great ball prior to 2010, but having, at best, mediocre attendance. In 2010, attendance jumped significantly. Unfortunately for them, it was also their last winning season. Despite the poor performance, attendance has remained high, presumably due to the new ballbark that opened in 2010. Maybe they should have stuck with the old digs?
  • The Bay loves their Giants, the A's... not so much San Fran appears s
@nategood
nategood / index.html
Last active July 24, 2019 06:56
Image Data to SVG
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
html, body {
margin: 0; padding: 0;
}
@nategood
nategood / index.html
Last active August 29, 2015 14:02
Voronoi + Clip Path Oozing
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
html, body {
margin: 0; padding: 0;
}
@nategood
nategood / index.html
Last active August 29, 2015 14:02
Voronoi + Clip Path Fun
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style>
html, body {
margin: 0; padding: 0;
}
@nategood
nategood / remote_diff.sh
Created April 3, 2012 15:49
See diffs for remote branches.
#! /bin/bash
BRANCHES=""
BLIST=`git branch -a | grep remotes/origin | sed s_remotes/__`
for BRANCH in $BLIST; do
git --no-pager diff HEAD...$BRANCH
if [ "$?" = "0" ]; then
CLEAN_BRANCH=`echo $BRANCH | sed s_origin/__`
echo "Add Remote Branch $CLEAN_BRANCH to Kill List (y/n)?"
read INPUT