datacarpentry / r-raster-vector-geospatial

Introduction to Geospatial Raster and Vector Data with R
https://datacarpentry.org/r-raster-vector-geospatial
Other
112 stars 110 forks source link

Update to the spatial packages lifecycle: migrate to use sf, terra, and stars #363

Closed zkamvar closed 1 year ago

zkamvar commented 2 years ago

packages like {rgdal} and {rgeos} are going to be replaced in a couple of years, so it would be a good idea to revisit the package ecosystem for this lesson and revamp it.

Relevant section of UseR!2021 keynote: https://youtu.be/cK08bxUJn5A?t=1428 Relevant tweet thread summary from @RLadies: https://twitter.com/WeAreRLadies/status/1469286521874300939

jsta commented 2 years ago

Good idea. Just wanted to note after seeing the issue title, that the materials already use sf.

drakeasberry commented 2 years ago

I will take a look at the links provided by @zkamvar above soon and take a look at the effects that these changes to rgdal or rgeos will have on our lesson. I will take a deeper look at terraand star. As @jsta noted, the lesson is already using sf.

jhollist commented 2 years ago

Just wanted to follow up on this.

The Geospatial Curriculum Advisory Committee has been reconstituted. We have not yet had our first meeting, but the move away raster, the pending end of life from rgdal and rgeos, and replacing Proj.4 strings will very likely be on our first agenda. Digging into the discussion around these is certainly needed and a good first start.

I would expect the Committee to have some guidance on the direction for the lessons in the not too distant future. Pinging my co-chair, @srappel so this is on your radar too!

selmants commented 2 years ago

Glad the Geospatial Curriculum Advisory Committee is discussing moving on from the raster R package. I have found that re-writing old R scripts to incorporate terra is very straightforward and painless. The terra package is similar to raster (same developers - Hijmans et al.), but faster, more versatile, simpler, and often shares the same function terminology (e.g., writeRaster). Very clear introductory materials for terra here: https://rspatial.org/terra/spatial/index.html. No shade on stars, I'm sure it's awesome too! But, it would likely be easiest to re-write this Lesson using terra.

srappel commented 2 years ago

Greetings from the Data Carpentry Geospatial Curriculum Advisory Committee (tagging my co-chair @jhollist),

This issue was discussed at our Q1 meeting on March 30, 2022. Here is an excerpt from the minutes:

  1. Deprecation of the sp, rgeos, and rgdal packages
    • The Committee agreed that the references to rgdal and rgeos be removed or replaced with references to the equivalent sf and terra functions as appropriate. This decision is closely paired with the rationale for choosing terra as the replacement for the raster package and aims to avoid code-breaking deprecations coming some time in 2023.
  2. Transition from raster to terra or stars
    • The terra package appears to be the most direct replacement for raster as it uses language which is similar to raster and common to other GIS. The Committee recommends that terra be adopted as a replacement to raster. Stars should be presented as an alternative to terra that may be faster in some cases or more appropriate for analyses with longitudinal elements.

I've added the "help wanted" label to this issue!

drakeasberry commented 1 year ago

Thank you @albhasan. At this time, the lesson contains to calls to raster or rgdal packages.