Dataset candidate: world innovation data
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:


Also interesting is the difference between 2019 and 2013:

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.
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...
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 ...?
Awesome @mtennekes ! Regarding the question... I have some ideas - we can discuss them during our next meeting.
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.