Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to fetch previous vintage of time series #218

Merged
merged 6 commits into from
Sep 26, 2022

Conversation

MattCowgill
Copy link
Owner

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.

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

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

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%) ⬆️
R/check_abs_connection.R 34.61% <46.15%> (-1.39%) ⬇️
R/read_awe.R 97.97% <96.00%> (-0.60%) ⬇️
R/read_abs.R 90.90% <96.15%> (+0.64%) ⬆️
R/check_latest_date.R 100.00% <100.00%> (ø)
R/download_abs.R 94.11% <100.00%> (-5.89%) ⬇️
R/download_data_cube.r 88.23% <100.00%> (+0.73%) ⬆️
R/extract_abs_sheets.R 86.36% <100.00%> (+0.64%) ⬆️
R/get_abs_xml_metadata.R 91.80% <100.00%> (+0.13%) ⬆️
... 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.

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

@MattCowgill
Copy link
Owner Author

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 MattCowgill merged commit 524cd67 into master Sep 26, 2022
@MattCowgill
Copy link
Owner Author

Went with option (2)

@MattCowgill MattCowgill deleted the release_date branch September 26, 2022 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant