While R, {leaflet}
package from RStudio and the Javascript leaflet.js library are open source tools, available in principle to everybody, not everybody has the technical skill, resources or inclination to master them.
To make mapping of point data accessible to a wider audience I propose this app, built in Shiny and hosted on https://shinyapps.io.
It takes a single input (a MS Excel file; scroll down for a link to a sample) and produces two outputs:
a downloadable file in html format containing both the map and the leaflet.js library, so it can be used in a general html context, for example in an iframe
a downloadable excel file with identifed errors in input coordinates (if any)
The app expects as input an xlsx file with 6 columns:
- id – primary key, bold first line of a popup
- lng – longitude of a point coordinate
- lat – latitude of a point coordinate
- category – category of points; determines color of markers
- label – body of popup; may contain HTML code if required
A sample of data in expected structure can be downloaded by following this link.
A note to users: it is perfectly OK to use HTML links (anchor tags) in the label field.
However, if you are to use the map in an iframe it is advisable to specify target="_blank"
, so the link opens in a new browser tab (and not the original iframe). It will look much better that way.