Economic time series data quiz as a shiny app for mobile phones

October 22, 2017

(This article was first published on Economics and R - R posts, and kindly contributed to R-bloggers)

Nowadays, a lot of interesting time series data is freely available that allows us to compare important economic, social and environmental trends across countries.

I feel that one can learn a lot by surfing through the data sections on the websites of institutions like the Gapminder Foundation, the World Bank, or the OECD.

At the same time, I am quite a big fan of learning facts with quiz questions. Since my internet search did not yield any apps or websites that present these interesting time series in forms of quizzes, I coded a bit in R and generated a Shiny app that creates such quizzes based on OECD data and some Eurostat data.

Here is a screenshot:

The quiz is hosted here:

Why not do some supervised learning for your biological neural network, and take a look? I would recommend visiting the site with your mobile phone, though, as it looks nicer.

From my own experience, there is a bit of guessing involved at first. Yet, after having solved some questions, performance quickly improved, as did my understanding of plausible dimensions, time trends and likely differences among countries for the various measures.

The app is based on a corresponding R package The package is more complex than required for the current app, as I also was experimenting with different forms of quizzes, e.g. questions that ask you to rank different countries or sectors. Yet, I ended up prefering the current form of the quiz. The app runs in a docker container specified here:

There exists an API and even an R package to download OECD data. Yet, I found it more convenient to retrieve the underlying OECD data via some web scrapping using RSelenium. This got me also some detailed descriptions of the different time series. The data sets used in my app and the web-scrapping scripts are given in the following Github repository

To leave a comment for the author, please follow the link and comment on their blog: Economics and R - R posts. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)