Title: “Olympics Explorer” author: “Rupantar Rana” date: “Friday, April 03, 2015” output: pdf_document —%
**http://rpubs.com/RupantarRana/71324
Note: Initial data filtering and cleaning was done using MS Excel and SQL
Looking at the plots below, we find that population seems to be somewhat correlated with the total medals. China, US and Russia seem to be doing well in terms of the medals count and all these countries have high population. There clearly seems to be somesort of correlation between the GDP per capita and the medals won in the olympic. It does not mean that countries having high number of medals will also have high GDP per capita. It is interesting to note that in 2008, the 10 nations with the highest GDP won about 60% of the gold medals. High Human development index does seems to be a good indicator of the total medals tally especially for countries like USA, Canada and Norway. But again we do see some outliers here such as Ethiopia, Nigeria and Cameroon which have low HDI but large number of medals.
We can see that socio- economic indicators cannot be the sole predictor for olympic medals count. This supports the fact that sports is not only an economic but also a cultural reflection for a country.
library(plyr)
library(googleVis)
## Warning: package 'googleVis' was built under R version 3.1.3
op <- options(gvis.plot.tag="chart")
load("C:/Users/Rupantar/Desktop/courses in Spring USC/Modern Stats Learning/PC/PC 8/olympic.rda")
medalstally <- ddply(data, "Competing.Country", summarise, total.medals = sum(Total.Medals),
Population = max(Population), GDP = max(GDP), HDI = max(HDI))
medalstally$HDI <- round(medalstally$HDI, 2)
attach(medalstally)
## The following object is masked from package:googleVis:
##
## Population
Geomed = gvisGeoChart(medalstally, locationvar = "Competing.Country", colorvar = "total.medals")
plot(Geomed)
The above map shows the color gradient of the total medals for the countries.
Geopop = gvisGeoChart(medalstally, locationvar = "Competing.Country", colorvar = "Population")
plot(Geopop)
The above map shows the color gradient of the population for the countries.
GeoGDP = gvisGeoChart(medalstally, locationvar = "Competing.Country", colorvar = "GDP")
plot(GeoGDP)
The above map shows the color gradient of the GDP per capita for the countries.
GeoHDI = gvisGeoChart(medalstally, locationvar = "Competing.Country", colorvar = "HDI")
plot(GeoHDI)
The above map shows the color gradient of the Human development index for the countries.