Title: | 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. |
Authors: | Jarrod van der Wal [aut, cre, cph] |
Maintainer: | Jarrod van der Wal <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.2.1 |
Built: | 2025-02-23 01:45:49 UTC |
Source: | https://github.com/javanderwal/readapra |
This dataset contains a record of all statistical publications produced by
APRA that are available in readapra
.
apra_stat_pubs
apra_stat_pubs
A data frame with 7 rows and 3 variables:
the full name of the statistical publication.
the acronym of the statistical publication.
available current and historical versions of the statistical publication.
Download a statistical publication file from APRA's website. By default files are saved to a temporary directory.
download_apra( stat_pub, cur_hist = "current", path = tempdir(), overwrite = TRUE, quiet = FALSE, ... )
download_apra( stat_pub, cur_hist = "current", path = tempdir(), overwrite = TRUE, quiet = FALSE, ... )
stat_pub |
character vector detailing a statistical publication to be
downloaded. Must match a valid value in the
|
cur_hist |
character vector detailing whether to download a current
or historic statistical publication. Must match a
valid value in the |
path |
path to where the downloaded file should be saved. Uses
|
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 |
A character vector detailing the file path to the downloaded file.
# 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)
# 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)
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
.
read_apra( stat_pub, cur_hist = "current", path = tempdir(), quiet = FALSE, overwrite = TRUE, ... )
read_apra( stat_pub, cur_hist = "current", path = tempdir(), quiet = FALSE, overwrite = TRUE, ... )
stat_pub |
character vector detailing a statistical publication to be
downloaded and imported. Must match a valid value in the
|
cur_hist |
character vector detailing whether to download and import
a current or historic statistical publication. Must match a
valid value in the |
path |
path to where the downloaded file should be saved. Uses
|
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 |
A tibble containing the statistical publication data.
# 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)
# 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)
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
.
read_apra_local(file_path, stat_pub, cur_hist = "current")
read_apra_local(file_path, stat_pub, cur_hist = "current")
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 |
cur_hist |
character vector detailing whether to import a current
or historic statistical publication. Must match a
valid value in the |
A tibble containing the statistical publication data.
# 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)
# 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)