USAC Event data 2005 - 2015

USA Cycling event data.

I got started looking at USAC data becuase I was interested in the results of the 2015/16 USA Cyclocross nationals. Steve Tilfrd accused the officials of incoretly enforcing the 80% rule. see http://stevetilford.com/2016/01/07/the-good-bad-and-ugly-cyclocross-nationals/ I got side track and started getting details on all events and thought I would look at this a bit first.

As is always the case this data is not perfect, it may be incomplete and or incorrect. This data set includes all events, road, cross, mtb, track.... any competative event.

Top event Directors

In [13]:
import pandas as pd
import matplotlib
matplotlib.style.use('ggplot')

df = pd.read_csv("data/usac_event_2005_2015.csv")
In [14]:
dg = df.groupby('director')['director'].count()
dg.sort_values(ascending=False).head(10)
Out[14]:
director
David Berger           254
Robert Leibold         209
Tim Molyneaux          123
Don Edberg             119
Brian Holzhausen        97
William 'JR' Petsko     84
Neal Boyd               75
Laszlo Vajtay           65
Chip Berezny            62
Richard Ruoff           61
Name: director, dtype: int64

Top states

In [52]:
%matplotlib inline
import matplotlib.pyplot as plt
import matplotlib
from data_tools import states_abbr
matplotlib.style.use('ggplot')

ds = df[df['state'].isin(states_abbr)]
ds = ds.groupby('state')['state'].count()
ds.sort_values(ascending=False).head(5)
plt.figure()
ds.sort_values(ascending=False).hist(bins=50)
Out[52]:
<matplotlib.axes._subplots.AxesSubplot at 0x11cb343c8>
In [54]:
from data_tools import states_abbr
badstate = df[~df['state'].isin(states_abbr)]
badstate.to_csv('data/bad_state.csv')

How about a Choropleth map now.

In [4]:
from data_tools import states_name_abbr
In [5]:
states_name_abbr
Out[5]:
{'Alabama': 'AL',
 'Alaska': 'AK',
 'American Samoa': 'AS',
 'Arizona': 'AZ',
 'Arkansas': 'AR',
 'California': 'CA',
 'Colorado': 'CO',
 'Connecticut': 'CT',
 'Delaware': 'DE',
 'District of Columbia': 'DC',
 'Florida': 'FL',
 'Georgia': 'GA',
 'Guam': 'GU',
 'Hawaii': 'HI',
 'Idaho': 'ID',
 'Illinois': 'IL',
 'Indiana': 'IN',
 'Iowa': 'IA',
 'Kansas': 'KS',
 'Kentucky': 'KY',
 'Louisiana': 'LA',
 'Maine': 'ME',
 'Maryland': 'MD',
 'Massachusetts': 'MA',
 'Michigan': 'MI',
 'Minnesota': 'MN',
 'Mississippi': 'MS',
 'Missouri': 'MO',
 'Montana': 'MT',
 'National': 'NA',
 'Nebraska': 'NE',
 'Nevada': 'NV',
 'New Hampshire': 'NH',
 'New Jersey': 'NJ',
 'New Mexico': 'NM',
 'New York': 'NY',
 'North Carolina': 'NC',
 'North Dakota': 'ND',
 'Northern Mariana Islands': 'MP',
 'Ohio': 'OH',
 'Oklahoma': 'OK',
 'Oregon': 'OR',
 'Pennsylvania': 'PA',
 'Puerto Rico': 'PR',
 'Rhode Island': 'RI',
 'South Carolina': 'SC',
 'South Dakota': 'SD',
 'Tennessee': 'TN',
 'Texas': 'TX',
 'Utah': 'UT',
 'Vermont': 'VT',
 'Virgin Islands': 'VI',
 'Virginia': 'VA',
 'Washington': 'WA',
 'West Virginia': 'WV',
 'Wisconsin': 'WI',
 'Wyoming': 'WY'}
In [ ]: