the thlCube function now returns an object which includes
library(openthl)
url <- "https://sampo.thl.fi/pivot/prod/fi/toitu/ennakko3/fact_toitu_ennakko.json"
cube <- openthl::thlCube(url)
names(cube$dimensions)
attr(cube$dimensions[[1]], "root") # root of the first dimension
View(cube$dimensions[[1]]) # look at the first dimension
Methods can now be written which utilise the cube object to build queries which
For example the following methods could be implemented:
Some choices need to be made regarding how the user refers to the dimensions and measures, i.e. whether to use ID's or labels. It may make sense to use ID's when select():ing. A stage could be referred to by for example .. This needs some consideration and exploration on what is most straight forward.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.