init
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
input
output
.DS_Store
.gitignore
01_scrapeData.Rmd
01_scrapeData.html
02_numberOfAthletesVSGDP.Rmd
02_numberOfAthletesVSGDP.html
03_athletesBySport.Rmd
03_athletesBySport.html
README.md
rioAthletesVsGDP_EN.html
styles.html

README.md

Here is the R code and data used to create this short story on How countries differ in their sport representation at the Rio Summer Olympics.

The code and data provided is on github as a personal archive and because I wish to make the method used transparent. Frankly, if you wish to rerun this code be mentally prepared for major frustrations! One reason the code is pretty convoluted is one script (03_athletesBySport.Rmd) will generate the interactive graphic in 9 languages.

Because of time constraint and laziness, I needed to get something as quickly as possible. The code uses many experimental packages/features. Furthermore, it currently uses 3 packages that are really just for personal use. I didn't expect that much interest for these graphics and code! :-)

One could importantly reduce dependencies/number of packages. But for now, this is the messy code I used.

Exclusion of liability

The code has been quickly written to publish a story as rapidy as possible. No guarantee is offered of its completeness, correctness or up-to-date nature. No liability is accepted for damage or loss incurred from the use of this script or the information drawn from it. This exclusion of liability also applies to third-party content that is accessible via this offer.

License

Creative Commons License
Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Contact details

If you have questions please write an email to ducquang.nguyen(at)swissinfo.ch or on Twitter