sf icon indicating copy to clipboard operation
sf copied to clipboard

Shiny student project?

Open rsbivand opened this issue 4 years ago • 5 comments

This just appeared on the PROJ list: https://github.com/jjimenezshaw/crs-explorer; maybe a student contribution to sf as a shiny app? sf ships with proj.db, so all the information is there, and mapview is already suggested @tim-salabim .

rsbivand avatar Oct 14 '21 12:10 rsbivand

hi @rsbivand are you suggesting that a student could take this on? if yes, I might be interested. I have experience developing shiny apps, working with sf and contributing to R packages

sebdalgarno avatar Oct 22 '21 18:10 sebdalgarno

@sebdalgarno , yes, it would be interesting to see whether a small-footprint shiny app could for example ship with sf, since all installations with PROJ >= 6 have access to proj.db. How should we proceed?

rsbivand avatar Oct 25 '21 09:10 rsbivand

Something similar is in crsuggest @walkerke https://github.com/walkerke/crsuggest.

rsbivand avatar Nov 03 '21 20:11 rsbivand

sorry for the delay. Here's what I propose based on info above:

  • a very lightweight Shiny app (using Shiny, sf and mapview libraries) that allows the user to retrieve crs from coordinates by clicking on an interactive map
  • this uses the proj.db file in sf
  • the app is called from a single function (e.g. crs_explore())
  • Shiny is added to DESCRIPTION suggests.
  • The crs_explore() function checks if Shiny is installed already and if not, will prompt the user to install prior to launching the app

optionally, the crs_explorer() could include argument(s) that are passed to the Shiny app, e.g. coordinates or sf object to preload onto the map.

I will also look closely at crsuggest for inspiration on how to display/suggest potential crs options to the user

I can get started on a Shiny app in a separate personal repository for your initial feedback and comments. Let me know how that sounds.

sebdalgarno avatar Nov 03 '21 21:11 sebdalgarno

Yes, using the proj.db shipping with sf for CRAN binary installs, or the system proj.db for other systems makes more sense than crsuggest, which ships a copy of the EPSG database as an MDB (Access) file. proj.db is an SQLite DB, so can also be accessed by RSQLite.

rsbivand avatar Nov 04 '21 07:11 rsbivand