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 Zika example to vignette #8

Merged
merged 7 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Config/testthat/parallel: true
Encoding: UTF-8
Language: en-GB
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Imports:
cinterpolate,
dplyr,
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.1.1

* Project vignette now includes Zika in French Polynesia as a case study.


# 0.1.0

* This project now includes a
Expand Down
18 changes: 18 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
#' Fiji 2014.
#'
#' Dataset includes weekly laboratory confirmed DENV-3 cases from Central Division in Fiji, during an outbreak in 2013 and 2014

Check warning on line 3 in R/data.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/data.R,line=3,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 127 characters.
#' as well as monthly average temperature data for Fiji during this period
#'
#'#' A data frame with 44 rows and 3 columns:
#' \describe{
#' \item{date}{Date of epidemiological week}
#' \item{cases}{Number of laboratory confirmed cases in Central Division, Fiji}

Check warning on line 9 in R/data.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/data.R,line=9,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 81 characters.
#' \item{av_temp}{Average monthly temperature for Fiji, in °C}
#' ...
#' }
#' #' @source <https://github.com/adamkucharski/fiji-denv3-2014>
"fiji_2014"

#' Tahiti 2014.
#'
#' Dataset includes weekly laboratory confirmed Zika cases from Tahiti in French Polynesia, during an outbreak in 2013 and 2014

Check warning on line 18 in R/data.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/data.R,line=18,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 127 characters.
#' as well as monthly average temperature data and rainfall for Tahiti during this period

Check warning on line 19 in R/data.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/data.R,line=19,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 89 characters.
#'
#'#' A data frame with 25 rows and 6 columns:
#' \describe{
#' \item{date}{Date of epidemiological week}
#' \item{cases}{Number of laboratory confirmed cases in Tahiti}
#' \item{reporting_sites}{Number of sentinel sites in Tahiti reporting that month}

Check warning on line 25 in R/data.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/data.R,line=25,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 84 characters.
#' \item{total_sites}{Total sentinel sites Tahiti}
#' \item{av_temp}{Average monthly temperature for Tahiti, in °C}
#' \item{av_temp}{Average monthly rainfall for Tahiti, in mm}
#' ...
#' }
#' #' @source <https://journals.plos.org/plosntds/article?id=10.1371/journal.pntd.0004726>

Check warning on line 31 in R/data.R

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=R/data.R,line=31,col=81,[line_length_linter] Lines should not be more than 80 characters. This line is 90 characters.
"tahiti_2013"
Binary file added data/tahiti_2013.rda
Binary file not shown.
3 changes: 3 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ AetaRVFV
AetaSINV
AetrEEEV
AngaPfal
Aubry
CMD
Childs
Codecov
CxanMVEx
CxanRRVx
Expand Down Expand Up @@ -40,5 +42,6 @@ io
lifecycle
packagename
packagetemplate
polynesiensis
svg
yaml
30 changes: 30 additions & 0 deletions man/tahiti_2013.Rd

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

67 changes: 60 additions & 7 deletions vignettes/climateR0.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,39 @@

