Skip to content

Instantly share code, notes, and snippets.

View ciarajudge's full-sized avatar
🐒
code monkey

Ciara Judge ciarajudge

🐒
code monkey
View GitHub Profile
@ciarajudge
ciarajudge / epinow2-covid-rt-national.R
Last active November 30, 2021 13:25 — forked from seabbs/epinow2-covid-rt-national.R
Example of using EpiNow2 to estimate the Rt of Covid-19 in last 3 months for a country in the ECDC dataset. See the documentation for more details and examples of producing estimates for subregional areas: https://epiforecasts.io/EpiNow2/
# packages
# install.packages(c("data.table", "remotes", "EpiNow2"))
# remotes::install_github("epiforecasts/covidregionaldata")
library(data.table)
library(EpiNow2)
library(covidregionaldata)
# target country (must be present in ECDC data)
country <- "france"
@ciarajudge
ciarajudge / epinow2-covid-rt-region.R
Created November 30, 2021 13:22 — forked from seabbs/epinow2-covid-rt-region.R
Example of using EpiNow2 to estimate the Rt of Covid-19 in last 3 months for a region in a country supported in covidregionaldata. See the documentation for more details and examples: https://epiforecasts.io/EpiNow2/
# packages
# install.packages(c("data.table", "remotes", "EpiNow2"))
# remotes::install_github("epiforecasts/EpiNow2")
# remotes::install_github("epiforecasts/covidregionaldata")
library(data.table)
library(EpiNow2)
library(covidregionaldata)
# target country (must be supported in covidregionaldata)
country <- "uk" # harder to fit "india"