From ec21580f315b8420f8e5ce0c1aeac3a7aa5d2ce4 Mon Sep 17 00:00:00 2001 From: Jeremy Kidwell Date: Tue, 5 Feb 2019 08:43:36 +0000 Subject: [PATCH] added biblio.bib --- testing_sf_plot_times.R | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 testing_sf_plot_times.R diff --git a/testing_sf_plot_times.R b/testing_sf_plot_times.R new file mode 100644 index 0000000..2931ef4 --- /dev/null +++ b/testing_sf_plot_times.R @@ -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) \ No newline at end of file