diff --git a/DESCRIPTION b/DESCRIPTION index 393d52c..6bcc9f5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -10,7 +10,12 @@ Authors@R: c( Description: Estimate temperature dependent R0 for a given pathogen and vector from temperature data using experimentally derived constant temperature-R0 curves. License: MIT + file LICENSE Suggests: + bookdown, + cowplot, + ggplot2, + here, knitr, + lubridate, rmarkdown, spelling, testthat (>= 3.0.0) @@ -24,13 +29,8 @@ Language: en-GB Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 Imports: - bookdown, cinterpolate, - cowplot, dplyr, - ggplot2, - here, - lubridate, rlang, stats, tibble, diff --git a/data-raw/R0.R b/data-raw/R0.R index c849acb..b3857d3 100644 --- a/data-raw/R0.R +++ b/data-raw/R0.R @@ -1,6 +1,9 @@ # Constant temperature - R0 data # From Mordecai et al 2019 +if (!require("here")) install.packages("here") +library(here) + AeaeDENV_R0 <- read.csv(here("data-raw", "Thermal-Eco-MBD-main", "AeaeDENV.R0.csv")) AeaeZIKV_R0 <- read.csv(here("data-raw", "Thermal-Eco-MBD-main", "AeaeZIKV.R0.csv")) AealDENV_R0 <- read.csv(here("data-raw", "Thermal-Eco-MBD-main", "AealDENV.R0.csv")) diff --git a/data-raw/fiji-example.R b/data-raw/fiji-example.R index 9fc6958..97e9dc0 100644 --- a/data-raw/fiji-example.R +++ b/data-raw/fiji-example.R @@ -1,6 +1,13 @@ # Fiji dengue case study data # From Kucharski et al 2018, https://github.com/adamkucharski/fiji-denv3-2014 +if (!require("here")) install.packages("here") +library(here) +if (!require("lubridate")) install.packages("lubridate") +library(lubridate) +library(dplyr) +library(tidyr) + fiji_denv3_2014 <- read.csv(here("data-raw", "fiji-central_lab-tested_denv3-2014.csv")) |> dplyr::mutate(month_date = lubridate::floor_date(as.Date(date, format = "%d/%m/%Y"), unit = "month")) |> tidyr::pivot_longer(c("central", "western", "north", "east"), names_to = "geography", values_to = "cases") diff --git a/vignettes/temperature_R0.Rmd b/vignettes/temperature_R0.Rmd index 8600ce0..2f7412b 100644 --- a/vignettes/temperature_R0.Rmd +++ b/vignettes/temperature_R0.Rmd @@ -22,8 +22,10 @@ Temperature is an important driver of vector-borne disease transmission, affecti 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. -```{r setup} +```{r setup, include = FALSE} library(climateR0) +library(ggplot2) +library(cowplot) ``` ### Case study - 2013/14 DENV3 outbreak in Fiji