Temperature is an important driver of vector-borne disease transmission, affecting vector reproduction, development, and survival, as well as the probability of pathogen transmission. Previous work by [Mordecai and colleagues](https://onlinelibrary.wiley.com/doi/10.1111/ele.13335) empirically estimated the effect of temperature on different vector traits, and used these to develop models of temperature dependent R~0~.

The {climateR0} package extracts temperature-dependent R0 for an input time series of mean temperature for 14 vector-pathogen combinations, focusing on mosquito-borne diseases that pose a major public health threat. Temperature dependent R~0~ is a relative measure bounded between 0 and 1, where 1 indicates maximum temperature suitability for transmission. This is a useful indicator for the epidemic potential of a vector-borne disease which can be used for situational awareness or be incorporated into forecasting models to predict future cases. Note that we use a relative measure of R~0~ as other factors affect the absolute magnitude of R~0~ such as immunity, control measures and population behaviour, which are not considered here.
The {climateR0} package extracts temperature-dependent R~0~ for an input time series of mean temperature for 14 vector-pathogen combinations, focusing on mosquito-borne diseases that pose a major public health threat. Temperature dependent R~0~ is a relative measure bounded between 0 and 1, where 1 indicates maximum temperature suitability for transmission. This is a useful indicator for the epidemic potential of a vector-borne disease which can be used for situational awareness or be incorporated into forecasting models to predict future cases. Note that we use a relative measure of R~0~ as other factors affect the absolute magnitude of R~0~ such as immunity, control measures and population behaviour, which are not considered here.

```{r setup, include = FALSE}
library(climateR0)
library(ggplot2)

Check warning on line 27 in vignettes/climateR0.Rmd

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=vignettes/climateR0.Rmd,line=27,col=1,[unused_import_linter] Package 'ggplot2' is only used by namespace. Check that it is installed using loadNamespace() instead.
library(cowplot)

Check warning on line 28 in vignettes/climateR0.Rmd

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=vignettes/climateR0.Rmd,line=28,col=1,[unused_import_linter] Package 'cowplot' is only used by namespace. Check that it is installed using loadNamespace() instead.
```

### Case study - 2013/14 DENV3 outbreak in Fiji

As a case study, we'll use data from a 2013/4 DENV-3 outbreak in Fiji. Here we show laboratory confirmed cases over time in Central Division.
As a first case study, we'll use data from a 2013/4 DENV-3 outbreak in Fiji. Here we show laboratory confirmed cases over time in Central Division.

```{r}
fiji_cases <- fiji_2014 |>

Check warning on line 36 in vignettes/climateR0.Rmd

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=vignettes/climateR0.Rmd,line=36,col=25,[pipe_consistency_linter] Use the %>% pipe operator instead of the |> pipe operator.

Check warning on line 36 in vignettes/climateR0.Rmd

View workflow job for this annotation

GitHub Actions / lint-changed-files

file=vignettes/climateR0.Rmd,line=36,col=27,[trailing_whitespace_linter] Trailing whitespace is superfluous.
ggplot2::ggplot() +
ggplot2::geom_line(ggplot2::aes(x = date, y = cases), col = "#016c59") +
ggplot2::scale_x_date(breaks = "month", date_labels = "%b-%y") +
ggplot2::labs(x = "Date", y = "Cases") +
ggplot2::labs(x = "Date", y = "Reported dengue cases") +
ggplot2::theme_classic()

fiji_cases

```

In the same dataset, we have a time-series of monthly mean temperatures (in °C) for Fiji. To extract corresponding temperature-dependent R~0~ values from the temperature-relative R0 curves estimated by Mordecai et al, we use the `temperature_R0()` function. Within the function call, we specify a vector-pathogen code of `AeaeDENV` for the vector *Aedes aegypti* and pathogen dengue virus.
In the same dataset, we have a time-series of monthly mean temperatures (in °C) for Central Division, Fiji. To extract corresponding temperature-dependent R~0~ values from the temperature-relative R0 curves estimated by Mordecai et al, we use the `temperature_R0()` function. Within the function call, we specify a vector-pathogen code of `AeaeDENV` for the vector *Aedes aegypti* and pathogen dengue virus.

```{r}
fiji_2014$rR0 <- temperature_r0(fiji_2014$av_temp, "AeaeDENV")
```

Now we can plot relative temperature-dependent R0 values alongside case data.
Now we can plot relative temperature-dependent R~0~ values alongside case data.

```{r, include = FALSE}
```{r}
fiji_rR0 <- fiji_2014 |>
ggplot2::ggplot() +
ggplot2::geom_line(ggplot2::aes(x = date, y = rR0), col = "#54278f") +
Expand All @@ -67,4 +67,57 @@
cowplot::plot_grid(fiji_cases, fiji_rR0, nrow = 2)
```

As discussed in [Kucharski et al 2018](https://elifesciences.org/articles/34848#s2), comparing the case time series with temperature-dependent R~0~ indicates that a fall in transmission due to seasonal temperature variation cannot fully explain the fall in cases from March 2014. In this paper, Kucharski and colleagues found that a model including the build-up of herd immunity and a decrease in transmission resulting from a vector control campaign in March 2024 better captured the observed pattern of cases.
As discussed in [Kucharski et al (2018)](https://elifesciences.org/articles/34848#s2), comparing the case time series with temperature-dependent R~0~ indicates that a fall in transmission due to seasonal temperature variation cannot fully explain the fall in cases from March 2014. In this paper, Kucharski and colleagues found that a model including the build-up of herd immunity and a decrease in transmission resulting from a vector control campaign in March 2024 better captured the observed pattern of cases.

### Case study - 2013/14 Zika outbreak in French Polynesia

As a second study, we'll use data from a 2013/4 Zika outbreak in Tahiti, French Polynesia. Here we show laboratory confirmed cases over time from sentinel reporting sites in Tahiti.

```{r}
tahiti_cases <- tahiti_2013 |>
ggplot2::ggplot() +
ggplot2::geom_line(ggplot2::aes(x = date, y = cases), col = "#016c59") +
ggplot2::scale_x_date(breaks = "month", date_labels = "%b-%y") +
ggplot2::labs(x = "Date", y = "Reported Zika cases") +
ggplot2::theme_classic()

tahiti_cases

```

In the same dataset, we have a time-series of monthly mean temperatures (in °C) for Tahiti. Again, we use the `temperature_R0()` function. Within the function call, we specify a vector-pathogen code of `AeaeZIKV` for the vector *Aedes aegypti* and pathogen Zika virus. (Note that the main vectors in French Polynesia include both *Aedes aegypti* and *Aedes polynesiensis*.)

```{r}
tahiti_2013$rR0 <- temperature_r0(tahiti_2013$av_temp, "AeaeZIKV")
```

Now we can plot relative temperature-dependent R~0~ values alongside case data.

```{r}
tahiti_rR0 <- tahiti_2013 |>
ggplot2::ggplot() +
ggplot2::geom_line(ggplot2::aes(x = date, y = rR0), col = "#54278f") +
ggplot2::scale_x_date(breaks = "month", date_labels = "%b-%y") +
ggplot2::labs(x = "Date", y = "Relative R0") +
ggplot2::theme_classic()

tahiti_rR0
```

```{r}
cowplot::plot_grid(tahiti_cases, tahiti_rR0, nrow = 2)
```

As discussed in [Kucharski et al (201)](https://journals.plos.org/plosntds/article?id=10.1371/journal.pntd.0004726), the outbreak ended before temperature or rainfall levels changed in a way that would imply a transmission reduction, indicating that immunity played a major role in driving the epidemic decline. This is consistent with later antibody data reported by [Aubry et al ( 2017)](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5367400/)

### Caveats to the model approach

adamkucharski marked this conversation as resolved.
Show resolved Hide resolved
The models used here do not account for other aspects of weather and climate variability that are likely to influence vector-borne disease dynamics, including variation in precipitation, relative humidity, and temperature over time. This approach also does not account for time lags between temperature and R0; instead, it calculates a static snapshot of the relative temperature suitability for transmission at a given point in time, assuming the temperature had been constant up to that point. In reality, multiple time lags may be relevant to R0. For example, temperature 4-8 weeks ago may affect the mosquito population size and development rate, whereas temperature 2-4 weeks ago may affect the vector competence and extrinsic incubation period.

Despite these limitations, temperature-dependent relative R0 has been used to predict geographical and temporal variation in different settings for malaria, dengue, Zika, Ross River virus and West Nile virus (further details in the references below).

* [Mordecai et al 2017](https://journals.plos.org/plosntds/article?id=10.1371/journal.pntd.0005568)
* [Tesla et al 2018](https://royalsocietypublishing.org/doi/full/10.1098/rspb.2018.0795?rfr_dat=cr_pub++0pubmed&url_ver=Z39.88-2003&rfr_id=ori%3Arid%3Acrossref.org)
* [Shocket et al 2018](https://elifesciences.org/articles/37762)
* [Shocket et al 2020](https://elifesciences.org/articles/58511)
* [Childs et al 2024](https://www.medrxiv.org/content/10.1101/2024.01.08.24301015v1)
Loading