README.md

econometer

A packaged set of R functions to query two (semi) public registries in the Netherlands:

  1. Insolvency registry (Dutch: Centraal Insolventieregister) and
  2. Energy certificates for building registry (Dutch: EP-online)

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.

Dutch insolvency registry

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().

Dutch registry with energy certificates for buildings

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.

Dashboard with energy efficiency labels for buildings in the city of the Hague

Shapefiles

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.

Installation

This package is not available on CRAN. To install, use the devtools package as follows:

install.package("devtools")
install_github("bedatadriven/econometer")
library("econometer")

License

The code in this package is released under the MIT license, see LICENSE.



bedatadriven/econometer documentation built on May 12, 2019, 10:03 a.m.