rstudio / leaflet

R Interface to Leaflet Maps
http://rstudio.github.io/leaflet/
Other
805 stars 509 forks source link

Update docs to use `{sf}` or `{terra}` #909

Closed schloerke closed 4 weeks ago

schloerke commented 5 months ago

With the archival of legacy spatial packages, sf and terra are the new "best practices" packages. sp is still there, but uses sf under the hood https://r-spatial.org/r/2023/04/10/evolution3.html

_Originally posted by @olivroy in https://github.com/rstudio/leaflet/pull/903#discussion_r1541978568_

jack-davison commented 4 months ago

Related (though perhaps a different issue?) - is there intention to export the example data (e.g., https://rstudio.github.io/leaflet/reference/breweries91.html) as {sf} dataframes/tibbles rather than sp::SpatialPointsDataFrames?

When teaching others {leaflet}/spatial data analysis it's handy to have that example spatial data, but you're suddenly then explaining what a SpatialPointsDataFrame is and why it's different from the sf dataframe we've already used!