Select Git revision
spatialecSettings.R
Ben Anderson authored
spatialecSettings.R 1.81 KiB
# ------ Global SPATIALEC Settings -------
# Set knitr options -----
knitr::opts_chunk$set(echo = FALSE) # do not echo code
knitr::opts_chunk$set(warning = TRUE)
knitr::opts_chunk$set(message = TRUE)
knitr::opts_chunk$set(fig_caption = TRUE)
knitr::opts_chunk$set(fig_height = 6) # default, make it bigger to stretch vertical axis
knitr::opts_chunk$set(fig_width = 8) # full width
knitr::opts_chunk$set(tidy = TRUE) # tidy up code in case echo = TRUE
# Local parameters ----
sParams <- list()
# > Assigns variables "sysName", "nodeName" and "userName" to global environment ----
sysInfo <- Sys.info()
sParams$sysName <- sysInfo[[1]]
sParams$nodeName <- sysInfo[[4]]
sParams$userName <- sysInfo[[7]]
# > colour blind palettes for charts ----
# http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/#a-colorblind-friendly-palette
# with grey
sParams$cbgPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# with black
sParams$cbbPalette <- c("#000000", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
# NB for plots with more categories etc use the viridis library
# https://cran.r-project.org/web/packages/viridis/vignettes/intro-to-viridis.html
# Paths ----
# > Location of includes ----
# Generally go at start or end of .Rmd reports
sParams$spatialecAbout <- paste0(here::here(), "/_includes/spatialecAbout.Rmd")
# > Green Grid data ----
sParams$ggPath <- paste0("/Volumes/hum-csafe/Research Projects/GREEN Grid")
# > NZ Census data ----
sParams$dataPath <- "~/Data/NZ_Census/data/"
sParams$gisPath <- "~/Data/NZ_Census/gis/"
sParams$areasTable2013 <- paste0(sParams$gisPath, "2013/2013_Areas_Table.txt")
# Metadata
sParams$metadata <- "Marie Sklodowska-Curie Action, 'Developing methods to model local area domestic electricity demand', SPATIALEC, Grant No 700386"