readabs icon indicating copy to clipboard operation
readabs copied to clipboard

Allow users to fetch previous vintage of time series

Open MattCowgill opened this issue 3 years ago • 1 comments

This adds a release_date argument to read_abs().

At the moment, read_abs() fetches the latest release of the requested table(s). It cannot be used to fetch previous releases.

The release_date argument allows previous releases to be retrieved. Note that it does not work for anything released prior to the launch of the current ABS website (mid-2019).

Keen for input on this PR.

MattCowgill avatar Sep 01 '22 02:09 MattCowgill

Codecov Report

Base: 87.32% // Head: 87.72% // Increases project coverage by +0.40% :tada:

Coverage data is based on head (d67841e) compared to base (642730b). Patch coverage: 91.17% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #218      +/-   ##
==========================================
+ Coverage   87.32%   87.72%   +0.40%     
==========================================
  Files          28       28              
  Lines        1049     1108      +59     
==========================================
+ Hits          916      972      +56     
- Misses        133      136       +3     
Impacted Files Coverage Δ
R/search_files.R 0.00% <0.00%> (ø)
R/search_catalogues.R 76.19% <33.33%> (+16.19%) :arrow_up:
R/check_abs_connection.R 34.61% <46.15%> (-1.39%) :arrow_down:
R/read_awe.R 97.97% <96.00%> (-0.60%) :arrow_down:
R/read_abs.R 90.90% <96.15%> (+0.64%) :arrow_up:
R/check_latest_date.R 100.00% <100.00%> (ø)
R/download_abs.R 94.11% <100.00%> (-5.89%) :arrow_down:
R/download_data_cube.r 88.23% <100.00%> (+0.73%) :arrow_up:
R/extract_abs_sheets.R 86.36% <100.00%> (+0.64%) :arrow_up:
R/get_abs_xml_metadata.R 91.80% <100.00%> (+0.13%) :arrow_up:
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 01 '22 02:09 codecov[bot]

Three options:

  1. do not add the release_date arg, so read_abs() can still only fetch the latest release;
  2. merge this PR, so the release_date arg is added, but pre-2019 releases cannot be retrieved; or
  3. close this PR, and instead write new logic that will be able to fetch pre-2019 releases (this would be fiddly as hell)

MattCowgill avatar Sep 05 '22 22:09 MattCowgill

Went with option (2)

MattCowgill avatar Sep 26 '22 06:09 MattCowgill