# setwd("C:/Users/Emily Leslie/Documents/PathTo100/")
getwd()
## [1] "C:/Users/Emily Leslie/Documents/PathTo100"
# load simplefeatures library
# install.packages("sf")
library(sf)
## Linking to GEOS 3.6.1, GDAL 2.2.3, PROJ 4.9.3
# import data
# To import shapefiles we use the sf library function st_read(). st_read() requires the file path to the shapefile.
# the first layer we want to load is the background for the figure. Plot the continent with gray fill.
ct <- st_read("Data/continent/continent.shp")
## Reading layer `continent' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\continent\continent.shp' using driver `ESRI Shapefile'
## Simple feature collection with 8 features and 5 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -16900910 ymin: -6972041 xmax: 16900900 ymax: 15297990
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
library(tmap)
# Define the area of interest, which can be done by creating a new spatial object, ct_region.
ct_region = st_bbox(c(xmin = -874210.8, xmax = 1051539,
ymin = 535177.8, ymax = 2926678),
crs = st_crs(ct)) %>%
st_as_sfc()
# plot the area of interest and background
tm_shape(ct, bbox = ct_region) + tm_fill()
# once we've confirmed it looks the way we want, we can assign the map object to a variable and bgein adding to it
ct_map = tm_shape(ct, bbox = ct_region) + tm_fill()
#set the background color to blue for the ocean
map2 = ct_map + tm_layout(bg.color = "lightblue")
# Add the Western states
# first create a simple feature object "states"
# use st_read function as before
states <- st_read("Data/USAboundaries_aea/USAboundaries_aea.shp")
## Reading layer `USAboundaries_aea' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\USAboundaries_aea\USAboundaries_aea.shp' using driver `ESRI Shapefile'
## Simple feature collection with 51 features and 56 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -4703607 ymin: 456533.4 xmax: 3563081 ymax: 5625473
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
fullWest <- st_read("Data/geogMasks/fullWest.shp")
## Reading layer `fullWest' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\geogMasks\fullWest.shp' using driver `ESRI Shapefile'
## Simple feature collection with 11 features and 57 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -872377.6 ymin: 922080.2 xmax: 1052019 ymax: 2926679
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
# Then add the map object "states" to the map. options are tm_boundary, tm_fill, or others.
# When using tm_fill(), it will set the fill color to grey by default.
mapBackground = map2 + tm_shape(states) + tm_fill() +
tm_shape(fullWest) + tm_polygons(col = "white")
mapBackground
That looks like a good background. Now we want to verlay the solar and wind project polygons.
solarProjects <- st_read("Data/SelectedSites/solarBuildoutCat1FullWECC_capped.shp")
## Reading layer `solarBuildoutCat1FullWECC_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat1FullWECC_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 511 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -687460.8 ymin: 1061178 xmax: -88730.24 ymax: 1983678
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
solarOrange = "#8c2d04"
windBlue = "#084594"
map4 = mapBackground +
tm_shape(solarProjects) + tm_fill(solarOrange)
windProjects <- st_read("Data/SelectedSites/windBuildoutCat1FullWECC_capped.shp")
## Reading layer `windBuildoutCat1FullWECC_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat1FullWECC_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1574 features and 27 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -684710.8 ymin: 1063428 xmax: 844106.7 ymax: 2581178
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapFullWest = map4 +
tm_shape(windProjects) + tm_fill(windBlue)
mapFullWest
Now that we have created a map object representing category 1 full west, let’s repeat for category 1 part west and in-state geographies.
solarPartWest <- st_read("Data/SelectedSites/solarBuildoutCat1PartWECC_capped.shp")
## Reading layer `solarBuildoutCat1PartWECC_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat1PartWECC_capped.shp' using driver `ESRI Shapefile'
## Warning in CPL_read_ogr(dsn, layer, query, as.character(options), quiet, :
## GDAL Message 1: organizePolygons() received an unexpected geometry. Either
## a polygon with interior rings, or a polygon with less than 4 points, or a
## non-Polygon geometry. Return arguments as a collection.
## Simple feature collection with 1109 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -687460.8 ymin: 1061178 xmax: 130289.2 ymax: 1968178
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windPartWest <- st_read("Data/SelectedSites/windBuildoutCat1PartWECC_capped.shp")
## Reading layer `windBuildoutCat1PartWECC_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat1PartWECC_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 701 features and 27 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -684710.8 ymin: 1063428 xmax: 792289.2 ymax: 2631678
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
partWestMask <- st_read("Data/geogMasks/partWestMask.shp")
## Reading layer `partWestMask' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\geogMasks\partWestMask.shp' using driver `ESRI Shapefile'
## Simple feature collection with 5 features and 57 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -257148.4 ymin: 1550369 xmax: 1052019 ymax: 2926679
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapPartWest = mapBackground +
# for some reason the solar layer isn't plotting come back to this.
# tm_shape(solarPartWest) + tm_fill(solarOrange) +
tm_shape(windPartWest) + tm_fill(windBlue) +
tm_shape(partWestMask) + tm_fill() +
tm_shape(states) + tm_borders()
mapPartWest
tmap_arrange(mapPartWest, mapFullWest)
solarInState <- st_read("Data/SelectedSites/solarBuildoutCat1InState_Capped.shp")
## Reading layer `solarBuildoutCat1InState_Capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat1InState_Capped.shp' using driver `ESRI Shapefile'
## Warning in CPL_read_ogr(dsn, layer, query, as.character(options), quiet, :
## GDAL Message 1: organizePolygons() received an unexpected geometry. Either
## a polygon with interior rings, or a polygon with less than 4 points, or a
## non-Polygon geometry. Return arguments as a collection.
## Simple feature collection with 1459 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -687460.8 ymin: 1061178 xmax: -13710.84 ymax: 1983678
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windInState <- st_read("Data/SelectedSites/windBuildoutCat1InState_capped.shp")
## Reading layer `windBuildoutCat1InState_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat1InState_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 99 features and 27 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -684710.8 ymin: 1063428 xmax: -193926.2 ymax: 2089876
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
inStateMask <- st_read("Data/geogMasks/inStateMask.shp")
## Reading layer `inStateMask' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\geogMasks\inStateMask.shp' using driver `ESRI Shapefile'
## Simple feature collection with 10 features and 57 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -856592.1 ymin: 922080.2 xmax: 1052019 ymax: 2926679
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapInState = mapBackground +
# for some reason the solar layer isn't plotting come back to this.
# tm_shape(solarInState) + tm_fill(solarOrange) +
tm_shape(windInState) + tm_fill(windBlue) +
tm_shape(inStateMask) + tm_fill() +
tm_shape(states) + tm_borders()
tmap_arrange(mapInState, mapPartWest, mapFullWest)
Now that we have created a facet chart representing conservation-compatibility level 1 (instate, part-west, and full-west)… Let’s repeat cor category 2 (instate, part-west, and full-west)
solarInState2 <- st_read("Data/SelectedSites/solarBuildoutCat2InState_capped.shp")
## Reading layer `solarBuildoutCat2InState_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat2InState_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1582 features and 25 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -699710.8 ymin: 1061178 xmax: -13710.84 ymax: 1969930
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windInState2 <- st_read("Data/SelectedSites/windBuildoutCat2InState_capped.shp")
## Reading layer `windBuildoutCat2InState_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat2InState_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 61 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -682552.4 ymin: 1063428 xmax: -194960.8 ymax: 2089876
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
inStateMask <- st_read("Data/geogMasks/inStateMask.shp")
## Reading layer `inStateMask' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\geogMasks\inStateMask.shp' using driver `ESRI Shapefile'
## Simple feature collection with 10 features and 57 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -856592.1 ymin: 922080.2 xmax: 1052019 ymax: 2926679
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapInState2 = mapBackground +
tm_shape(solarInState2) + tm_fill(solarOrange) +
tm_shape(windInState2) + tm_fill(windBlue) +
tm_shape(inStateMask) + tm_fill() +
tm_shape(states) + tm_borders()
#-------------------------------------------------------------------------------------
solarPartWest2 <- st_read("Data/SelectedSites/solarBuildoutCat2PartWest_capped.shp")
## Reading layer `solarBuildoutCat2PartWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat2PartWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1210 features and 25 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -687460.8 ymin: 1061178 xmax: 131789.2 ymax: 1968178
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windPartWest2 <- st_read("Data/SelectedSites/windBuildoutCat2PartWest_capped.shp")
## Reading layer `windBuildoutCat2PartWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat2PartWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 710 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -682552.4 ymin: 1063428 xmax: 802789.2 ymax: 2631678
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
partWestMask <- st_read("Data/geogMasks/partWestMask.shp")
## Reading layer `partWestMask' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\geogMasks\partWestMask.shp' using driver `ESRI Shapefile'
## Simple feature collection with 5 features and 57 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -257148.4 ymin: 1550369 xmax: 1052019 ymax: 2926679
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapPartWest2 = mapBackground +
tm_shape(solarPartWest2) + tm_fill(solarOrange) +
tm_shape(windPartWest2) + tm_fill(windBlue) +
tm_shape(partWestMask) + tm_fill() +
tm_shape(states) + tm_borders()
#-------------------------------------------------------------------------------------
solarFullWest2 <- st_read("Data/SelectedSites/solarBuildoutCat2FullWest_capped.shp")
## Reading layer `solarBuildoutCat2FullWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat2FullWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 533 features and 25 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -687460.8 ymin: 1061178 xmax: -88080.52 ymax: 1969930
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windFullWest2 <- st_read("Data/SelectedSites/windBuildoutCat2FullWest_capped.shp")
## Reading layer `windBuildoutCat2FullWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat2FullWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1928 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -682552.4 ymin: 1048021 xmax: 880646.3 ymax: 2581678
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapFullWest2 = mapBackground +
tm_shape(solarFullWest2) + tm_fill(solarOrange) +
tm_shape(windFullWest2) + tm_fill(windBlue) +
tm_shape(states) + tm_borders()
tmap_arrange(mapInState, mapPartWest, mapFullWest, mapInState2, mapPartWest2, mapFullWest2, ncol = 3)
Great, that worked. Now repeat for conservation compatibility levels 3 and 4.
solarInState3 <- st_read("Data/SelectedSites/solarBuildoutCat3InState_capped.shp")
## Reading layer `solarBuildoutCat3InState_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat3InState_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1530 features and 25 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -740473.7 ymin: 1061178 xmax: -13710.84 ymax: 2101020
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windInState3 <- st_read("Data/SelectedSites/windBuildoutCat3InState_capped.shp")
## Reading layer `windBuildoutCat3InState_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat3InState_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 29 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -575210.8 ymin: 1063428 xmax: -194960.8 ymax: 2102928
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
inStateMask <- st_read("Data/geogMasks/inStateMask.shp")
## Reading layer `inStateMask' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\geogMasks\inStateMask.shp' using driver `ESRI Shapefile'
## Simple feature collection with 10 features and 57 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -856592.1 ymin: 922080.2 xmax: 1052019 ymax: 2926679
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapInState3 = mapBackground +
tm_shape(solarInState3) + tm_fill(solarOrange) +
tm_shape(windInState3) + tm_fill(windBlue) +
tm_shape(inStateMask) + tm_fill() +
tm_shape(states) + tm_borders()
#-------------------------------------------------------------------------------------
solarPartWest3 <- st_read("Data/SelectedSites/solarBuildoutCat3PartWest_capped.shp")
## Reading layer `solarBuildoutCat3PartWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat3PartWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1452 features and 25 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -693027.1 ymin: 1061178 xmax: 129915.5 ymax: 1954428
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windPartWest3 <- st_read("Data/SelectedSites/windBuildoutCat3PartWest_capped.shp")
## Reading layer `windBuildoutCat3PartWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat3PartWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 561 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -616460.8 ymin: 1063428 xmax: 844068.2 ymax: 2630336
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
partWestMask <- st_read("Data/geogMasks/partWestMask.shp")
## Reading layer `partWestMask' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\geogMasks\partWestMask.shp' using driver `ESRI Shapefile'
## Simple feature collection with 5 features and 57 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -257148.4 ymin: 1550369 xmax: 1052019 ymax: 2926679
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapPartWest3 = mapBackground +
tm_shape(solarPartWest3) + tm_fill(solarOrange) +
tm_shape(windPartWest3) + tm_fill(windBlue) +
tm_shape(partWestMask) + tm_fill() +
tm_shape(states) + tm_borders()
#-------------------------------------------------------------------------------------
solarFullWest3 <- st_read("Data/SelectedSites/solarBuildoutCat3FullWest_capped.shp")
## Reading layer `solarBuildoutCat3FullWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat3FullWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1249 features and 25 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -693027.1 ymin: 1061178 xmax: 129915.5 ymax: 1954428
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windFullWest3 <- st_read("Data/SelectedSites/windBuildoutCat3FullWest_capped.shp")
## Reading layer `windBuildoutCat3FullWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat3FullWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 974 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -616460.8 ymin: 1063428 xmax: 869257.9 ymax: 2630336
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapFullWest3 = mapBackground +
tm_shape(solarFullWest3) + tm_fill(solarOrange) +
tm_shape(windFullWest3) + tm_fill(windBlue) +
tm_shape(states) + tm_borders()
tmap_arrange(mapInState, mapPartWest, mapFullWest, mapInState2, mapPartWest2, mapFullWest2,
mapInState3, mapPartWest3, mapFullWest3,
ncol = 3)
FOr the final touch, add category 4, and transpose the facets
solarInState4 <- st_read("Data/SelectedSites/solarBuildoutCat4InState_capped.shp")
## Reading layer `solarBuildoutCat4InState_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat4InState_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1832 features and 25 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -767210.8 ymin: 1062687 xmax: -33604.09 ymax: 2134827
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windInState4 <- st_read("Data/SelectedSites/windBuildoutCat4InState_capped.shp")
## Reading layer `windBuildoutCat4InState_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat4InState_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 28 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -648210.8 ymin: 1069178 xmax: -212960.8 ymax: 2037796
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
inStateMask <- st_read("Data/geogMasks/inStateMask.shp")
## Reading layer `inStateMask' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\geogMasks\inStateMask.shp' using driver `ESRI Shapefile'
## Simple feature collection with 10 features and 57 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -856592.1 ymin: 922080.2 xmax: 1052019 ymax: 2926679
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapInState4 = mapBackground +
tm_shape(solarInState4) + tm_fill(solarOrange) +
tm_shape(windInState4) + tm_fill(windBlue) +
tm_shape(inStateMask) + tm_fill() +
tm_shape(states) + tm_borders()
#-------------------------------------------------------------------------------------
solarPartWest4 <- st_read("Data/SelectedSites/solarBuildoutCat4PartWest_capped.shp")
## Reading layer `solarBuildoutCat4PartWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat4PartWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1396 features and 25 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -740473.7 ymin: 1062687 xmax: 270368.6 ymax: 2093178
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windPartWest4 <- st_read("Data/SelectedSites/windBuildoutCat4PartWest_capped.shp")
## Reading layer `windBuildoutCat4PartWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat4PartWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 334 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -648210.8 ymin: 1069178 xmax: 844068.2 ymax: 2630336
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
partWestMask <- st_read("Data/geogMasks/partWestMask.shp")
## Reading layer `partWestMask' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\geogMasks\partWestMask.shp' using driver `ESRI Shapefile'
## Simple feature collection with 5 features and 57 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -257148.4 ymin: 1550369 xmax: 1052019 ymax: 2926679
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapPartWest4 = mapBackground +
tm_shape(solarPartWest4) + tm_fill(solarOrange) +
tm_shape(windPartWest4) + tm_fill(windBlue) +
tm_shape(partWestMask) + tm_fill() +
tm_shape(states) + tm_borders()
#-------------------------------------------------------------------------------------
solarFullWest4 <- st_read("Data/SelectedSites/solarBuildoutCat4FullWest_capped.shp")
## Reading layer `solarBuildoutCat4FullWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\solarBuildoutCat4FullWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1412 features and 25 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -691710.8 ymin: 1062687 xmax: 840039.2 ymax: 1954428
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
windFullWest4 <- st_read("Data/SelectedSites/windBuildoutCat4FullWest_capped.shp")
## Reading layer `windBuildoutCat4FullWest_capped' from data source `C:\Users\Emily Leslie\Documents\PathTo100\Data\SelectedSites\windBuildoutCat4FullWest_capped.shp' using driver `ESRI Shapefile'
## Simple feature collection with 418 features and 26 fields
## geometry type: MULTIPOLYGON
## dimension: XYZ
## bbox: xmin: -648210.8 ymin: 1069178 xmax: 844068.2 ymax: 2630336
## epsg (SRID): NA
## proj4string: +proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-114 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
mapFullWest4 = mapBackground +
tm_shape(solarFullWest4) + tm_fill(solarOrange) +
tm_shape(windFullWest4) + tm_fill(windBlue) +
tm_shape(states) + tm_borders()
tmap_arrange(mapInState, mapInState2, mapInState3, mapInState4,
mapPartWest, mapPartWest2, mapPartWest3, mapPartWest4,
mapFullWest, mapFullWest2, mapFullWest3, mapFullWest4,
ncol = 4)