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
# configuring initial parameters | |
git config --global user.name "name surname" | |
git config --global usr.email "name@mail.com" | |
git config --global list | |
# create | |
ssh-keygen -t rsa -C "name@mail.com" | |
git init |
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
... |
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
message('Validating update...') | |
url <- 'https://www.gov.uk/government/publications/coronavirus-covid-19-vaccine-adverse-reactions/coronavirus-vaccine-summary-of-yellow-card-reporting' | |
x1 <- as.Date( | |
gsub('Updated ', '', rvest::html_text(rvest::html_node(xml2::read_html(url),'.publication-header__last-changed'))), | |
'%d %B %Y' | |
) | |
x2 <- readLines(file.path(dmpkg.funs::datauk_path, 'covid', 'vaccine', 'vaccine_adverse_reactions.date')) | |
if(is.na(x1)) q(save = 'no') | |
if(x1==x2) q(save = 'no') |
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
pkgs <- c('data.table', 'httr', 'jsonlite') | |
lapply(pkgs, require, char = TRUE) | |
get_catch_postcodes <- function(x_lon, y_lat, tm = 120){ | |
# <tm> input travel time is in minutes | |
# output travel time is in seconds | |
# output travel distance is in metres | |
appId <- 'INSERT HERE YOUR ID' | |
apiKey <- 'INSERT HERE YOUR API KEY' |
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
# Total Cases: https://coronavirus.data.gov.uk/ (updated after 4PM at minimum) | |
# Omicron split: https://www.gov.uk/government/publications/covid-19-omicron-daily-overview (updated at ?) | |
library(data.table) | |
library(ggplot2) | |
yc <- fread( | |
'https://api.coronavirus.data.gov.uk/v2/data?areaType=region&metric=newCasesBySpecimenDate&format=csv', | |
select = c(2, 4, 5) | |
) |
OlderNewer