Lesson 4 : OSM Data & GIS Operations in R Part 2

Authors

Clémentine Cottineau

Ignacio Urria Yáñez

Episode 16: Basic GIS Operations with R

Videos Credits: Clémentine Cottineau, Ignacio Urria Yáñez

In this episode, you’re about to learn how to perform some of basic GIS operations using sf package in R.

Conservation in Brielle, NL

How to select the features in an old school way?

What would be the 2nd step after selecting the buildings?

What would be the biggest impact of conservation, and how to prioritize the buildings to be conserved?

Should the conservation have an offset (i.e., distance)?

Tip: Counting the buildings

The count of buildings within a zone with densities would be good measure since there are small and big buildings.

Conservation Pt. 2

Question about building count

How to know how many buildings there are?

Answer to the question

Conservation Pt. 3

Buffers

Should we work in meters in terms of the projection?

Answer to the question

There’s a second answer to the question

Buffers Pt. 2

Using the st_buffer() function

Question about st_buffer

Does the st_buffer creates the buffer from the edges and not from the central points?

Answer to the question

Union

Union operation is explained.

How to create a new variable?

Question about the use of CRS

Why are we using crs or why should we use st_crs to define crs in st_transform?

Answer to the question

Centroids

st_centroid function is introduced

Centroids Pt. 2

Centroids Pt. 3

Why doesn’t it make sense to put the data in ggplot straight away?

Answer to the question

Centroids Pt. 4

Intersection & Join

How do you intersect something using sf?

Answer to the question

Another answer to the question

Intersection & Join Pt. 2

Intersection & Join Pt. 3

group_by() function

Intersection & Join Pt. 4

st_join to join the attributes to the geometries

Should we convert the layer into a data frame?

Answer to the question

Alternative answer

Maps of the Buildings

Map the number of buildings per zone

Area & Density Calculation

st_area() and st_units() functions

Challenge: Change of the rules

Challenge Description

Further description

Challenge solution

Outro

Wrap Up

Words of Caution

Feedback