Skip to content

Instantly share code, notes, and snippets.

@lverweijen
Last active June 4, 2020 20:44
Show Gist options
  • Save lverweijen/bc490deda31856a56247af3cd48d594f to your computer and use it in GitHub Desktop.
Save lverweijen/bc490deda31856a56247af3cd48d594f to your computer and use it in GitHub Desktop.
Query on statline
opendata_service <- ODataQuery$new("http://beta-odata4.cbs.nl/")
entity_datasets <- opendata_service$path("Datasets")$select("Identifier", "Title")
datasets <- entity_datasets$all(simplifyVector = TRUE)
head(datasets)
entity_81589NED <- opendata_service$path("CBS")$path("81589NED")$path("Observations")
dataset_81589NED <- entity_81589NED$all(simplifyVector = TRUE)
head(dataset_81589NED)
@edwindj
Copy link

edwindj commented Jun 4, 2020

Same result, little rephrasing:

entity_81589NED  <- opendata_service$path("CBS", "81589NED", "Observations")
dataset_81589NED <- entity_81589NED$all(simplifyJSON = TRUE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment