NOAA-OCM / SWMPrExtension

Functions for Analyzing and Plotting SWMP Estuary Monitoring Data from the NERR System archive at
http://cdmo.baruch.sc.edu/
Other
12 stars 5 forks source link

PhantomJS replacement #44

Closed DaveEslinger closed 2 years ago

DaveEslinger commented 5 years ago

It would be nice to have a way of generating maps the doesn't rely on installing additional, non-R, non-RStudio software.

padilla410 commented 5 years ago

Agreed, but it will probably involve a total retooling of the reserve-level mapping functions. The reason PhantomJS is currently required is because it is part of the webshot package. The reserve level mapping functions use r-leaflet to produce a base map, add points, and add a reserve polygon. This gets output as a tmp html file, and then webshot takes a picture of the html file.

For a bit of context, we did it this way at the time because the graphic designer wanted a stylish gray-scale base map, and leaflet had one readily available and easily customizable (all the other options we could think of at the time required more GIS files). The problem is that r-leaflet is really geared toward online, interactive web maps. So using webshot is kind of a work around this web-based problem.

The good news is that, even in ~2 yrs, mapping in R has come a long way. I've been keeping an eye out for a suitable replacement package, but haven't found anything yet.

swmpkim commented 5 years ago

FWIW, I'm having this problem with the SETr project too. Leaflet is great for the interactive mapping module. Grabbing screenshots (in an automated way, to include in static reports) has been a challenge and so far PhantomJS is the best I've found too. But if it doesn't install the first time, it is very tough to troubleshoot. Here's hoping better solutions appear soon!

DaveEslinger commented 5 years ago

I've been investigating a number of different R GIS packages. I'm hoping to have an alternative approach for this. It may require more GIS layers, but we can come up with those. I want something that installs more easily, since that seems to be a bottleneck that some folks never get past.

All suggestions welcome!