Concluding Remarks

Spatial Data Programming with R

Bogdan G. Popescu

John Cabot University

Learning Outcomes: Overview

Some of the learning outcomes in this course focused on:

  • executing basic programming tasks in R (e.g. loops, conditional statements, while statements, etc.)
  • understanding basic GIS (Geographic Information Systems) terms and concepts
  • utilizing GIS for conducting spatial analyses.
  • appreciating the design and structure of GIS as a decision-making tool.
  • producing maps

Skills Acquired

  • clean and process data
  • visualize data
  • create interactive web-apps
  • typeset: write visually appealing articles and presentations (R Quarto)

Jobs where these skills are valued

  • Data Scientist/Data Analyst

  • GIS Analyst/GIS Specialist

  • Environmental Scientist

  • Market Research Analyst

  • Remote Sensing Specialist

  • Transportation Planner

Use of R

R is also (more commonly) used in a variety of fields:

  • Finance
  • Academic research
  • Government
  • Retail
  • Data Journalism
  • Healthcare

Companies that use R

Examples of companies which use R include

  • Airbnb
  • Microsoft
  • Uber
  • Facebook
  • Google

Additional Good resources for learning R

  • R for Data Science
    http://r4ds.had.co.nz/
    Introduction to data analysis using R, focused on the tidyverse packages
    Good substitute for Stata

Good resources for learning R

Books to Use: Data Analysis and Visualization

Books to Use: GIS

Other useful Sources

Overview of Processing Vector Layers

sf was the main library that we worked with

It helped us deal with:

  • Numerical Operations to calculate: Areas, Length, Distances, etc.
  • GIS Logical Operations: Overlaps, Equals, Intersects, etc.
  • Geometry Operations: Centroid, Buffer, Intersection, Union, Difference, etc.

Overview of Processing Raster Layers

We performed geometric operation on rasters (pictures) with the stars package:

  • Accessing cell values - as a matrix or as a dataframe, extracting pixels to points
  • Performing Raster algebra: raster arirthmentic and logic
  • Changing the resolution and extent: cropping, mosaicing, resampling, and reprojecting
  • Transforming Rasters: to points and polygons

Processing Raster Layers stars

Temperature in 1901

Processing Raster Layers stars

Temperature in 2022

Processing Raster Layers stars

Temperature difference between 2022 and 1901 > 4

Data visualization

  • ggplot2 is the library that allows to visualize data analysis results, but also to make maps
  • leaflet is a library that allows us to make interactive maps
  • mapview is a wrapper around leaflet automating the addition of: labels, popups, color scales, and common basemaps

Supplementary Lectures

I encourage you to check out the supplementary lectures:

Final Projects

This project offers an opportunity to showcase the acquired skills in manipulating spatial data and conducting meaningful analyses.

Tasks for the Project:

  • acquire data either from the course materials or from external sources
  • employ at least five GIS procedures in R such as: st_join, st_centroid, st_area, st_distance, st_buffer, st_voronoi, st_union, st_combine, st_cast, st_intersection, st_difference, dplyr for vector layer aggregation, st_crop, st_rasterize, raster::aggregate, etc.

Final Projects

Or

Produce some descriptive visualizations (maps, barplots, scatterplots, boxplots) that tell the same story AND make a Github website (for data, you can explore https://ourworldindata.org)

  • craft a well-structured two-page report (approx. 1500 words) containing an intro to the problem, objectives, data sources, methodology, results, and conclusion
  • well-documented appendix (with comments and hashtags) with the R code for the GIS procedures.

Grading Criteria for the project:

  • Relevance
  • Methodology: demonstration of at least five distinct GIS procedures in R (if applicable).
  • Analysis
  • Presentation
  • Code Quality

For presentation and memo length, please peruse the examples provided.

Instructions

Presentations will be on Friday, May 3rd in G.K.1.4, 09:00-11:30

Presentations should be 15 minutes.

Rehearse at least twice at home

Focus your presentation on the story

Criteria for Presentation Grading

  • Content Knowledge
  • Organization
  • Clarity of Expression
  • Engagement with Audience
  • Visual Aids
  • Time Management

Course Feedback and Evaluation

  1. What are some aspects of the course that you liked?
  2. What are areas for improvement?
  3. Let’s do the course evaluations.

Conclusion

Thank you and good luck!