-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from dataknut/gbPaperEdits
folding in GB paper edits
- Loading branch information
Showing
318 changed files
with
38,468 additions
and
1,133 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
#' \code{addVeDayDate} adds label for VE day 2020 where x axis is a date. Should work in any time-zone | ||
#' \code{addVeDayDate} adds extended weekend shading and label for VE day 2020 where x axis is a date. Should work in any time-zone | ||
#' | ||
#' @param p the plot to add them to | ||
#' @param yLoc the reltative height of the label (so you can stagger them on a plot) | ||
#' @param yMin the smallest y value | ||
#' @param yMax the largest y value | ||
#' @author Ben Anderson, \email{b.anderson@@soton.ac.uk} (original) | ||
#' @export | ||
#' | ||
addVeDayDate <- function(p, yMin, yMax){ | ||
p <- p + annotate("text", x = as.Date("2020-05-08"), | ||
y = yMax*gcParams$labelPos, | ||
addVeDayDate <- function(p, yLoc, yMin, yMax){ | ||
p <- p + annotate("rect", xmin = as.Date("2020-05-08"), | ||
xmax = as.Date("2020-05-09"), # 3 day weekend starting Friday (in UK) | ||
ymin = yMin, ymax = yMax, | ||
alpha = 0.5, fill = gcParams$weFill) + #gcParams$weAlpha | ||
annotate("text", x = as.Date("2020-05-08"), | ||
y = yLoc * yMax, | ||
label = "VE Day 2020") | ||
return(p) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
#' \code{addVeDayDateTime} adds label for VE day 2020 where x axis is a dateTime. Should work in any time-zone. | ||
#' \code{addVeDayDateTime} adds extended weekend shading and label for VE day 2020 where x axis is a dateTime. | ||
#' Should work in any time-zone. | ||
#' | ||
#' @param p the plot to add them to | ||
#' @param yLoc the relative location of the label (% of max plot height) | ||
#' @param yMin the smallest y value | ||
#' @param yMax the largest y value | ||
#' @author Ben Anderson, \email{b.anderson@@soton.ac.uk} (original) | ||
#' @export | ||
#' | ||
addVeDayDateTime <- function(p, yMin, yMax){ | ||
p <- p + annotate("text", x = lubridate::as_datetime("2020-05-08 12:00:00"), | ||
y = yMax*gcParams$labelPos, | ||
addVeDayDateTime <- function(p, yLoc, yMin, yMax){ | ||
p <- p + annotate("rect", xmin = lubridate::as_datetime("2020-05-08 00:00:00"), | ||
xmax = lubridate::as_datetime("2020-05-10 23:59:59"), # 3 day weekend starting Friday (in the UK) | ||
ymin = yMin, ymax = yMax, | ||
alpha = gcParams$weAlpha, fill = gcParams$weFill) + # VE Day | ||
annotate("text", x = lubridate::as_datetime("2020-05-08 12:00:00"), | ||
y = yLoc * yMax, | ||
label = "VE Day 2020") | ||
return(p) | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#' \code{addWhitsunDate} adds extended weekend shading and label for UK Whit Sunday (late spring bank holiday) where x axis is a date. Should work in any time-zone | ||
#' | ||
#' @param p the plot to add them to | ||
#' @param yLoc the reltative height of the label (so you can stagger them on a plot) | ||
#' @param yMin the smallest y value | ||
#' @param yMax the largest y value | ||
#' @author Ben Anderson, \email{b.anderson@@soton.ac.uk} (original) | ||
#' @export | ||
#' | ||
addWhitsunDate <- function(p, yLoc, yMin, yMax){ | ||
p <- p + annotate("rect", xmin = as.Date("2020-05-25"), | ||
xmax = as.Date("2020-05-26"), # 3 day weekend starting Saturday (in UK) | ||
ymin = yMin, ymax = yMax, | ||
alpha = 0.5, fill = gcParams$weFill) + | ||
annotate("text", x = as.Date("2020-05-25"), | ||
y = yLoc * yMax, | ||
label = "Whitsun 2020") | ||
return(p) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#' \code{addWhitsunDate} adds extended weekend shading and label for UK Whit Sunday (late spring bank holiday) | ||
#' where x axis is a dateTime. Should work in any time-zone | ||
#' | ||
#' @param p the plot to add them to | ||
#' @param yLoc the reltative height of the label (so you can stagger them on a plot) | ||
#' @param yMin the smallest y value | ||
#' @param yMax the largest y value | ||
#' @author Ben Anderson, \email{b.anderson@@soton.ac.uk} (original) | ||
#' @export | ||
#' | ||
addWhitsunDateTime <- function(p, yLoc, yMin, yMax){ | ||
p <- p + annotate("rect", xmin = lubridate::as_datetime("2020-05-25 00:00:00"), | ||
xmax = lubridate::as_datetime("2020-05-25 23:59:59"), # 3 day weekend starting Saturday (in UK) | ||
ymin = yMin, ymax = yMax, | ||
alpha = 0.5, fill = gcParams$weFill) + | ||
annotate("text", x = lubridate::as_datetime("2020-05-25 12:00:00"), | ||
y = yLoc * yMax, | ||
label = "Whitsun 2020") | ||
return(p) | ||
} |
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
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.