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 | |
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 | |
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
git subtree split --squash --prefix docs -b gh-pages | |
git push -f origin gh-pages:gh-pages | |
git branch -D gh-pages |
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(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 |
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(future, quietly = TRUE) | |
## Require for data and nowcasting | |
# require(EpiNow, quietly = TRUE) | |
# require(NCoVUtils, quietly = TRUE) | |
## Required for forecasting | |
# require(future.apply, quietly = TRUE) |
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 | |
## 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 |
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
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 |
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
# Get required packages - managed using pacman --------------------------- | |
# This installs packages if they are missing and otherwise loads them. | |
if (!require(pacman)) install.packages("pacman"); library(pacman) | |
p_load("tidyverse") | |
p_load("fs") | |
p_load("data.table") | |
p_load("lubridate") | |
p_load("purrr") | |
p_load("furrr") |
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
## For password management | |
git config --global user.email "s.e.abbott12@gmail.com" | |
git config --global user.name "Sam Abbott" | |
git config --global credential.helper cache | |
git remote set-url origin https://github.com/USERNAME/REPOSITORY.git | |
# github settings | |
# developer settings | |
# create access token and copy | |
# git pull/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
# Install and load the package -------------------------------------------- | |
if(!require(pacman))install.packages("pacman") | |
pacman::p_load('dplyr', 'ggplot2', 'getTBinR') | |
pacman::p_load_gh('thomasp85/patchwork') | |
pacman::p_load_gh('bbc/bbplot') | |
# Look at available datasets\ --------------------------------------------- | |
available_datasets |
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
# Install and load the package -------------------------------------------- | |
#Use install.packages(c("getTBinR", "dplyr", "getTBinR")) to get required packages | |
library(getTBinR) #TB data + visualisations | |
library(dplyr) # For data manipulation | |
library(ggplot2) # For additional visualisations etc. | |
#For storyboards - install with commented out code | |
# install.packages("devtools") | |
# devtools::install_github("thomasp85/patchwork") |