From f907b9a4cbf0da83008e11d70b8a4fe2c65d1445 Mon Sep 17 00:00:00 2001 From: "T.W.Rushby" <twr1m15@srv02405.soton.ac.uk> Date: Wed, 22 Jul 2020 12:06:03 +0100 Subject: [PATCH] Fix file paths to work on server. --- howTo/gisExample.R | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/howTo/gisExample.R b/howTo/gisExample.R index 4546c7e..3f0f2e4 100644 --- a/howTo/gisExample.R +++ b/howTo/gisExample.R @@ -15,7 +15,8 @@ reqLibs <- c("leaflet", "drake", # what's done stays done "here", # here "lubridate", # dates and times - "bookdown" # for making reports (should also install knittr etc) + "bookdown", # for making reports (should also install knittr etc) + "htmltools" ) # install/load them woRkflow::loadLibraries(reqLibs) @@ -25,7 +26,7 @@ woRkflow::loadLibraries(reqLibs) # Set path for geography data dPathGeo <- paste0(dPath,"geography/census/") # Set path for SAVE area-based estimated electricity demand profile data -dPathSAVE <- sub("/data", "/SAVE/data", dPath,fixed = TRUE) +dPathSAVE <- paste0(dPath,"SAVE/output/GIS/OAstats/") # Load data ---- @@ -112,7 +113,7 @@ st_crs(sf_data) # now CRS shows EPSG: 4326 (what leaflet wants) # Merge SAVE oa level demand estimates data # Load file - created by gisDataProcess.Rmd in SAVE project -saveOAdata <- read.csv(paste0(dPathSAVE,"output/GIS/OAstats/gisExportRv2.csv"),stringsAsFactors = FALSE) +saveOAdata <- read.csv(paste0(dPathSAVE,"gisExportRv2.csv"),stringsAsFactors = FALSE) # Join with output area data saveOAprofiles <- left_join(saveOAdata,sf_data, by = c("oaCode" = "oa11cd")) %>% -- GitLab