L12: Geometric Operations with Vectors

Spatial Joins and Centroids

Bogdan G. Popescu

John Cabot University

Intro

The main goals for the include:

  • Further familiarize ourselves with vector layers: points, lines, and polygons
  • Examine spatial and non-spatial properties of vector layers
  • Create subsets of vector layers based on their attributes

Specifics:

We will again make use to the sf package:

  • join data to a vector by location
  • agregate points by polygon

Join by Location

We will work with wildfires data to demonstrate the principles of join by location

Spain is one of the countries worst affected by wildfires in recent times.

We try to match provinces with fires.

Just August of 2021

The latest year for which data is available is 2021.

Data

To obtain this, we need to collect some data

First, go to https://gadm.org and download the shapefiles for Spain

Second, obtain wildfire data from the NASA website: https://firms.modaps.eosdis.nasa.gov

Data: irms.modaps.eosdis.nasa.gov