A packaged set of R functions to query two (semi) public registries in the Netherlands:
These two registries can be accessed by requesting a username and password and queried using the lovely SOAP protocol. This R package saves you from having to deal with this arcane protocol, but you still need to request permission to access the registries and to accept their terms of service.
Also included is a function bag_geocode()
to geocode a Dutch street address to EPSG:28992 coordinates.
No login is required for this service.
This package was created as part of a project called "Econometer" for the Economics department of the city of The Hague, hence the name of the package.
This registry publishes details on insolvency cases in the Netherlands. Once you have received login credentials from the registry, a typical workflow in R will be the following:
library("econometer")
# save login credentials for this session:
cir_login(username = "foo", password = "bar")
# retrieve the identifier of all publications in the last 4 weeks:
publications <- cir_searchByDate(Sys.Date() - 28, court = "Den Haag")
# retrieve details of each publication:
cases <- cir_getCase(publications)
# convert the list of XML objects in 'cases' to a data.frame:
cases.df <- cir_extractCaseDetails(cases)
The cir_searchByDate
and cir_getCase
implement the registry (SOAP) commands
with the same name. Note that the cir_searchByDate()
searches by court. A list
of courts in the Netherlands is returned by cir_getCourtNames()
.
The acronym EPBD seems to stem from the European Energy Performance of Buildings Directive.
Once you have received login credentials from the registry, a typical workflow in R will be the following:
library("econometer")
# save login credentials for this session:
epbd_login(username = "foo", password = "bar")
# download all certificates in The Hague at the start of the current month into a data frame:
certificates <- epbd_downloadCertificates(postcode.min = 2491, postcode.max = 2599)
# or download all new certificates published yesterday:
certificates <- epbd_getLabelMutations(Sys.Date() - 1)
This allows you to build dashboards like the one shown below.
The shapefiles for Buurten, Wijken and Stadsdelen are provided by Antoine Gribnau from the gemeente Den Haag as the shapefiles on their geo-portal have been tranformed to WGS84, but with a substantial error.
These shapefiles now line up exactly with the Wijk and buurtkaart from the CBS.
This package is not available on CRAN. To install, use the devtools package as follows:
install.package("devtools")
install_github("bedatadriven/econometer")
library("econometer")
The code in this package is released under the MIT license, see LICENSE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.