This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Note: estimate_truncation is experimental so use this for exploratory purposes | |
# only and/or with a high level of interpretation | |
# Packages ---------------------------------------------------------------- | |
# install packages | |
# install.packages(c("data.table", "purrr", "remotes", "EpiNow2")) | |
library(data.table) | |
library(purrr) | |
library(covidregionaldata) | |
library(EpiNow2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Packages ---------------------------------------------------------------- | |
library(covid19.nhs.data) | |
library(vroom) | |
library(dplyr) | |
library(tidyr) | |
library(lubridate) | |
library(gganimate) | |
#devtools::install_github("thomasp85/transformr") | |
library(transformr) | |
library(gifski) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(covidregionaldata) | |
# set up a data cache | |
start_using_memoise() | |
#> Using a cache at: /tmp/RtmphiSeWY | |
# check for supported countries | |
get_available_datasets() | |
#> # A tibble: 18 x 8 | |
#> origin class level_1_region level_2_region level_3_region type data_urls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Packages ---------------------------------------------------------------- | |
require(data.table, quietly = TRUE) | |
require(EpiNow2, quietly = TRUE) | |
require(purrr) | |
require(ggplot2) | |
# Target date ------------------------------------------------------------- | |
creation_date <- Sys.Date() | |
extraction_date <- creation_date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Packages ---------------------------------------------------------------- | |
library(covid19.nhs.data) | |
library(dplyr) | |
library(tidyr) | |
library(lubridate) | |
library(gganimate) | |
#devtools::install_github("thomasp85/transformr") | |
library(transformr) | |
library(gifski) | |
library(ggplot2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Packages ---------------------------------------------------------------- | |
library(covid19.nhs.data) | |
library(dplyr) | |
library(tidyr) | |
library(lubridate) | |
library(gganimate) | |
#devtools::install_github("thomasp85/transformr") | |
library(transformr) | |
library(gifski) | |
library(ggplot2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
cd /home/azureuser/ | |
git clone git@github.com:epiforecasts/covid-rt-estimates.git | |
cd covid-rt-estimates | |
sudo bash bin/update-docker.sh "build" | |
sudo bash bin/update-via-docker.sh | |
FILE=last-update/update-complete | |
while [ ! -f "$FILE" ]; do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
cd /home/azureuser/covid-rt-estimates | |
git add --all | |
git commit -m "update estimates" | |
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(EpiNow2) | |
library(data.table) | |
# Get example case counts | |
reported_cases <- EpiNow2::example_confirmed[1:60] | |
# Add a dummy breakpoint (used only when optionally estimating breakpoints) | |
reported_cases <- reported_cases[, breakpoint := data.table::fifelse((date >= as.Date("2020-03-16") & date <= as.Date("2020-03-29")) | date >= as.Date("2020-04-11"), | |
1, 0)] | |
# Set up example generation time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get rid of the older update script | |
rm update-via-ssh.sh | |
# Get the new update script | |
curl --fail https://raw.githubusercontent.com/epiforecasts/covid-rt-estimates/master/bin/update-via-ssh.sh > update-via-ssh.sh | |
# Run the update script | |
bash update-via-ssh.sh ~/.ssh/id_rsa azureuser@$1 github-username-here github-pat-here |