Presentation "Geocomputation with R’s guide to reproducible spatial data analysis" - OpenGeoHub summer school 2022

  • By Jakub Nowosad
  • Last update: Aug 29, 2022
  • Comments: 1

Geocomputation with R’s guide to reproducible spatial data analysis

2022-08-30, OpenGeoHub Summer School 2022, Siegburg

Stan Openshaw defined in 2000 that "GeoComputation is about using the various different types of geodata and about developing relevant geo-tools within the overall context of a ‘scientific’ approach". In subsequent years, the idea of geocomputation gained much traction, with many new spatial data models, spatial data sources, geocomputation methods, and spatial visualizations. At the time of making the above definition, it was unrealistic to expect people to reproduce or replicate code examples automatically. Gladly, in addition to the geocomputation developments, we have seen a growing interest in reproducibility in many fields, including geocomputation. Reproducibility has many advantages, as it promotes the use of best practices, improves transparency and reusability, and allows for sharing the code and code workflows. The goal of this tutorial is to: a) provide an introduction to basic concepts of geocomputation, geocomputation with R, and reproducibility, and b) show various approaches and tools that allow for reproducibility and replicability, including R scripts, RStudio projects, {reprex}, {renv}, Git, Docker, and more. The tutorial will be a mixture of theoretical and practical: each concept will be first described and explained, and next, the attendees will have a chance to solve problems related to geocomputation with R and reproducibility of geospatial analysis.



  • 1


    #> Error in library(sf): es gibt kein Paket namens 'sf'
    #> Error in library(terra): es gibt kein Paket namens 'terra'
    #> Error in library(dplyr): es gibt kein Paket namens 'dplyr'
    #> Error in library(spData): es gibt kein Paket namens 'spData'
    #> Error in library(rgeoboundaries): es gibt kein Paket namens 'rgeoboundaries'
    #> Error in library(tmap): es gibt kein Paket namens 'tmap'
    #> Error in library(supercells): es gibt kein Paket namens 'supercells'
    germany = geoboundaries(country = "Germany")
    #> Error in geoboundaries(country = "Germany"): konnte Funktion "geoboundaries" nicht finden
    myurl = "/vsicurl/"
    snow_cover = rast(myurl)
    #> Error in rast(myurl): konnte Funktion "rast" nicht finden
    germany_repr = st_transform(germany, crs(snow_cover))
    #> Error in st_transform(germany, crs(snow_cover)): konnte Funktion "st_transform" nicht finden
    snow_cover_croped = crop(snow_cover, germany_repr)
    #> Error in crop(snow_cover, germany_repr): konnte Funktion "crop" nicht finden
    germany_repr_loc = st_transform(germany_repr, 4839)
    #> Error in st_transform(germany_repr, 4839): konnte Funktion "st_transform" nicht finden
    snow_cover_croped_loc = project(snow_cover_croped, "epsg:4839")
    #> Error in project(snow_cover_croped, "epsg:4839"): konnte Funktion "project" nicht finden
    tm = tm_shape(snow_cover_croped_loc) + 
      tm_raster(style = "cont", title = "Snowfall") +
      tm_shape(germany_repr_loc) +
      tm_borders() + 
      tm_compass() +
      tm_scale_bar() + 
    #> Error in tm_shape(snow_cover_croped_loc): konnte Funktion "tm_shape" nicht finden

    Created on 2022-08-30 with reprex v2.0.2