Readrba
RBA data, but tidy
Install / Use
/learn @MattCowgill/ReadrbaREADME
readrba <img src="man/figures/logo.png" align="right" height="139" />
<!-- badges: start --> <!-- badges: end -->Get data from the Reserve Bank of Australia in a tidy tibble.
Installation
Install from CRAN using:
install.packages("readrba")
Or install the development version from GitHub:
remotes::install_github("mattcowgill/readrba")
Examples
library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.4.3
library(dplyr)
#> Warning: package 'dplyr' was built under R version 4.4.3
library(readrba)
Quick examples
With just a few lines of code, you can get a data series from the RBA and visualise it!
Here’s the unemployment rate:
unemp_rate <- read_rba(series_id = "GLFSURSA")
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
unemp_rate %>%
ggplot(aes(x = date, y = value)) +
geom_line() +
theme_minimal() +
labs(title = "Unemployment rate (actual)")
<img src="man/figures/README-unnamed-chunk-4-1.png" width="672" />
And you can also easily get the RBA’s public forecasts - from 1990 to present - and visualise those. Here’s every public forecast of the unemployment rate the RBA has made over the past three decades:
unemp_forecasts <- rba_forecasts() %>%
filter(series == "unemp_rate")
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
unemp_forecasts %>%
ggplot(aes(x = date,
y = value,
group = forecast_date,
col = forecast_date)) +
geom_line() +
theme_minimal() +
labs(title = "Unemployment rate (RBA forecasts)")
<img src="man/figures/README-unnamed-chunk-5-1.png" width="672" />
Reading RBA data
There primary function in {readrba} is read_rba().
Here’s how you fetch the current version of a single RBA statistical
table: table G1, consumer price inflation using read_rba():
cpi_table <- read_rba(table_no = "g1")
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
The object returned by read_rba() is a tidy tibble (ie. in ‘long’
format):
head(cpi_table)
#> # A tibble: 6 × 11
#> date series value frequency series_type units source pub_date
#> <date> <chr> <dbl> <chr> <chr> <chr> <chr> <date>
#> 1 1922-06-30 Consumer price… 2.8 Quarterly Original Inde… ABS /… 2025-07-31
#> 2 1922-09-30 Consumer price… 2.8 Quarterly Original Inde… ABS /… 2025-07-31
#> 3 1922-12-31 Consumer price… 2.7 Quarterly Original Inde… ABS /… 2025-07-31
#> 4 1923-03-31 Consumer price… 2.7 Quarterly Original Inde… ABS /… 2025-07-31
#> 5 1923-06-30 Consumer price… 2.8 Quarterly Original Inde… ABS /… 2025-07-31
#> 6 1923-09-30 Consumer price… 2.9 Quarterly Original Inde… ABS /… 2025-07-31
#> # ℹ 3 more variables: series_id <chr>, description <chr>, table_title <chr>
You can also request multiple tables. They’ll be returned together as one tidy tibble:
rba_data <- read_rba(table_no = c("a1", "g1"))
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
#> Warning: All formats failed to parse. No formats found.
head(rba_data)
#> # A tibble: 6 × 11
#> date series value frequency series_type units source pub_date
#> <date> <chr> <dbl> <chr> <chr> <chr> <chr> <date>
#> 1 2013-07-03 Australian dol… 37899 Weekly Original $ mi… RBA 2025-08-01
#> 2 2013-07-10 Australian dol… 35106 Weekly Original $ mi… RBA 2025-08-01
#> 3 2013-07-17 Australian dol… 32090 Weekly Original $ mi… RBA 2025-08-01
#> 4 2013-07-24 Australian dol… 39592 Weekly Original $ mi… RBA 2025-08-01
#> 5 2013-07-31 Australian dol… 41286 Weekly Original $ mi… RBA 2025-08-01
#> 6 2013-08-07 Australian dol… 37974 Weekly Original $ mi… RBA 2025-08-01
#> # ℹ 3 more variables: series_id <chr>, description <chr>, table_title <chr>
unique(rba_data$table_title)
#> [1] "A1 Reserve Bank Of Australia - Balance Sheet"
#> [2] "G1 Consumer Price Inflation"
You can also retrieve data based on the unique RBA time series identifier(s). For example, to getch the consumer price index series only:
cpi_series <- read_rba(series_id = "GCPIAG")
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
head(cpi_series)
#> # A tibble: 6 × 11
#> date series value frequency series_type units source pub_date
#> <date> <chr> <dbl> <chr> <chr> <chr> <chr> <date>
#> 1 1922-06-30 Consumer price… 2.8 Quarterly Original Inde… ABS /… 2025-07-31
#> 2 1922-09-30 Consumer price… 2.8 Quarterly Original Inde… ABS /… 2025-07-31
#> 3 1922-12-31 Consumer price… 2.7 Quarterly Original Inde… ABS /… 2025-07-31
#> 4 1923-03-31 Consumer price… 2.7 Quarterly Original Inde… ABS /… 2025-07-31
#> 5 1923-06-30 Consumer price… 2.8 Quarterly Original Inde… ABS /… 2025-07-31
#> 6 1923-09-30 Consumer price… 2.9 Quarterly Original Inde… ABS /… 2025-07-31
#> # ℹ 3 more variables: series_id <chr>, description <chr>, table_title <chr>
unique(cpi_series$series_id)
#> [1] "GCPIAG"
The convenience function read_rba_seriesid() is a wrapper around
read_rba(). This means read_rba_seriesid("GCPIAG") is equivalent to
read_rba(series_id = "GCPIAG").
By default, read_rba() fetches the current version of whatever table
you request. You can specify the historical version of a table, if it’s
available, using the cur_hist argument:
hist_a11 <- read_rba(table_no = "a1.1", cur_hist = "historical")
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
#> Warning in utils::download.file(url = url, destfile = destfile, mode = mode, :
#> the 'wininet' method is deprecated for http:// and https:// URLs
#> Warning: All formats failed to parse. No formats found.
#> Warning: All formats failed to parse. No formats found.
head(hist_a11)
#> # A tibble: 6 × 11
#> date series value frequency series_type units source pub_date
#> <date> <chr> <dbl> <chr> <chr> <chr> <chr> <date>
#> 1 1994-06-01 Australian dol… 13680 Weekly Original $ mi… RBA 2023-05-05
#> 2 1994-06-08 Australian dol… 13055 Weekly Original $ mi… RBA 2023-05-05
#> 3 1994-06-15 Australian dol… 13086 Weekly Original $ mi… RBA 2023-05-05
#> 4 1994-06-22 Australian dol… 12802 Weekly Original $ mi… RBA 2023-05-05
#> 5 1994-06-29 Australian dol… 13563 Weekly Original $ mi… RBA 2023-05-05
#> 6 1994-07-06 Australian dol… 12179 Weekly Original $ mi… RBA 2023-05-05
#> # ℹ 3 more variables: series_id <chr>, description <chr>, table_title <chr>
Browsing RBA data
Two functions are provided to help you find the table number or series
ID you need. These are browse_rba_tables() and browse_rba_series().
Each returns a tibble with information about the available RBA data.
browse_rba_tables()
#> # A tibble: 125 × 5
#> title no url current_or_historical readable
#> <chr> <chr> <chr> <chr> <lgl>
#> 1 RBA Balance Sheet A1 http… current TRUE
#> 2 Monetary Policy Changes A2 http… current TRUE
#> 3 Monetary Policy Operations – Curr… A3 http… current TRUE
#> 4 Holdings of Australian Government… A3.1 http… current TRUE
#> 5 Securities Lending Repurchase and… A3.2 http… current TRUE
#> 6 Foreign Exchange Transactions and… A4 http… current TRUE
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
