final fixes on CRS, completed inset maps

This commit is contained in:
Jeremy Kidwell 2019-03-01 14:22:45 +00:00
parent 15c4c480c3
commit 2acd7999fd
7 changed files with 19 additions and 57 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 KiB

View file

@ -930,14 +930,12 @@ if (file.exists("data/SSSI_SCOTLAND.shp") == FALSE) {
# download.file("", destfile = "data/SSSI_SCOTLAND_ESRI.zip") # download.file("", destfile = "data/SSSI_SCOTLAND_ESRI.zip")
unzip("data/SSSI_SCOTLAND_ESRI.zip", exdir = "data") unzip("data/SSSI_SCOTLAND_ESRI.zip", exdir = "data")
} }
sssi <- st_read("data/SSSI_SCOTLAND.shp") %>% st_transform(paste0("+init=epsg:",27700)) sssi <- st_read("data/SSSI_SCOTLAND.shp") %>% st_transform(paste0("+init=epsg:",27700))
sssi_sp <- readOGR("./data", "SSSI_SCOTLAND") sssi_sp <- readOGR("./data", "SSSI_SCOTLAND")
# Generate simplified polygon for plots below # Generate simplified polygon for plots below
sssi_simplified <- st_simplify(sssi) sssi_simplified <- st_simplify(sssi)
# sssi_simplified_sp <- rgeos::gSimplify(sssi_sp, tol=3) # sssi_simplified_sp <- rgeos::gSimplify(sssi_sp, tol=3)
# 2. Download wild land areas: # 2. Download wild land areas:
if (file.exists("data/WILDLAND_SCOTLAND.shp") == FALSE) { if (file.exists("data/WILDLAND_SCOTLAND.shp") == FALSE) {
@ -948,11 +946,9 @@ unzip("data/WILDLAND_SCOTLAND_ESRI.zip", exdir = "data")
} }
wildland <- st_read("data/WILDLAND_SCOTLAND.shp") %>% st_transform(paste0("+init=epsg:",27700)) wildland <- st_read("data/WILDLAND_SCOTLAND.shp") %>% st_transform(paste0("+init=epsg:",27700))
wildland_sp <- readOGR("./data", "WILDLAND_SCOTLAND")
# Generate simplified polygon for plots below # Generate simplified polygon for plots below
wildland_simplified <- st_simplify(wildland) wildland_simplified <- st_simplify(wildland)
# 3. Download data for National Forest Inventory: # 3. Download data for National Forest Inventory:
# Note: UK-wide data is here: https://opendata.arcgis.com/datasets/bcd6742a2add4b68962aec073ab44138_0.zip?outSR=%7B%22wkid%22%3A27700%2C%22latestWkid%22%3A27700%7D # Note: UK-wide data is here: https://opendata.arcgis.com/datasets/bcd6742a2add4b68962aec073ab44138_0.zip?outSR=%7B%22wkid%22%3A27700%2C%22latestWkid%22%3A27700%7D
@ -964,7 +960,6 @@ unzip("data/National_Forest_Inventory_Woodland_Scotland_2017.zip", exdir = "data
} }
forestinv <- st_read("data/National_Forest_Inventory_Woodland_Scotland_2017.shp") %>% st_transform(paste0("+init=epsg:",27700)) forestinv <- st_read("data/National_Forest_Inventory_Woodland_Scotland_2017.shp") %>% st_transform(paste0("+init=epsg:",27700))
forestinv_sp <- readOGR("./data", "National_Forest_Inventory_Woodland_Scotland_2017")
# Generate simplified polygon for plots below # Generate simplified polygon for plots below
forestinv_simplified <- st_simplify(forestinv) forestinv_simplified <- st_simplify(forestinv)
@ -1024,16 +1019,7 @@ forestinv_buf500 <- st_buffer(forestinv_simplified, dist = 500)
# Calculate number of groups within polygons # Calculate number of groups within polygons
# calculate coincidence of ecs points within each polygons and buffers for each # calculate coincidence of ecs points within each polygons and buffers for each
# todo, possibly use st_difference(sssi_buf50, sssi) # TODO: possibly use st_difference(sssi_buf50, sssi)
# TODO: sort out why these layers aren't inheriting crs
st_crs(wildland) <- 27700
st_crs(wildland_buf50) <- 27700
st_crs(wildland_buf500) <- 27700
st_crs(forestinv) <- 27700
st_crs(forestinv_buf50) <- 27700
st_crs(forestinv_buf500) <- 27700
# TODO: consider subsetting instead here, e.g.: # TODO: consider subsetting instead here, e.g.:
# plot(lnd, col = "lightgrey") # plot the london_sport object # plot(lnd, col = "lightgrey") # plot the london_sport object
@ -1080,6 +1066,7 @@ sssi_counts <- as.data.frame(sssi_counts)
colnames(sssi_counts) <- c("Within SSSIs", "...50m", "...500m") colnames(sssi_counts) <- c("Within SSSIs", "...50m", "...500m")
# Generate dataframe from rows based on percentages of totals # Generate dataframe from rows based on percentages of totals
# TODO: Work with ecs_sf etc., but first sort out why length is different between shapefiles
ecs_sssi_row_pct <- ecs_sssi_row/length(ecs) ecs_sssi_row_pct <- ecs_sssi_row/length(ecs)
pow_sssi_row_pct <- pow_sssi_row/length(pow_pointX) pow_sssi_row_pct <- pow_sssi_row/length(pow_pointX)
dtas_sssi_row_pct <- dtas_sssi_row/length(dtas) dtas_sssi_row_pct <- dtas_sssi_row/length(dtas)
@ -1095,7 +1082,6 @@ colnames(sssi_counts_pct) <- c("% Within SSSIs", "% within 50m", "% within 500m"
# Merge into larger dataframe # Merge into larger dataframe
sssi_counts_merged <- cbind(sssi_counts, sssi_counts_pct) sssi_counts_merged <- cbind(sssi_counts, sssi_counts_pct)
# Generate dataframe based on wildland buffers # Generate dataframe based on wildland buffers
ecs_wildland_row <- c(sum(apply(st_within(ecs_sf, wildland, sparse=FALSE), 1, any)), sum(apply(st_within(ecs_sf, wildland_buf50, sparse=FALSE), 1, any)), sum(apply(st_within(ecs_sf, wildland_buf500, sparse=FALSE), 1, any))) ecs_wildland_row <- c(sum(apply(st_within(ecs_sf, wildland, sparse=FALSE), 1, any)), sum(apply(st_within(ecs_sf, wildland_buf50, sparse=FALSE), 1, any)), sum(apply(st_within(ecs_sf, wildland_buf500, sparse=FALSE), 1, any)))

File diff suppressed because one or more lines are too long

View file

@ -1,13 +1,13 @@
--- ---
title: "Mapping Environmental Action in Scotland" title: "Mapping Environmental Action in Scotland"
abstract: abstract:
# thanks: "Replication files are available on the author's Github account (https://github.com/kidwellj/mapping_environmental_action). **Current version**: February 26, 2019 # thanks: "Replication files are available on the author's Github account (https://github.com/kidwellj/mapping_environmental_action). **Current version**: March 01, 2019
style: jeremy1 style: jeremy1
author: "[Jeremy H. Kidwell](http://jeremykidwell.info)" author: "[Jeremy H. Kidwell](http://jeremykidwell.info)"
affiliation: University of Birmingham affiliation: University of Birmingham
institute: University of Birmingham institute: University of Birmingham
e-mail: "[j.kidwell@bham.ac.uk](mailto:j.kidwell@bham.ac.uk)" e-mail: "[j.kidwell@bham.ac.uk](mailto:j.kidwell@bham.ac.uk)"
date: "2019-02-26" date: "2019-03-01"
bibliography: biblio.bib bibliography: biblio.bib
linkcolor: black linkcolor: black
geometry: margin=1in geometry: margin=1in
@ -89,11 +89,11 @@ Though there are too few eco-congregations and transition groups for a numerical
## Eco-Congregation Scotland groups shown by concentration in administrative regions (NUTS3) ## Eco-Congregation Scotland groups shown by concentration in administrative regions (NUTS3)
![Figure 1](figures/plot_admin_ecs_choropleth-1.png) ![Figure 1](figures/01_admin_ecs_choropleth-1.png)
![Figure 3](figures/plot_admin_ecs_normed_choropleth-1.png)![Figure 3](figures/plot_admin_ecs_normed_choropleth-2.png) ![Figure 3](figures/02_admin_ecs_normed_choropleth-1.png)![Figure 3](figures/02_admin_ecs_normed_choropleth-2.png)
Given the way population and places of worship are unevenly distributed across Scotland it is important to represent data in terms of relative distribution. For this study, we attempted to "normalise" our data in two different ways, (1) as shown by Figure 2 above, by taking population figures from the 2011 census (see data sheet in Appendix A) and (2) by adjusting relative to the number of places of worship in each council region.[^15914204] The latter of these two can yield particularly unexpected results. Thus, of the 4048 "places of worship" in Scotland, the highest concentration is actually the region, with 435, second is 329 (). Rank of Council Areas by population and number of places of worship is also included in Appendix A. Given the way population and places of worship are unevenly distributed across Scotland it is important to represent data in terms of relative distribution. For this study, we attempted to "normalise" our data in two different ways, (1) as shown by Figure 2 above, by taking population figures from the 2011 census (see data sheet in Appendix A) and (2) by adjusting relative to the number of places of worship in each council region.[^15914204] The latter of these two can yield particularly unexpected results. Thus, of the 4048 "places of worship" in Scotland, the highest concentration is actually the region, with 435, second is 329 (). Rank of Council Areas by population and number of places of worship is also included in Appendix A.
@ -105,11 +105,11 @@ Turning to the total of 4048 "places of worship" in Scotland, we find a slightly
Whereas our initial measurements indicated a prominent lead for Edinburgh, by normalising our data in this way we can highlight the stronger-than-expected presence of several others that might otherwise escape notice because they lie in a region with significantly lower population or numerically less places of worship. Taking the PointX data on "places of worship" in Scotland, we find a less dramatic picture, but also a slightly different one. The positive outliers include East Renfrewshire (3.4x) Edinburgh (2.9x), Stirling (2.2), West Lothian (1.9x) and Aberdeen (1.5x). Again, negative outliers are far less dramatic, with only Midlothian possessing a ratio of more than 100% negative difference from the number of "places of worship" at 1.5x *fewer*. Whereas our initial measurements indicated a prominent lead for Edinburgh, by normalising our data in this way we can highlight the stronger-than-expected presence of several others that might otherwise escape notice because they lie in a region with significantly lower population or numerically less places of worship. Taking the PointX data on "places of worship" in Scotland, we find a less dramatic picture, but also a slightly different one. The positive outliers include East Renfrewshire (3.4x) Edinburgh (2.9x), Stirling (2.2), West Lothian (1.9x) and Aberdeen (1.5x). Again, negative outliers are far less dramatic, with only Midlothian possessing a ratio of more than 100% negative difference from the number of "places of worship" at 1.5x *fewer*.
![Figure 4](figures/create_admin_barplot-1.png) ![Figure 4](figures/03_admin_barplot-1.png)
## Other environmental groups shown by concentration in administrative regions (NUTS) ## Other environmental groups shown by concentration in administrative regions (NUTS)
![Figure 5](figures/create_choropleth_others-1.png)![Figure 5](figures/create_choropleth_others-2.png)![Figure 5](figures/create_choropleth_others-3.png)![Figure 5](figures/create_choropleth_others-4.png) ![Figure 5](figures/04_choropleth_others-1.png)![Figure 5](figures/04_choropleth_others-2.png)![Figure 5](figures/04_choropleth_others-3.png)![Figure 5](figures/04_choropleth_others-4.png)
## Cartogram Comparisons ## Cartogram Comparisons
@ -235,10 +235,10 @@ The key question which this analysis seeks to answer is whether ECS, or the othe
Of all the groups surveyed in this study, Eco-Congregation Scotland is the most heavily concentrated in large urban areas (33.53%), exceeding by almost 50% the rate for all places of worship (22.96% in large urban areas). Transition is a much more modest 20% and development trusts a bit lower at 15%. It is interesting to note that the rate of ECS concentration in these large urban areas matches the level of overall population distribution (34.5%). On the other end of the scale, Eco-Congregation Scotland is the least concentrated in remote rural areas (with 3.93% on level 7 and 5.44% on level 8 on the urban-rural scale), though again, they correlate roughly to the general population distribution (3.2% and 2.9% respectively). Places of worship outpace both the population of Scotland and the footprint of Eco-Congregation Scotland, with 14.98% in very remote rural areas, but this is exceeded by transition at 16.47% and both by Scottish community development trusts at 32.14%. So while Eco-Congregation Scotland correlates roughly with Scottish population distribution across the urban-rural scale, it has a considerably more urban profile than either of the other two groups surveyed. Of all the groups surveyed in this study, Eco-Congregation Scotland is the most heavily concentrated in large urban areas (33.53%), exceeding by almost 50% the rate for all places of worship (22.96% in large urban areas). Transition is a much more modest 20% and development trusts a bit lower at 15%. It is interesting to note that the rate of ECS concentration in these large urban areas matches the level of overall population distribution (34.5%). On the other end of the scale, Eco-Congregation Scotland is the least concentrated in remote rural areas (with 3.93% on level 7 and 5.44% on level 8 on the urban-rural scale), though again, they correlate roughly to the general population distribution (3.2% and 2.9% respectively). Places of worship outpace both the population of Scotland and the footprint of Eco-Congregation Scotland, with 14.98% in very remote rural areas, but this is exceeded by transition at 16.47% and both by Scottish community development trusts at 32.14%. So while Eco-Congregation Scotland correlates roughly with Scottish population distribution across the urban-rural scale, it has a considerably more urban profile than either of the other two groups surveyed.
![Figure 7](figures/create_ur_barplot-1.png) ![Figure 7](figures/07_ur_barplot-1.png)
## Eco-Congregation Scotland\nconcentrations in Urban Rural 8-fold classifications ## Eco-Congregation Scotland\nconcentrations in Urban Rural 8-fold classifications
![Figure 8](figures/create_urbanrural_ecs_chart_choropleth-1.png) ![Figure 8](figures/08_urbanrural_ecs_chart_choropleth-1.png)
# Wealth, Employment, and Literacy # Wealth, Employment, and Literacy
@ -259,7 +259,7 @@ Of all the groups surveyed in this study, Eco-Congregation Scotland is the most
### Barplot ### Barplot
![Figure 9](figures/create_simd_barplot-1.png) ![Figure 9](figures/11_simd_barplot-1.png)
### Boxplot ### Boxplot
@ -303,13 +303,6 @@ We can find divergence between transition communities and eco-congregation when
## proj4string: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +no_defs ## proj4string: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +no_defs
``` ```
```
## OGR data source with driver: ESRI Shapefile
## Source: "/Users/kidwellj/OneDrive - bham.ac.uk/writing/201708_mapping_environmental_action/data", layer: "WILDLAND_SCOTLAND"
## with 42 features
## It has 3 fields
```
``` ```
## Reading layer `National_Forest_Inventory_Woodland_Scotland_2017' from data source `/Users/kidwellj/OneDrive - bham.ac.uk/writing/201708_mapping_environmental_action/data/National_Forest_Inventory_Woodland_Scotland_2017.shp' using driver `ESRI Shapefile' ## Reading layer `National_Forest_Inventory_Woodland_Scotland_2017' from data source `/Users/kidwellj/OneDrive - bham.ac.uk/writing/201708_mapping_environmental_action/data/National_Forest_Inventory_Woodland_Scotland_2017.shp' using driver `ESRI Shapefile'
## Simple feature collection with 199698 features and 7 fields ## Simple feature collection with 199698 features and 7 fields
@ -320,14 +313,6 @@ We can find divergence between transition communities and eco-congregation when
## proj4string: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +no_defs ## proj4string: +proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +datum=OSGB36 +units=m +no_defs
``` ```
```
## OGR data source with driver: ESRI Shapefile
## Source: "/Users/kidwellj/OneDrive - bham.ac.uk/writing/201708_mapping_environmental_action/data", layer: "National_Forest_Inventory_Woodland_Scotland_2017"
## with 199698 features
## It has 7 fields
## Integer64 fields read as strings: OBJECTID
```
# Proximity to "Wilderness" # Proximity to "Wilderness"
Chasing down a curiosity, I decided to try and calculate whether proximity to "wilderness" or "scenic nature" or just trees might have some impact on generating more mobilised communities. I realised that there would be several problems with this kind of calculation up front, first being that "nature" is a deeply problematic construct, reviled by geographers and philosophers alike. With this in mind, I identified several different ways of reckoning wilderness, starting with the highly anachronistic "Scenic Land" designation from the 1970s. Then I pursued the more carefully calculated "core wild areas" generated by SNH just a few years ago. However, even the core wile areas concept has been criticised heavily, so I also expanded out my search to include all sites of special scientific interest and then went even wider to include the Scottish Forestry Service's "Native Woodland" and finally, the most generic possible measurement, any land identified as forested at the last Forest Inventory. Chasing down a curiosity, I decided to try and calculate whether proximity to "wilderness" or "scenic nature" or just trees might have some impact on generating more mobilised communities. I realised that there would be several problems with this kind of calculation up front, first being that "nature" is a deeply problematic construct, reviled by geographers and philosophers alike. With this in mind, I identified several different ways of reckoning wilderness, starting with the highly anachronistic "Scenic Land" designation from the 1970s. Then I pursued the more carefully calculated "core wild areas" generated by SNH just a few years ago. However, even the core wile areas concept has been criticised heavily, so I also expanded out my search to include all sites of special scientific interest and then went even wider to include the Scottish Forestry Service's "Native Woodland" and finally, the most generic possible measurement, any land identified as forested at the last Forest Inventory.
@ -523,9 +508,9 @@ So what did I discover? The results were inconclusive. First, it is important to
</table> </table>
![Figure 11](figures/sssi_ecs_buffer_plot-1.png) ![Figure 11](figures/14_sssi_ecs_buffer_plot-1.png)
![Figure 12](figures/all_wilderness_ecs_plot-1.png) ![Figure 12](figures/15_all_wilderness_ecs_plot-1.png)
# Appendix A # Appendix A