The Elite Runners of the NYC Marathon
Since 1970, the NYC marathon has been attracting runners. In 1970, of 127 entrants, only 55 men finished; the sole female entrant dropped out due to illness. Winners were given inexpensive wristwatches and recycled baseball and bowling trophies. The entry fee was $1 and the total event budget was $1,000.
The New York Road Runners Club has a rich history. Over the past 58 years, they've grown from a local running club to become the world’s premier community running organization with a mission to help and inspire people through running.
The website http://www.nyrr.org contains a database of information on all runners since 1970. The 2016 marathon had 50,000 runners. The more recent years have more marathon data than the earlier years. The start of using a computer chip for each runner increased the data available.
The Webscraping Process
This project focuses on the elite runners - the top 100 women finishers and top 100 men finishers, from 1999 to 2015. Prior to 1999, there was less data available on the race times for different segments of the race.
The Python library mechanize was used for HTML form filling and Beautiful Soup was used to parse out the data. A form had to be submitted for each top 100 men, each top 100 women, and then for each year. Different years had different formats of the table returned. Unicode characters were in random places so all items had to be checked.
Once data was parsed it was outputted to a file. Then it was read in with R and loaded into a dataset. The EDA analysis looked at the mean marathon time of men, women for each year. It looked at correlations in the data and mean time by State.