mirror of
https://github.com/kidwellj/mapping_environmental_action.git
synced 2024-11-01 07:52:21 +00:00
added biblio.bib
This commit is contained in:
parent
fd98ba4287
commit
ec21580f31
23
testing_sf_plot_times.R
Normal file
23
testing_sf_plot_times.R
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
require(RCurl) # used for fetching reproducible datasets
|
||||||
|
require(sf) # new simplefeature data class, supercedes sp in many ways
|
||||||
|
# using GEOS 3.6.1, GDAL 2.1.3, PROJ 4.9.3
|
||||||
|
require(sp) # needed for proj4string, deprecated by sf()
|
||||||
|
require(rgdal) # version version: 1.3-6
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (file.exists("data/National_Forest_Inventory_Woodland_Scotland_2017.shp") == FALSE) {
|
||||||
|
download.file("https://opendata.arcgis.com/datasets/3cb1abc185a247a48b9d53e4c4a8be87_0.zip?outSR=%7B%22wkid%22%3A27700%2C%22latestWkid%22%3A27700%7D",
|
||||||
|
destfile = "data/National_Forest_Inventory_Woodland_Scotland_2017.zip")
|
||||||
|
unzip("data/National_Forest_Inventory_Woodland_Scotland_2017.zip", exdir = "data")
|
||||||
|
}
|
||||||
|
|
||||||
|
forest_inventory <- st_read("data/National_Forest_Inventory_Woodland_Scotland_2017.shp")
|
||||||
|
forest_inventory_sp <- readOGR("./data", "National_Forest_Inventory_Woodland_Scotland_2017")
|
||||||
|
|
||||||
|
|
||||||
|
ggplot() +
|
||||||
|
geom_sf(data = forest_inventory)
|
||||||
|
|
||||||
|
ggplot() +
|
||||||
|
geom_polygon(data = forest_inventory_sp)
|
Loading…
Reference in a new issue