The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Title: Download and Tidy Data from the Australian Prudential Regulation Authority
Version: 0.2.1
Description: Download the latest data from the Australian Prudential Regulation Authority https://www.apra.gov.au/ and import it into R as a tidy data frame.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Suggests: openxlsx, readr, testthat (≥ 3.0.0), webmockr, withr
Config/testthat/edition: 3
URL: https://github.com/javanderwal/readapra
BugReports: https://github.com/javanderwal/readapra/issues
Imports: cli (≥ 3.0.0), dplyr (≥ 1.0.0), httr (≥ 1.0.0), janitor, lubridate (≥ 1.0.0), memoise, polite (≥ 0.1.0), purrr (≥ 1.0.0), ratelimitr, rlang (≥ 1.0.0), robotstxt, rvest (≥ 1.0.0), stringdist, stringr (≥ 1.0.0), tibble (≥ 2.0.0), tidyr (≥ 1.0.0), tidyselect (≥ 1.0.0), tidyxl (≥ 1.0.0), utils
Depends: R (≥ 3.5)
RoxygenNote: 7.3.2
NeedsCompilation: no
Packaged: 2025-02-23 00:11:03 UTC; jarva
Author: Jarrod van der Wal [aut, cre, cph]
Maintainer: Jarrod van der Wal <jarvanderwal@gmail.com>
Repository: CRAN
Date/Publication: 2025-02-23 00:30:02 UTC

readapra: Download and Tidy Data from the Australian Prudential Regulation Authority

Description

Download the latest data from the Australian Prudential Regulation Authority https://www.apra.gov.au/ and import it into R as a tidy data frame.

Author(s)

Maintainer: Jarrod van der Wal jarvanderwal@gmail.com [copyright holder]

See Also

Useful links:


Statistical Publications Produced by APRA

Description

This dataset contains a record of all statistical publications produced by APRA that are available in readapra.

Usage

apra_stat_pubs

Format

A data frame with 7 rows and 3 variables:

stat_pub_name

the full name of the statistical publication.

stat_pub_acronym

the acronym of the statistical publication.

cur_hist

available current and historical versions of the statistical publication.


Download a Statistical Publication File from APRA's Website

Description

Download a statistical publication file from APRA's website. By default files are saved to a temporary directory.

Usage

download_apra(
  stat_pub,
  cur_hist = "current",
  path = tempdir(),
  overwrite = TRUE,
  quiet = FALSE,
  ...
)

Arguments

stat_pub

character vector detailing a statistical publication to be downloaded. Must match a valid value in the apra_stat_pubs_acronym variable of the apra_stat_pubs dataset.

cur_hist

character vector detailing whether to download a current or historic statistical publication. Must match a valid value in the cur_hist variable of the apra_stat_pubs dataset.

path

path to where the downloaded file should be saved. Uses base::tempdir() by default.

overwrite

whether to overwrite a previously downloaded statistical publication file when re-running this function.

quiet

whether to suppress the download progress bar.

...

additional arguments to be passed to utils::download.file().

Value

A character vector detailing the file path to the downloaded file.

Examples


# Download a statistical publication file:
download_path <-
  download_apra(stat_pub = "qadips", cur_hist = "current")

# View the file path of the statistical publication file:
print(download_path)



Read APRA's Statistical Publications

Description

Download and import a specific statistical publication produced by APRA.

Please consult the apra_stat_pubs dataset to see which of APRA's statistical publications are available in readapra.

Usage

read_apra(
  stat_pub,
  cur_hist = "current",
  path = tempdir(),
  quiet = FALSE,
  overwrite = TRUE,
  ...
)

Arguments

stat_pub

character vector detailing a statistical publication to be downloaded and imported. Must match a valid value in the apra_stat_pubs_acronym variable of the apra_stat_pubs dataset.

cur_hist

character vector detailing whether to download and import a current or historic statistical publication. Must match a valid value in the cur_hist variable of the apra_stat_pubs dataset.

path

path to where the downloaded file should be saved. Uses base::tempdir() by default.

quiet

whether to suppress the download progress bar.

overwrite

whether to overwrite a previously downloaded statistical publication file when re-running this function.

...

additional arguments to be passed to utils::download.file().

Value

A tibble containing the statistical publication data.

Examples


# Download and import the current MADIS data:
current_madis_data <-
  read_apra(stat_pub = "madis", cur_hist = "current")

# Examine the current MADIS data:
print(current_madis_data)



Read APRA Publication Statistics Locally

Description

Import from a local file a specific statistical publication produced by APRA.

Please consult the apra_stat_pubs dataset to see which of APRA's statistical publications are available in readapra.

Usage

read_apra_local(file_path, stat_pub, cur_hist = "current")

Arguments

file_path

path to the local file from which the statistical publication data will be imported.

stat_pub

character vector detailing a statistical publication to be imported. Must match a valid value in the apra_stat_pubs_acronym variable of the apra_stat_pubs dataset.

cur_hist

character vector detailing whether to import a current or historic statistical publication. Must match a valid value in the cur_hist variable of the apra_stat_pubs dataset.

Value

A tibble containing the statistical publication data.

Examples


# Download the current MADIS data and get the file path:
current_madis_file_path <-
  download_apra(stat_pub = "madis", cur_hist = "current")

# Import the current MADIS data:
current_madis_data <-
  read_apra_local(
    stat_pub = "madis",
    cur_hist = "current",
    file_path = current_madis_file_path
  )

# Examine the current MADIS data:
print(current_madis_data)


These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.