From a2e87a98acf462c86d4c87a455555e07eaafd284 Mon Sep 17 00:00:00 2001 From: Jeremy Kidwell Date: Tue, 16 Oct 2018 15:19:09 +0100 Subject: [PATCH] added reproducible url for SIMD --- mapping_draft.Rmd | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mapping_draft.Rmd b/mapping_draft.Rmd index 8e2fd7d..097c763 100644 --- a/mapping_draft.Rmd +++ b/mapping_draft.Rmd @@ -494,7 +494,15 @@ dev.off() ```{r simd} # read in relevant polygons, Scottish Index of Multiple deprivation -simd <- readOGR("data", "simd_04-12_all_data") +download.file("http://simd.scot/2016/data/simd2016_withgeog.zip", + destfile = "data/simd2016_withgeog.zip") +unzip("data/simd2016_withgeog.zip", exdir = "data", junkpaths = TRUE) +simd_shapes <- readOGR("./data", "sc_dz_11") +simd_indicators <- read.csv("./data/simd2016_withinds.csv") +simd <- merge(x=simd_shapes, y=simd_indicators, by="Data_Zone") + +# commenting out old dataset in light of reproducible version above +# simd <- readOGR("data", "simd_04-12_all_data") # STAGE 1, augment each dataset with relevant (geolocated) columns from SIMD # examine which ecs fall within each SIMD classification