From 35f270b5344613d08961d648d0b07c9d66aa8955 Mon Sep 17 00:00:00 2001 From: adamkucharski Date: Mon, 9 Sep 2024 17:28:09 +0100 Subject: [PATCH 1/7] Add Zika example to vignette Have also unhid plotting for dengue to make the vignette easier to follow --- data/tahiti_2013.rda | Bin 0 -> 482 bytes vignettes/climateR0.Rmd | 57 +++++++++++++++++++++++++++++++++++----- 2 files changed, 50 insertions(+), 7 deletions(-) create mode 100644 data/tahiti_2013.rda diff --git a/data/tahiti_2013.rda b/data/tahiti_2013.rda new file mode 100644 index 0000000000000000000000000000000000000000..d9cbb4e7971d06be1dda84e689af64982d8b697c GIT binary patch literal 482 zcmV<80UiDyiwFP!000001J#txN*hrW$8R%9#7L{qRlr3TUAQr5;zyE#Od;AX1fd@x z2Fm1WCdpvFn7Jqgg%qV(6iT-h7kv~TK(UX|RlD^8Btk`VKF1qpUY5O@|k4P zyvq0dgXYy5Bff^O!{5R;;al+c@FKhn{{-joD!c*TgLmLAd>{T9egyBqPvCv{H~9CF zYc0oio80r{X69BfTHwN#9LR^7r{0)Z|3wrPV)qC5f_V6wcsxh!BkwEnz98=XAy&?b zWs|rK7U` 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") + @@ -67,4 +67,47 @@ fiji_rR0 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. \ No newline at end of file +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 *Ae. aegypti* and *Ae. 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/) + + From 65959abaa2ab6f8d05b3ae6c16710db8029ea1d6 Mon Sep 17 00:00:00 2001 From: adamkucharski Date: Mon, 16 Sep 2024 12:14:43 +0100 Subject: [PATCH 2/7] Update NEWS.md --- NEWS.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/NEWS.md b/NEWS.md index d342220..03cb4dc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 From b1e10630aa89177348d1e5d5108c12d4b53f3d29 Mon Sep 17 00:00:00 2001 From: Adam Kucharski Date: Mon, 16 Sep 2024 12:15:31 +0100 Subject: [PATCH 3/7] Update vignettes/climateR0.Rmd Add references and caveats Co-authored-by: Emilie Finch --- vignettes/climateR0.Rmd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vignettes/climateR0.Rmd b/vignettes/climateR0.Rmd index 776ff28..281689c 100644 --- a/vignettes/climateR0.Rmd +++ b/vignettes/climateR0.Rmd @@ -110,4 +110,14 @@ 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 +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) From e9237366eabfb14ffe58bc93b8cfea959199d813 Mon Sep 17 00:00:00 2001 From: adamkucharski Date: Mon, 16 Sep 2024 12:35:51 +0100 Subject: [PATCH 4/7] Update WORDLIST --- inst/WORDLIST | 3 +++ vignettes/climateR0.Rmd | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/inst/WORDLIST b/inst/WORDLIST index 699f66b..77fe5c1 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -6,7 +6,9 @@ AetaRVFV AetaSINV AetrEEEV AngaPfal +Aubry CMD +Childs Codecov CxanMVEx CxanRRVx @@ -40,5 +42,6 @@ io lifecycle packagename packagetemplate +polynesiensis svg yaml diff --git a/vignettes/climateR0.Rmd b/vignettes/climateR0.Rmd index 281689c..e92b576 100644 --- a/vignettes/climateR0.Rmd +++ b/vignettes/climateR0.Rmd @@ -85,7 +85,7 @@ 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 *Ae. aegypti* and *Ae. polynesiensis*.) +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") From 4085d78cfa6255886783848959111d48b20607b8 Mon Sep 17 00:00:00 2001 From: adamkucharski Date: Mon, 16 Sep 2024 13:01:29 +0100 Subject: [PATCH 5/7] Add data --- DESCRIPTION | 2 +- R/data.R | 18 ++++++++++++++++++ man/tahiti_2013.Rd | 30 ++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 man/tahiti_2013.Rd diff --git a/DESCRIPTION b/DESCRIPTION index bec2f7e..ff9909c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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, diff --git a/R/data.R b/R/data.R index 8cff567..fe6a6fd 100644 --- a/R/data.R +++ b/R/data.R @@ -12,3 +12,21 @@ #' } #' #' @source "fiji_2014" + +#' Tahiti 2014. +#' +#' Dataset includes weekly laboratory confirmed Zika cases from Tahiti in French Polynesia, during an outbreak in 2013 and 2014 +#' as well as monthly average temperature data and rainfall for Tahiti during this period +#' +#'#' 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} +#' \item{total_sites}{Total sentinal sites Tahiti} +#' \item{av_temp}{Average monthly temperature for Tahiti, in °C} +#' \item{av_temp}{Average monthly rainfall for Tahiti, in mm} +#' ... +#' } +#' #' @source +"tahiti_2013" diff --git a/man/tahiti_2013.Rd b/man/tahiti_2013.Rd new file mode 100644 index 0000000..e2b3721 --- /dev/null +++ b/man/tahiti_2013.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{tahiti_2013} +\alias{tahiti_2013} +\title{Tahiti 2014.} +\format{ +An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 25 rows and 6 columns. +} +\usage{ +tahiti_2013 +} +\description{ +Dataset includes weekly laboratory confirmed Zika cases from Tahiti in French Polynesia, during an outbreak in 2013 and 2014 +as well as monthly average temperature data and rainfall for Tahiti during this period +} +\details{ +#' 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} +\item{total_sites}{Total sentinal sites Tahiti} +\item{av_temp}{Average monthly temperature for Tahiti, in °C} +\item{av_temp}{Average monthly rainfall for Tahiti, in mm} +... +} +#' @source \url{https://journals.plos.org/plosntds/article?id=10.1371/journal.pntd.0004726} +} +\keyword{datasets} From e33f29d63f11df4dc4ead4e23342210c1f7a0036 Mon Sep 17 00:00:00 2001 From: adamkucharski Date: Mon, 16 Sep 2024 13:09:54 +0100 Subject: [PATCH 6/7] Fix spelling --- R/data.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/data.R b/R/data.R index fe6a6fd..b574dab 100644 --- a/R/data.R +++ b/R/data.R @@ -23,7 +23,7 @@ #' \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} -#' \item{total_sites}{Total sentinal sites Tahiti} +#' \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} #' ... From f66c986486f1d9e53f5ea0bd20628da27317316d Mon Sep 17 00:00:00 2001 From: adamkucharski Date: Mon, 16 Sep 2024 13:15:00 +0100 Subject: [PATCH 7/7] Fix typo --- man/tahiti_2013.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/tahiti_2013.Rd b/man/tahiti_2013.Rd index e2b3721..fd374d1 100644 --- a/man/tahiti_2013.Rd +++ b/man/tahiti_2013.Rd @@ -20,7 +20,7 @@ as well as monthly average temperature data and rainfall for Tahiti during this \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} -\item{total_sites}{Total sentinal sites Tahiti} +\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} ...