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

Add diseasystore for ECDC respitory viruses data #124

Merged
merged 34 commits into from
Mar 19, 2024

Conversation

RasmusSkytte
Copy link
Contributor

@RasmusSkytte RasmusSkytte commented Feb 26, 2024

Intent

This PR introduces a diseasystore for the ECDC Respiratory Viruses Weekly Repository1.

Approach

source_conn_github()

To facilitate this diseaystore, a new helper function source_conn_github() which joins the family of source_conn_path().
This function helps retrieve named files from GitHub repository.
If the given source_conn argument points to a folder with a git repo, the repo will be updated and the requested file path will be returned. Instead, if the argument is a (API) link to a GitHub repository, the GitHub API is utilised to retrieve the file path.

In either case, we do some fuzzy matching to retrieve the newest file that is older or simultaneous with the requested date
(encoded in the file name being requested).

Say the only available files are "file_2022-01-01.csv" and "file_2022-06-01.csv" and we request the file "file_2022-05-01.csv", the file path to "file_2022-01-01.csv" is returned.

DiseasystoreEcdcRespitoryViruses

A new diseasystore was added with the following features:

  • iliari_rates
  • infection_type (ILI or ARI)
  • age_group

Known issues

This uses code from a bunch of open PRs.
These need to be merged before this will be rebased and openend.

Checklist

  • The PR passes all local unit tests
  • I have documented any new features introduced
  • If the PR adds a new feature, please add an entry in NEWS.md
  • A reviewer is assigned to this PR

Footnotes

  1. Note: new tongue-twister: "Respiratory Repository"

@RasmusSkytte RasmusSkytte self-assigned this Feb 26, 2024
@RasmusSkytte RasmusSkytte added this to the v0.2 milestone Mar 5, 2024
@RasmusSkytte RasmusSkytte added the enhancement New feature or request label Mar 12, 2024
@RasmusSkytte RasmusSkytte force-pushed the feature/diseasystoreEcdcRespitoryViruses branch from c3c5b57 to fafa089 Compare March 13, 2024 08:47
Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 92.97%. Comparing base (e351ac7) to head (6a3d3e2).

Files Patch % Lines
R/source_conn_helpers.R 84.37% 10 Missing ⚠️
R/DiseasystoreEcdcRespiratoryViruses.R 0.00% 3 Missing ⚠️
R/DiseasystoreGoogleCovid19.R 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
- Coverage   93.78%   92.97%   -0.81%     
==========================================
  Files          14       16       +2     
  Lines         997     1054      +57     
==========================================
+ Hits          935      980      +45     
- Misses         62       74      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RasmusSkytte RasmusSkytte force-pushed the feature/diseasystoreEcdcRespitoryViruses branch 5 times, most recently from d30ac38 to c4eb842 Compare March 15, 2024 07:45
@RasmusSkytte RasmusSkytte force-pushed the feature/diseasystoreEcdcRespitoryViruses branch from c4eb842 to 5a8037b Compare March 15, 2024 07:51
@RasmusSkytte RasmusSkytte marked this pull request as ready for review March 15, 2024 08:50
R/source_conn_helpers.R Outdated Show resolved Hide resolved
Co-authored-by: SofiaOtero <80672070+SofiaOtero@users.noreply.github.com>
@RasmusSkytte RasmusSkytte merged commit 77ad8b1 into main Mar 19, 2024
18 of 22 checks passed
@RasmusSkytte RasmusSkytte deleted the feature/diseasystoreEcdcRespitoryViruses branch April 11, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants