Skip to content

Instantly share code, notes, and snippets.

View HanOostdijk's full-sized avatar

Han Oostdijk HanOostdijk

View GitHub Profile
@HanOostdijk
HanOostdijk / code.R
Last active November 27, 2018 14:03
filter on 'Value' column of OData v4 CBS tables
library(glue)
get_table_odata4 <- function (root=NULL,table="",subtable=NULL,query=NULL,verbose=F,encode=T) {
if (is.null(subtable)) {
subtable =""
} else subtable =glue("/{subtable}")
if (is.null(root))
root = "https://acc-ccb.cbs.nl"
if (is.null(query)) {
@HanOostdijk
HanOostdijk / question.txt
Last active September 30, 2018 13:44
ODataV4 CBS $select question
start UPDATE 30SEP2018:
In a comment on https://www.linkedin.com/feed/update/urn:li:activity:6449917998194008064
Dennis Ramondt (CBS Open Data) answers that the full $select functionality will be implemented only later
end UPDATE 30SEP2018
Support for $select in beta version CBS OData4
$select is not mentioned in the implementation document https://beta.opendata.cbs.nl/OData4/implement.html.
When using the construct on three different subtables of 900001NED it behaves differently as shown below.
Here I use R code but I get the same results when I use the urls in an internet browser.
@HanOostdijk
HanOostdijk / Get_Entity_question.txt
Last active October 1, 2018 11:58
OData version 4 CBS beta Get Entity
start UPDATE 01OCT2018
according to Dennis Ramondt (CBS Open Data) this is how it should work.
end UPDATE 01OCT2018
Question about the `Get Entity` in OData version 4 CBS beta
If I want to retrieve the 23rd row of the Observations subtable of 900001NED, I can do this
in two ways. The data I get back is the same but the format is different. See res1 and res2 in last part of gist.
Questions:
Remarks questions OData version 4 CBS beta.
- is there a place where I can post questions of this kind without troubling all followers of the LinkedIn group
`Centraal Bureau voor de Statistiek; Open Data` ?
- is there documentation about OData version 4 apart from the terrible https://lnkd.in/dkQMqWR and friends?
- Nesting of commands is not allowed?
The functions (?) `indexof` and `tolower` work standalone but using the filter
@HanOostdijk
HanOostdijk / description.md
Last active August 18, 2019 13:15
tests for OData V4 beta implementation CBS

The Rmd file describes some tests I did with the beta implementation of OData V4 for CBS (Statistics Netherlands).
The resulting pdf file can be found here.