read_abs_if_updated: Download catalogue number worth of ABS time series data if it...

View source: R/read_abs_if_updated.R

read_abs_if_updatedR Documentation

Download catalogue number worth of ABS time series data if it has been updated since the version stored locally

Description

Checks the latest observation date in a local ABS time series file; compares that to the latest date for the catalogue number on the ABS website. If the remote version is newer than the local version, download the catalogue number using readabs::read_abs()

Usage

read_abs_if_updated(
  cat_no = NULL,
  path = here::here("data-raw", "abs-ts"),
  include_orig_for_sadj = FALSE,
  include_trend = FALSE
)

Arguments

cat_no

character, such as "6202.0" or "6345.0"

path

default is file.path("data-raw", "abs-ts")

include_orig_for_sadj

logical; default is FALSE. For series with 'seasonally adjusted' data, should we retain the 'original' (unadjusted) data? FALSE by default. Note that even when this is FALSE, original data is retained for series that do not have seasonally adjusted data.

include_trend

logical; default is FALSE. Should 'trend' data be included in the data frame?

Examples

## Not run: 
read_abs_if_updated("6345.0")

## End(Not run)

djpr-data/djprdashdata documentation built on Jan. 20, 2025, 12:31 p.m.