epbd_downloadCertificates: Download energy certificates at the start of the current...

Description Usage Arguments Details Value Note References

Description

Download energy certificates at the start of the current month

Usage

1
epbd_downloadCertificates(postcode.min = 1000L, postcode.max = 9999L)

Arguments

postcode.min

integer value representing the smallest postcode to download (default: 1000)

postcode.max

integer value representing the largest postcode to download (default: 9999); must be greater than postcode.min

Details

The registry with ‘energieprestatielabels’ uses a webservice based on the SOAP protocol. There are two types of queries which you can send to the webservice:

This function implements the first query: retrieve all certificates at the start of the month. The arguments postcode.min and postcode.max can be used to download certificates from a specific region. These arguments accept only the 4 digit numeric part of Dutch postal codes.

Unfortunately, the webservice doesn't actually return an XML document with the mutations, it returns an XML document with only a link to the (zipped) XML document on the server. So this function first queries the webservice to retrieve the URL to the archive, then downloads and extracts the archive, and finally reads the contents into an xml_document object.

Value

A data frame with the contents of the energy certificates.

Note

This functions calls a Python script in the ‘inst/tools’ folder which uses a SAX-based XML parser to extract the certificate data from the huge XML file which is returned by this rather stupid service.

References

The registry can be accessed online at http://www.ep-online.nl/.


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