| #!bin/bash | |
| cd /home/azureuser/covid-rt-estimates | |
| git add --all | |
| git commit -m "update estimates" | |
| git push |
| #!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 |
| 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 |
| #!bin/bash | |
| sudo apt-get update | |
| sudo apt-get install -y docker.io | |
| sudo docker login docker.pkg.github.com | |
| sudo docker pull docker.pkg.github.com/epiforecasts/epinow2/epinow2:latest | |
| sudo docker tag docker.pkg.github.com/epiforecasts/epinow2/epinow2:latest epinow2 | |
| #!/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 |
| git subtree split --squash --prefix docs -b gh-pages | |
| git push -f origin gh-pages:gh-pages | |
| git branch -D gh-pages |
| library(EpiNow) | |
| library(EpiSoon) | |
| library(data.table) | |
| #1. Input a vector of Rt estimates, and vector to initialise cases, and a generation time | |
| initial_cases <- 100 | |
| initial_date <- as.Date("2020-03-01") | |
| rts <- c(rep(2, 20), (2 - 1:15 * 0.1), rep(0.5, 10)) | |
| ## Simulating cases |
| # Packages ----------------------------------------------------------------- | |
| require(data.table, quietly = TRUE) | |
| require(future, quietly = TRUE) | |
| ## Require for data and nowcasting | |
| # require(EpiNow, quietly = TRUE) | |
| # require(NCoVUtils, quietly = TRUE) | |
| ## Required for forecasting | |
| # require(future.apply, quietly = TRUE) |
| #!bin/bash | |
| ## This requires java and bfg to be installed | |
| ## bfg: https://rtyley.github.io/bfg-repo-cleaner/ | |
| ## Assumes that the repo is in the current directory | |
| ## Remove all .rds and .png from the Git history | |
| java -jar bfg.jar --delete-files "*.rds" $1 | |
| java -jar bfg.jar --delete-files "*.png" $1 |
| sudo docker pull jcrodriguez1989/rco | |
| mkdir rco_results | |
| sudo docker run -v /rco_results:/rco_results -e RCO_PKG=getTBinR jcrodriguez1989/rco | |
| cd rco_results |