Creating a “zoo” object from OECD unemployment data

The data file “unemployment.csv” used below consists of data originally downloaded from the OECD Database website.

unemployment <- read.csv("unemployment.csv")

The following makes use of the zoo package. You may need to install it from CRAN using the code install.packages("zoo") if you want to run this on your computer. (The package is already installed on the notebook container, however.)


Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

unemployment.z <- zoo(unemployment[,2:7],
[1] 30  6
[1] "zoo"
           Germany France Italy Netherlands Belgium Luxembourg
1970-12-31   0.557  2.477 4.000       0.868   1.913         NA
1971-12-31   0.689  2.712 4.001       1.213   1.848         NA
1972-12-31   0.912  2.806 4.711       2.114   2.350         NA
1973-12-31   1.000  2.690 4.691       2.151   2.408         NA
1974-12-31   2.132  2.853 3.942       2.624   2.523      0.067
1975-12-31   3.965  4.028 4.312       3.772   4.522      0.200
[1] "1970-12-31"
[1] "1999-12-31"
end(unemployment.z) - start(unemployment.z)
Time difference of 10592 days
# Saved for later use:

Downloadable R script and interactive version


The link with the “jupyterhub” icon directs you to an interactive Jupyter1 notebook, which runs inside a Docker container2. There are two variants of the interative notebook. One shuts down after 60 seconds and does not require a sign it. The other requires sign in using your ORCID3 credentials, yet shuts down only after 24 hours. (There is no guarantee that such a container persists that long, it may be shut down earlier for maintenance purposes.) After shutdown all data within the container will be reset, i.e. all files created by the user will be deleted.4

Above you see a rendered version of the Jupyter notebook.5


For more information about Jupyter see The Jupyter notebooks make use of the RKernel package.


For more information about Docker see The container images are run with docker spawner.


ORCID is a free service for the authentication of researchers. It also allows to showcase publications and contributions to the academic community such as peer review.. See for more information.


The Jupyter notebooks come with NO WARRANTY whatsoever. They are provided for educational and illustrative purposes only. Do not use them for production work.


The notebook is rendered with the help of the nbsphinx extension.