This package provides a convenient way of accessing the financial and economic data published by the Reserve Bank of New Zealand (RBNZ) on their website, https://www.rbnz.govt.nz/statistics. The data is provided in .xlsx and .xls files; this package will download those files and read them into R. A summary of the available data can be found at the end of this document.
The author has no affiliation with the RBNZ. The copyright for the data can be found at https://www.rbnz.govt.nz/copyright.
The function for downloading the data is getSeries
. This takes as its first argument the name of the series and will return a list containing the fields “meta” and “data” which are data frames containing the metadata and actual data, respectively. Each column of the “data” data frame corresponds to a row of the “meta” data frame (except the first which is “Date”).
library(RBNZ)
## Not evaluated in this vignette.
b1 <- getSeries('B1')
plot(b1$data$Date, b1$data$UK_pound_sterling, type = 'l')
Some of the datasets have different available formats. For example the B1 series contains exchange rate data in both daily and monthly form. The second argument of getSeries
allows the user to specify which option they want, e.g. getSeries('B1', 'monthly')
.
Each series has a help file so typing, for example ?B1
, will tell you what options, if any, are available.
For a full description of the arguments of getSeries
, see the package manual.
The majority of the datasets available are all stored in a similar format, with data organised by date and a standard set of metadata. There are a few series that do not follow this template, as indicated below, and for these the spreadsheets are just downloaded and read into a list of data frames, one for each sheet, with no organising or cleaning.
#> Series Standard_Format Description
#> B1 Exchange rates and TWI
#> B4 Foreign exchange turnover ($m daily averages)
#> B2 Wholesale interest rates
#> B3 Retail interest rates on lending and deposits
#> B6 Yields on loans
#> B20 New residential mortgage standard interest rates
#> B21 New residential mortgage special interest rates
#> B25 New interest bearing call savings account inter...
#> B26 New interest bearing term deposit interest rates
#> B27 New interest bearing term PIE deposits interest...
#> B10 TWI weights
#> B13 Historical TWI weights
#> C5 Sector lending (registered banks and non-bank l...
#> C12 Credit card balances
#> C13 Credit card spending
#> C30 New residential mortgage lending by loan-to-val...
#> C31 New residential mortgage lending by borrower type
#> C32 New and Existing Residential Mortgage Lending b...
#> C35 Residential mortgage loan reconciliation
#> C40 Residential mortgage lending by debt-to-income ...
#> C41 Residential mortgage borrower gross income (BGI)
#> C50 Money and credit aggregates (depository corpora...
#> C51 Other depository corporations analytical accounts
#> C52 Depository corporations analytical accounts
#> C55 Other financial corporations analytical accounts
#> C60 Credit conditions survey
#> C65 Bank Customer Lending flows
#> C66 Bank Customer Lending stocks
#> D3 X Open market operations
#> D10 X Influences on settlement cash
#> D12 X Standing facilities
#> F5 X Reserve Bank foreign currency assets and liabil...
#> R1 Reserve Bank balance sheet ($m)
#> R2 Reserve Bank statistical balance sheet ($m)
#> R3 Reserve Bank analytical accounts ($m)
#> F3 X Bank notes in the hands of the public
#> F4 X Coin mintings
#> S10 Banks: Balance sheet ($m)
#> S30 Banks: Assets - Loans by sector
#> S31 Banks: Assets - Loans by purpose ($m)
#> S32 Banks: Assets - Loans by product ($m)
#> S33 Banks: Assets - Loans fully secured by resident...
#> S34 Banks: Assets - Loans and Repos by Industry ($m)
#> S40 Banks: Liabilities - Deposits by sector ($m)
#> S41 Banks: Liabilities - Deposits by industry ($m)
#> S20 Banks: Summary income statement and related ratios
#> S21 Banks: Income statement ($m)
#> L1 Mismatch ratios
#> L2 Core funding ratio
#> L3 Face value of funding by residual maturity ($m)
#> J10 Insurance: Income Statement
#> J20 Insurance: Balance Sheet
#> T1 Non banks: Balance sheet ($m)
#> T4 Non banks: Funding and claims by sector ($m)
#> T11 Savings institutions: Balance sheet ($m)
#> T21 Deposit taking finance companies: Balance sheet...
#> T31 Non-deposit taking finance companies: Balance s...
#> T40 Funds under management ($m)
#> T41 Managed fund assets ($m)
#> T42 Life insurance ($m)
#> T43 KiwiSaver ($m)
#> T44 Other registered superannuation ($m)
#> T45 Retail unit trusts ($m)
#> T46 Cash management trusts ($m)
#> T47 Wholesale trusts ($m)
#> T48 Wholesale trusts and other funds ($m)
#> C21 Key household financial statistics ($m)
#> C22 Household balance sheet ($m)
#> D9 Government bond turnover
#> D30 Holdings of central government debt securities ...
#> D31 Non-resident holdings of individual bonds (nomi...
#> D35 Holdings of Kauri bonds (nominal value)
#> M1 Prices
#> M2 Consumption
#> M3 Investment
#> M4 Domestic trade
#> M5 Gross Domestic Product
#> M6 National saving (year ended March)
#> M7 Balance of Payments and International Investmen...
#> M8 Overseas trade
#> M9 Labour market
#> M10 Housing
#> M12 Population and migration
#> M13 Household inflation expectations
#> M14 Survey of expectations
#> E1 X New Zealand's official overseas reserves
#> E2 New Zealand's position with the IMF
#> SDDS X NZ's international reserves and foreign currenc...