tmap-book icon indicating copy to clipboard operation
tmap-book copied to clipboard

Dataset candidate: world innovation data

Open mtennekes opened this issue 5 years ago • 4 comments

I came across another potentially interesting dataset, the world innovation index. It is an index based 7 pillars, from which the first 5 are related to input (what does the government in order to increase innovation), and the latter 2 to output (what innovation does the society create).

There is a yearly time series from 2013 to 2019:

Rplot

Rplot02

Also interesting is the difference between 2019 and 2013:

Rplot01

As you can see, there are quite some countries without data. Let me know if this could be useful for the book. If so, I will clean up the script and make it reproducible.

mtennekes avatar Sep 09 '20 07:09 mtennekes

I like this dataset. I agree that having this number of missing values could be seen as an issue, but, on the other hand, it is often the case when working with real data...

Nowosad avatar Sep 11 '20 10:09 Nowosad

Done! See https://github.com/r-tmap/tmap-data/blob/master/R/02-prepare-world-innovation.R

This data is a 3d array: country iso3 code x pillar x year. Which can be cast into a vector data stars object.

I've used wm (used to create world_all) as shape to join the data with, with a better coverage than tmap's World; still a few missing values, but less. Just discovered the countrycode package. Highly recommended!

Currently, tmap only supports visualization of a slice of vector data cubes (see https://github.com/mtennekes/tmap/issues/458). Ideally, it should be possible to do tm_facets(by = c("year', "pillar")).

Where shall we store these datasets? In the book repo, via a data-package, or ...?

mtennekes avatar Nov 03 '20 17:11 mtennekes

Awesome @mtennekes ! Regarding the question... I have some ideas - we can discuss them during our next meeting.

Nowosad avatar Nov 07 '20 10:11 Nowosad

We can decide it later. For now - we should keep the data in the book repo. In the future, the data can either go to the tmap repo or some new one (e.g., tmapdata.

Nowosad avatar Nov 26 '20 15:11 Nowosad