Download Data from the Reserve Bank of New Zealand Website

Provides a convenient way of accessing data published by the Reserve Bank of New Zealand (RBNZ) on their website, < https://www.rbnz.govt.nz/statistics>. A range of financial and economic data is provided in spreadsheet format including exchange and interest rates, commercial lending statistics, Reserve Bank market operations, financial institution statistics, household financial data, New Zealand debt security information, and economic indicators. This package provides a method to download those spreadsheets and read them directly into R.


RBNZ

The RBNZ package allows users to download data from the Reserve Bank of New Zealand website.

An overview of the package can be found on CRAN or in vignettes/Overview.Rmd.

Installation

## Install from CRAN:
install.packages('RBNZ')

## Install the development version from GitHub:
## install.packages("devtools")
devtools::install_github("rntq472/RBNZ")

Usage

The main entry point is the getSeries function where users can choose a data series to retrieve:


library(RBNZ)

m1 <- getSeries('M1')

Note - the RBNZ website has been put behind Cloudflare so now there are some extra steps for using this package.

One option is to email the RBNZ and request that your (static) public IP address be whitelisted. The email to contact is listed here.

The second option is to download the necessary files from the RBNZ website manually through your browser and then use this package to read and organise them. This can be done by downloading the spreadsheets needed and saving them in a given directory without changing their file names. This could be done from the individual series page or from the summary page.

For example for the B1 series a user could download and save the following spreadsheets:

  • hb1-daily-1973-1998.xlsx
  • hb1-daily-1999-2017.xlsx
  • hb1-daily.xlsx

They could then load the data as follows:


library(RBNZ)

dat <- getSeries('B1', destDir = 'path_to_downloaded_files', cacheOnly = TRUE)

If you are always having to do this then you can specify the download path in your .Rprofile using options(RBNZ.destDir = "path/to/stored/files").

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("RBNZ")

3.0.0 by Jasper Watson, a year ago


Report a bug at https://github.com/rntq472/RBNZ/issues


Browse source code at https://github.com/cran/RBNZ


Authors: Jasper Watson [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports httr, lubridate, readxl, rvest, xml2

Suggests knitr, rmarkdown


See at CRAN