[Shiny on a train] (http://suce.co.uk:8080/apps/nhs-r_fomo/) Thanks to [Chris Beeley] (https://chrisbeeley.net/)
This file contains hidden or 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
# there are a few ways of doing this.. here's one | |
`%notin%` = function(x, y) !(x %in% y) |
This file contains hidden or 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
https://community.qlik.com/t5/QlikView-Documents/QlikView-UK-Maps/ta-p/1479536 |
This file contains hidden or 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
https://guides.library.upenn.edu/datamgmt/spreadsheet | |
https://www.tandfonline.com/doi/full/10.1080/00031305.2017.1375989 | |
https://about.dataclassroom.com/blog/2019/10/23/keep-your-data-tidy | |
This file contains hidden or 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
https://jaxenter.com/10-sql-tricks-that-you-didnt-think-were-possible-125934.html |
This file contains hidden or 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
sqlFetchData <- function(connection, database, schema, table, nobs = 'All') { | |
#'wrap function to fetch data from SQL Server | |
# | |
#@ connection: an established odbc connection | |
#@ database: database name | |
#@ schema: a schema under the main database | |
#@ table: the name of the data table to be fetched. | |
#@ nobs: number of observation to be fetched. Either 'All' or an integer number. | |
# The default value is 'All'. It also supports the input of 'all', 'ALL' and |
This file contains hidden or 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
https://www.gastonsanchez.com/packyourcode/ |
This file contains hidden or 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
<script>document.write(new Date().getFullYear())</script> | |
or | |
<script>new Date().getFullYear()>2005&&document.write("-"+new Date().getFullYear());</script> |
This file contains hidden or 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(data.table) | |
library(gsheet) | |
library(ggplot2) | |
link <- 'https://docs.google.com/spreadsheets/d/1GYv4573GnJa-C21NYeDj-OhFSTwrK0SnQNF2IQFqa50/edit#gid=0' | |
import <- gsheet2text(link, format = 'tsv') | |
DT <- fread(import) | |
DT[, Date := as.IDate(DT$Date, format = "%d/%m/%Y")] |
This file contains hidden or 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(here) | |
library(data.table) | |
library(stringr) | |
setwd(here("2021-02")) | |
# read in and process | |
DT <- fread('Input.csv') |