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

Fix read describe cases #39

Merged
merged 67 commits into from
Apr 29, 2024
Merged

Fix read describe cases #39

merged 67 commits into from
Apr 29, 2024

Conversation

Degoot-AM
Copy link
Contributor

@Degoot-AM Degoot-AM commented Apr 1, 2024

This PR aims at addressing existing conflicts with origin before get more complicated. This issues specifically arise from
including the development version of {cleanepi} package. It also adds the following episodes:

  1. Read case data
  2. Clean and validate data
  3. Aggregate and visualize
  4. Early analysis

This PR addresses issues #21 and #22.

Copy link

github-actions bot commented Apr 1, 2024

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/epiverse-trace/tutorials-early/compare/md-outputs..md-outputs-PR-39

The following changes were observed in the rendered markdown documents:

 clean-data.md (new)                                |   415 +
 config.yaml (gone)                                 |    86 -
 data/Marburg.zip (new)                             |   Bin 0 -> 1581 bytes
 data/ebola_line_cases.csv (new)                    | 15001 +++++++++++++++++++
 data/simulated_ebola_2.csv (new)                   | 15001 +++++++++++++++++++
 delays-functions.md                                |    16 +-
 describe-cases.md (new)                            |   292 +
 ...elays-functions-rendered-unnamed-chunk-16-1.png |   Bin 50804 -> 50427 bytes
 ...elays-functions-rendered-unnamed-chunk-17-1.png |   Bin 52299 -> 50974 bytes
 ...unctions-rendered-unnamed-chunk-19-1.png (gone) |   Bin 52727 -> 0 bytes
 ...elays-functions-rendered-unnamed-chunk-20-1.png |   Bin 51477 -> 51959 bytes
 ...elays-functions-rendered-unnamed-chunk-21-1.png |   Bin 33204 -> 33142 bytes
 ...unctions-rendered-unnamed-chunk-23-1.png (gone) |   Bin 51632 -> 0 bytes
 ...ys-reuse-rendered-unnamed-chunk-14-1.png (gone) |   Bin 11595 -> 0 bytes
 ...ribe-cases-rendered-unnamed-chunk-6-1.png (new) |   Bin 0 -> 5791 bytes
 ...ribe-cases-rendered-unnamed-chunk-7-1.png (new) |   Bin 0 -> 9266 bytes
 ...ransmissibility-rendered-unnamed-chunk-17-1.png |   Bin 31489 -> 31431 bytes
 ...ransmissibility-rendered-unnamed-chunk-18-1.png |   Bin 30336 -> 29836 bytes
 ...ransmissibility-rendered-unnamed-chunk-21-1.png |   Bin 83577 -> 83259 bytes
 fig/report_demo.png (new)                          |   Bin 0 -> 81199 bytes
 ...e-analysis-rendered-unnamed-chunk-1-1.png (new) |   Bin 0 -> 21079 bytes
 ...e-analysis-rendered-unnamed-chunk-2-1.png (new) |   Bin 0 -> 20476 bytes
 ...e-analysis-rendered-unnamed-chunk-5-1.png (new) |   Bin 0 -> 22930 bytes
 ...e-analysis-rendered-unnamed-chunk-6-1.png (new) |   Bin 0 -> 20947 bytes
 md5sum.txt                                         |    30 +-
 quantify-transmissibility.md                       |   124 +-
 read-cases.md (new)                                |   157 +
 reference.md                                       |     2 +
 renv.lock (gone)                                   |  2703 ----
 simple-analysis.md (new)                           |   178 +
 30 files changed, 31137 insertions(+), 2868 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2024-04-29 19:51:25 +0000

github-actions bot pushed a commit that referenced this pull request Apr 1, 2024
@avallecam
Copy link
Member

@Degoot-AM thank you for requesting a review, I'll be able to do this next week on Friday. Hope this works for you.

@avallecam
Copy link
Member

avallecam commented Apr 3, 2024

given that all checks have passed, the workbench workflows created a preview branch with the number of the PR:

github-actions bot pushed a commit that referenced this pull request Apr 4, 2024
github-actions bot pushed a commit that referenced this pull request Apr 5, 2024
episodes/clean-data.Rmd Outdated Show resolved Hide resolved
episodes/clean-data.Rmd Outdated Show resolved Hide resolved
episodes/read-cases.Rmd Outdated Show resolved Hide resolved
github-actions bot pushed a commit that referenced this pull request Apr 5, 2024
github-actions bot pushed a commit that referenced this pull request Apr 5, 2024
@avallecam
Copy link
Member

Using library with package::function() will cause lintr to raise a warning and block merging. I would suggest to use loadNamespace instead. What do you think @avallecam

Yes, just recall that. Actually, we fixed this in c9954bc to avoid warnings. Try keeping this warning in the local version, and pushing this to GitHub. It should pass.

github-actions bot pushed a commit that referenced this pull request Apr 17, 2024
config.yaml Show resolved Hide resolved
github-actions bot pushed a commit that referenced this pull request Apr 18, 2024
@avallecam avallecam self-requested a review April 23, 2024 11:28
Copy link
Member

@avallecam avallecam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice arrangement of episodes covering a good diversity of packages within this task. My general suggestions go to add spaces within code chunks and brief comments in each action.

The md-output shows and error, so we need to solve this before merging this branch. I suggest to prioritize comments and create issues from other that may not be so relevant or may require more time. I think it would be possible to merge this PR at the end of this week.

Then, we may need to find how to rearrange the episodes later given that the describe-cases episode already uses epiparameter.

episodes/read-cases.Rmd Outdated Show resolved Hide resolved
episodes/read-cases.Rmd Outdated Show resolved Hide resolved
episodes/describe-cases.Rmd Outdated Show resolved Hide resolved
episodes/read-cases.Rmd Show resolved Hide resolved
episodes/read-cases.Rmd Show resolved Hide resolved
episodes/read-cases.Rmd Outdated Show resolved Hide resolved
episodes/clean-data.Rmd Outdated Show resolved Hide resolved
episodes/clean-data.Rmd Outdated Show resolved Hide resolved
episodes/describe-cases.Rmd Show resolved Hide resolved
episodes/simple-analysis.Rmd Show resolved Hide resolved
github-actions bot pushed a commit that referenced this pull request Apr 26, 2024
github-actions bot pushed a commit that referenced this pull request Apr 26, 2024
Copy link
Contributor Author

@Degoot-AM Degoot-AM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first submit for early tutorials.

github-actions bot pushed a commit that referenced this pull request Apr 29, 2024
Copy link
Member

@avallecam avallecam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is now ready to merge 🚀

I fixed the errors visible in the md-outputs-PR in this commit 1f956a0 I followed the template in this previous reading step

```{r,eval=TRUE,echo=FALSE,message=FALSE}
# read data from the tutorial repository R project
ebola_confirmed <-
read_csv(file.path("data", "ebola_cases.csv"))
```
```{r,eval=FALSE,echo=TRUE}
# read data
# e.g.: if path to file is data/raw-data/ebola_cases.csv then:
ebola_confirmed <-
read_csv(here::here("data", "raw-data", "ebola_cases.csv"))

We should not use here::here() to read data in the workbench, instead we use file.path(), but we can suggest the reader to use it.

A way to verify this is by running the chunks locally, getting outputs like these

With error:

Screenshot 2024-04-29 193824

Fixed:

Screenshot 2024-04-29 193845

@Degoot-AM Degoot-AM merged commit 576a77e into main Apr 29, 2024
4 checks passed
@Degoot-AM Degoot-AM deleted the fix-read-describe-cases branch April 29, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants