Closed edwindj closed 3 years ago
This generates an error:
library(cbsodataR)
d <- cbs_get_data("24011NED", base_url = "http://dataderden.cbs.nl")
## cannot open URL 'https://opendata.cbs.nl/ODataApi/odata/24011NED': HTTP status was '404 Not Found'Failing: http://opendata.cbs.nl/ODataApi/odata/24011NED
## Retrying...cannot open URL 'https://opendata.cbs.nl/ODataApi/odata/24011NED': HTTP status was '404 Not Found'Error in open.connection(con, "rb") :
## cannot open the connection to 'http://opendata.cbs.nl/ODataApi/odata/24011NED'
Current fixes:
a)
d <- cbs_get_data("24011NED", catalog="AZW")
# catalog can be found with
catalogs <- cbs_get_catalogs()
# or
datasets <- cbs_get_datasets(catalog=NULL) # setting to NULL, shows tables from all catalogs.
b)
d <- cbs_get_data("24011NED", base_url = "http://dataderden.cbs.nl", show_progress=FALSE)
c)
d <- cbs_get_data("24011NED", base_url = "http://dataderden.cbs.nl", verbose=TRUE)
## Retrieving data from table '24011NED'
## http://dataderden.cbs.nl/ODataFeed/odata/24011NED/TypedDataSet?$format=json
##
## Reading...
## https://dataderden.cbs.nl/ODataFeed/odata/24011NED/TypedDataSet?$format=json&$skip=10000
##
## Writing...
##
## Done!
Fixed in 0.5.2 (github version). Will close it, when on CRAN
cbs_get_data
fails, trying to connect tohttp://opendata.cbs.nl
. Fixed in version0.5.2
.Remedies for now:
catalog
parameter, that works... (and was intended to make the base_url obsolete): https://edwindj.github.io/cbsodataR/reference/cbs_get_data.htmlverbose=TRUE
, for now.progress=TRUE
for now.Thanks to Mirjam Zengers for reporting