diff --git a/howTo/gisExample.R b/howTo/gisExample.R index 4546c7edc323a3b117c2acb96ebcae1109f8d41d..3f0f2e4f63e8aeab009ca6dada6798821c8288c6 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")) %>%