Introduction to R and RStudioProject management in RStudioIntroduction to R
Figure 1
![RStudio project logo with five lines, each leading from the logo towards one of the five boxes with texts: 'data/', 'data_output/', 'documents/', 'fig_output/', 'scripts/'](../fig/rstudio_project_files.jpeg)
Data Structures
Exploring Data Frames & Data frame Manipulation with dplyrExploring Data framesData frame Manipulation with dplyr
Figure 1
Source: Data
Carpentry R for Social Scientists
Introduction to visualisationIntroduction to VisualisationWriting data
Figure 1
![](../fig/04-intro-to-visualisation-rendered-ggplot-1.png)
Figure 2
![](../fig/04-intro-to-visualisation-rendered-ggplot-col-1.png)
Figure 3
![](../fig/04-intro-to-visualisation-rendered-ggplot-coord-flip-1.png)
Figure 4
![](../fig/04-intro-to-visualisation-rendered-ggplot-color-1.png)
Figure 5
![](../fig/04-intro-to-visualisation-rendered-ggplot-colors-1.png)
Figure 6
![](../fig/04-intro-to-visualisation-rendered-ggplot-colors-adapt-1.png)
Figure 7
![](../fig/04-intro-to-visualisation-rendered-ggplot-call-1.png)
Figure 8
![](../fig/04-intro-to-visualisation-rendered-ggplot-titles-1.png)
Introduction to Geospatial Concepts
Figure 1
![The shape of the Earth. Source: United Nations Statistics Division and International Cartographic Association (2012).](https://unstats.un.org/unsd/geoinfo/ungegn/docs/_data_icacourses/_ImagesModules/_selfstudy/S06_images/S06_03_a00.jpg)
Figure 2
![Geographical latitude and longitude. Source: van der Marel (2014).](../fig/latlon.png)
Figure 3
![Map projection represented as flattening an orange peel. Source: Data Carpentry (2023).](https://datacarpentry.org/organization-geospatial/fig/orange-peel-earth.jpg)
Figure 4
![Cylindrical, conic, and azimuthal map projections. Source: Knippers (2009).](https://kartoweb.itc.nl/geometrics/Bitmaps/Intro%201.9a.gif)
Figure 5
![Rotterdam in two different CRS](../fig/rotterdam-crs.png)
Figure 6
![](../fig/scalebar.png)
Figure 7
![Same geographical area as raster and vector data](../fig/vector-raster-1.png)
Figure 8
![Same geographical area as raster and vector data (Source: Saab, 2003)](../fig/vector-raster-2.png)
Open and Plot Vector Layers
Figure 1
![Geometry in QGIS](../fig/geometry-qgis.png)
Figure 2
![Geometry in R](../fig/geometry-r.png)
Figure 3
![](../fig/09-open-and-plot-vector-layers-rendered-plot-boundary-1.png)
Explore and plot by vector layer attributesQuery Vector Feature Metadata
Figure 1
![Map of cycleways in Delft.](../fig/10-explore-and-plot-by-vector-layer-attributes-rendered-plot-cycleway-1.png)
Figure 2
![](../fig/10-explore-and-plot-by-vector-layer-attributes-rendered-plot-motorway-1.png)
Figure 3
![](../fig/10-explore-and-plot-by-vector-layer-attributes-rendered-plot-highway-types-1.png)
Figure 4
![](../fig/10-explore-and-plot-by-vector-layer-attributes-rendered-plot-highway-types2-1.png)
Figure 5
![](../fig/10-explore-and-plot-by-vector-layer-attributes-rendered-plot-cycleways2-1.png)
Plot multiple shapefiles
Figure 1
![](../fig/11-plot-multiple-shape-files-rendered-plot-multiple-1.png)
Figure 2
![](../fig/11-plot-multiple-shape-files-rendered-plot-multiple2-1.png)
Figure 3
![](../fig/11-plot-multiple-shape-files-rendered-plot-multiple3-1.png)
Figure 4
![](../fig/11-plot-multiple-shape-files-rendered-plot-leisure-locations-1.png)
Handling Spatial Projections & CRS
Figure 1
![](../fig/12-handling-spatial-projection-and-crs-rendered-plot-minicipal-boundary-1.png)
Figure 2
![](../fig/12-handling-spatial-projection-and-crs-rendered-plot-boundaries-1.png)
Figure 3
![](../fig/12-handling-spatial-projection-and-crs-rendered-plot-boundaries2-1.png)
Figure 4
![](../fig/12-handling-spatial-projection-and-crs-rendered-plot-boundary-zh-1.png)
Intro to Raster Data
Figure 1
![Raster plot with `ggplot2` using the viridis color scale](../fig/13-intro-to-raster-data-rendered-first-rast-plot-1.png)
ggplot2
using the viridis color scale
Figure 2
![Single- and multi-band raster](https://datacarpentry.org/r-raster-vector-geospatial/fig/dc-spatial-raster/single_multi_raster.png)
Plot Raster Data
Figure 1
![](../fig/14-plot-raster-data-rendered-dsm-fct-1.png)
Figure 2
![](../fig/14-plot-raster-data-rendered-plot-dsm-fct-cb-1.png)
Figure 3
The plot above uses the default colours inside
ggplot2
for
raster objects. We can specify our own colours to make the plot look a
little nicer. R has a built in set of colours for plotting terrain
available through the terrain.colors()
function. Since we
have three bins, we want to create a 3-colour palette:
Figure 4
![](../fig/14-plot-raster-data-rendered-plot-dsm-fct-cb3-1.png)
Figure 5
The axis labels x and y are not necessary, so we can turn them off by
passing
element_blank()
to the axis.title
argument in the theme()
function.
Figure 6
![](../fig/14-plot-raster-data-rendered-plot-dsm-fct-cb5-1.png)
Figure 7
![](../fig/14-plot-raster-data-rendered-plot-dsm-fct-cb6-1.png)
Reproject Raster Data
Figure 1
![The difference between DSM and DTM. Source: National Ecological Observatory Network (NEON).](../fig/dsm-dtm.png)
Figure 2
Our results are curious - neither the DTM (
DTM_TUD_df
) nor
the hillshade (DTM_hill_TUD_df
) are plotted. Let’s try to
plot the DTM on its own to make sure the data are there.
Figure 3
![](../fig/15-reproject-raster-data-rendered-plot-dtm-1.png)
Figure 4
![](../fig/15-reproject-raster-data-rendered-plot-hill-1.png)
Figure 5
![](../fig/15-reproject-raster-data-rendered-plot-dtm-hill-projected-1.png)
Raster Calculations
Figure 1
![Source: National Ecological Observatory Network (NEON).](https://datacarpentry.org/r-raster-vector-geospatial/fig/dc-spatial-raster/lidarTree-height.png)
Figure 2
![](../fig/16-raster-calculations-rendered-plot-dtm-1.png)
Figure 3
![](../fig/16-raster-calculations-rendered-plot-dsm-1.png)
Figure 4
![](../fig/16-raster-calculations-rendered-plot-chm-1.png)
Figure 5
Notice that the range of values for the output CHM starts right below 0
and ranges to almost 100 meters. Does this make sense for buildings and
trees in Delft?
Figure 6
![](../fig/16-raster-calculations-rendered-chm-challenge-1.png)
Figure 7
![](../fig/16-raster-calculations-rendered-chm-challenge-2.png)
Work with Multi-Band Rasters
Figure 1
![](../fig/17-work-with-multi-band-rasters-rendered-plot-rgb-band1-1.png)
Figure 2
![](../fig/17-work-with-multi-band-rasters-rendered-unnamed-chunk-1-1.png)
Figure 3
![](../fig/17-work-with-multi-band-rasters-rendered-plot-rgb-band2-1.png)
Figure 4
![](../fig/17-work-with-multi-band-rasters-rendered-plot-rgb-1.png)
Import and Visualise OSM Data
Figure 1
The result looks like this:
Figure 2
![Brielle, Netherlands](../fig/Brielle_NL.jpeg)
Figure 3
![Brielle, New Jersey Brielle, New Jersey](../fig/Brielle_NJ.jpeg)
Figure 4
![The OSMdata Documentation page](../fig/osmdata.png)
Figure 5
![The Overpass Query Documentation page](../fig/opq.png)
Figure 6
![](../fig/18-import-and-visualise-osm-data-rendered-map-1.png)
Figure 7
![](../fig/18-import-and-visualise-osm-data-rendered-Replicability-1.png)
Figure 8
![](../fig/18-import-and-visualise-osm-data-rendered-Replicability-2.png)
Basic GIS operations with R and sf
Figure 1
![](../fig/19-basic-gis-with-r-sf-rendered-recap-1.png)
Figure 2
![](../fig/19-basic-gis-with-r-sf-rendered-buffer-1.png)
Figure 3
![](../fig/19-basic-gis-with-r-sf-rendered-centroids-1.png)
Figure 4
![](../fig/19-basic-gis-with-r-sf-rendered-intersection-1.png)
Figure 5
![](../fig/19-basic-gis-with-r-sf-rendered-mapping-1.png)
Figure 6
![](../fig/19-basic-gis-with-r-sf-rendered-area-1.png)
Figure 7
![](../fig/19-basic-gis-with-r-sf-rendered-parameters-1.png)