Want to create interactive content? It’s easy in Genially!

Get started free

Lecture 2 - Mapping and Modelling Geographic Data in R

Richard Harris

Created on September 25, 2023

Lecture 1. Introduction to the course

Start designing with a free template

Discover more than 1500 professional designs like these:

Terrazzo Presentation

Visual Presentation

Relaxing Presentation

Modern Presentation

Colorful Presentation

Modular Structure Presentation

Chromatic Presentation

Transcript

Mapping and ModellingGeographic Data in R

Lecture 2

Thematic maps in R
Part 1, Intro to R Intro to statistics Intro to regression
Part 2, Mapping in R
GeographicalDataScience
Part 3, Spatial analysis in R

A map

Is a tool of visualisation, communication and (analytical) exploration

The map is...

a function of... the data the areas or points or lines or.... - the geographical representations - used to map the data the map scale ontologies: how the data are categorised, organised, grouped, etc. (e.g. map classes and the colour scheme) ... which affect our interpretation of what we see on the map Often we are simultaneously mapping and interepreting the spatial variable

In theexercises,go fromthis...

tothis...

viathis...

andthis...

To map vector data, typically need

A boundary file

A join field

The data

To map vector data, typically need

Census data about the South African municipalities
digital map of South African municipalities

A boundary file

A join field

The data

South African municipalities ID codes

Mapping in R

Others

tmap

ggplot2

Base plots

Best for extra functionality and add-ins?
Best for interactive maps?
Best for a quick and easy map?

Mapping in R

Others

tmap

ggplot2

Base plots

Best for extra functionality and add-ins?
Best for interactive maps?
Best for a quick and easy map?

ggplot2 'and friends'

sf:for support for simple features

ggspatial:for annotation

ggplot2:for the map

tidyverse:for data wrangling

ggsflabel:for labelling places

The grammar of graphics

The grammar of graphics

The aesthetics that will vary with the data
Data to be plotted
Type of plot
Customisation

The grammar of graphics

The aesthetics that will vary with the data
Data to be plotted
Type of plot
'Scaling'
Customisation

Learning by doing...

  • Lecture classes some weeks
  • These supplement the practicals
  • They will elaborate on some of the methods and concepts found in the practicals
  • Practical classes most weeks
  • With teaching support
  • Use the computers in the lab or use your own laptop
  • Opportunity to ask questions
  • These are intended to be self-paced
  • Everything is on the course website:https://profrichharris.github.io/MandM/

Learning by doing...

  • Lecture classes some weeks
  • These supplement the practicals
  • They will elaborate on some of the methods and concepts found in the practicals
  • Practical classes most weeks
  • With teaching support
  • Use the computers in the lab or use your own laptop
  • Opportunity to ask questions
  • These are intended to be self-paced
  • Everything is on the course website:https://profrichharris.github.io/MandM/
Don't worry if not everything'comes together' immediately Play around with the code - try changing some of the arguments Use ? to find out more about a function

Anyquestions?