← Blog · 2026-06-17

NZ inflation, decomposed: RBNZ + OECD in 10 lines

worked-example inflation rbnz oecd python

The same macro story lives in two places: Stats NZ / OECD publish CPI as a standard quarterly series, and RBNZ publishes the Official Cash Rate the Reserve Bank actually sets. Here's how to pull both through eolas and line them up.

import pandas as pd
from eolas_data import Client

client = Client("your_api_key")

cpi = client.get("nz_cpi")  # OECD — annual % change, quarterly
ocr = client.get("rbnz_b2_wholesale_rates_monthly")

# CPI is quarterly; OCR is monthly — forward-fill OCR onto CPI dates for a simple overlay
cpi["date"] = pd.to_datetime(cpi["date"])
ocr["date"] = pd.to_datetime(ocr["date"])
merged = cpi.merge(
    ocr[["date", "cash_rate_official_cash_rate_ocr"]],
    on="date",
    how="left",
).sort_values("date")

print(merged.tail())

Both responses carry licence metadata in the X-Eolas-Licence and X-Eolas-Attribution headers (or in the dataset catalogue if you're browsing first). OECD data is query-only on eolas — fine for analysis, not for bulk redistribution.

What this shows: CPI YoY ran around 3% in early 2026 while the OCR sat lower — the kind of join analysts build in spreadsheets, except the dates are already parsed and the column names are stable.

Browse the datasets → · Get a free API key →

Try it free

Get an API key in seconds — 10 requests per month on the Free plan, no credit card.

Get your free API key →