[7/23/2012 Addition: I’ve updated these plots using ggplot2 to look nicer. They can be found here.]
Recently, I saw this pretty cool chart at the Washington Post (I originally saw the chart at this wonderful blog here) about the ages of olympians from the past three olympics. I commented to myself that I thought it would be more interesting with boxplots of the data, rather than simple ranges, and I also wondered what it would look like if we used data from all of the past olympics.
So, I wrote some R code and began scraping sports-reference.com/olympics to get a data set with all of the olympic athletes from all of the games. This took me quite some time (and work kept getting in the way), but I eventually got it right and collected the data.
Here are some of the resulting graphs:
Below is a graph of side-by-size boxplots of age for each sport by gender with blue for male, pink for female, and green for mixed competition. And no the 11 year old female swimmer is not a typo like I originally thought.
The previous graph was kind of messy, so I’ve sorted this one by median age. Not surprisingly female gymnastics and rhythmic gymnastics have the lowest median ages of competitors while equestrianism has the highest median age of competitor at over 35 years of age.
The previous two graphs were only for the years of 2000-2008, so I re-did the previous graph using data from all of the olympics. Since the obvious question arising from this graph is is “What is roque?”, I have saved you the trouble of googling it by providing a wikipedia link for roque.
This graph is boxplots of age by year with the color representing the host continent.
[7/15/2012 Correction: The original post had the 1956 box colored blue for Europe. However, commenter Mules points out that 1956 should actually be yellow for Australia. They are correct and the correction has been made. However, as I point out in response, I’m not totally wrong: The equestrian events had to be held in Stockholm, Sweden due to quarantine restrictions.]
[7/23/2012 Correction: The graph below had some mistakes in it, including an olympian who was over 90. This was pointed out by Kate, and has been corrected.]