Skip to content

Commit

Permalink
Merge pull request #58 from ssi-dk/add_burden_level_vignette
Browse files Browse the repository at this point in the history
Add burden level vignette
  • Loading branch information
SofiaOtero authored Jan 31, 2025
2 parents 816332b + cf50dc2 commit 8f7d904
Show file tree
Hide file tree
Showing 10 changed files with 550 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
shell: Rscript {0}

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pkgdown
path: docs/
Expand All @@ -69,7 +69,7 @@ jobs:
- uses: actions/checkout@v3

- name: Download pkgdown output
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: pkgdown
path: docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ RoxygenNote: 7.3.2
URL: https://github.com/ssi-dk/aedseo, https://ssi-dk.github.io/aedseo/
BugReports: https://github.com/ssi-dk/aedseo/issues
Suggests:
grid,
ISOweek,
kableExtra,
knitr,
mem,
rmarkdown,
testthat (>= 3.0.0),
tidyr,
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
- `vignette("generate_seasonal_wave")`,
- `vignette("aedseo")`,
- `vignette("seasonal_onset")`
providing a comprehensive walkthrough of the application of the functions provided by the `aedseo` package with detailed explanations and illustrative examples (#56, #57).
- `vignette("burden_levels")`
providing a comprehensive walkthrough of the application of the functions provided by the `aedseo` package with detailed explanations and illustrative examples (#56, #57, #58).

* Improved the autoplot function which can now visualise dates as days, weeks and months on the x-axis with the `time_interval` argument (#56).

Expand Down
2 changes: 1 addition & 1 deletion R/seasonal_burden_levels.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#' The `conf_levels` are specific for each method:
#' - for `intensity_levels` only specify the highest confidence level e.g.: `0.95`, which is the highest intensity
#' that has been observed in previous seasons.
#' - for `peak_levels` specify three confidence levels e.g.: `c(0.5, 0.9, 0.95)`, which are the three confidence
#' - for `peak_levels` specify three confidence levels e.g.: `c(0.4, 0.9, 0.975)`, which are the three confidence
#' levels low, medium and high that reflect the peak severity relative to those observed in previous seasons.
#' @param decay_factor A numeric value between 0 and 1, that specifies the weight applied to previous seasons in level
#' calculations. It is used as `decay_factor`^(number of seasons back), whereby the weight for the most recent season
Expand Down
2 changes: 1 addition & 1 deletion man/combined_seasonal_output.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/seasonal_burden_levels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions vignettes/aedseo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ More information about the function can be found in the `vignette("generate_seas
```{r, include = FALSE}
withr::local_seed(222)
# Construct an 'tsd' object with time series data
set.seed(222)
tsd_data <- generate_seasonal_data(
years = 3,
start_date = as.Date("2021-10-18"),
Expand Down Expand Up @@ -170,7 +169,8 @@ Detailed information about each function and their respective arguments can be f
```{r}
seasonal_output <- combined_seasonal_output(
tsd = tsd_data,
disease_threshold = 140
disease_threshold = 140,
method = "intensity_levels"
)
```
The default function calculates onset and burden for the current season. If it is desired to see calculations for all previous seasons, the `only_current_season` argument should be set to `FALSE`.
Expand Down Expand Up @@ -199,3 +199,7 @@ plot(
time_interval = "3 weeks"
)
```

Using the `intensity_levels` method to define burden levels, the Outbreak is expected to fall within the `low` or `medium`
category. This is because the `very low` threshold is the disease-specific threshold, which must be surpassed for five
consecutive weeks along with a significant positive growth rate.
Loading

0 comments on commit 8f7d904

Please sign in to comment.