The Olympic medal table was not that surprising, bigger richer countries get more medals than smaller countries. The top ten from a few days before the closing ceremony was:
I wanted to calculate medal results per capita so I converted the medals won into medal points, gold = 3 points, silver = 2 and bronze = 1 and calculated the total for each country. I then divided that total by the population of each country to obtain a list of medal points per head of population. This produces a list in which it is almost impossible for large countries to get into the top ten. I think it is a less predictable and so a more interesting list:
Producing this list required some web scraping to get the medal table and UN estimates of populations see here for an example from my code blog showing how to scrape a table from a web page. The actual calculations were done in Excel - it is easy to look down on Excel but it is quick and easy to use in some limited situations.