Takes a spatial tibble of iNaturalist occurrences and produces an interactive Leaflet map where each grid cell is coloured according to the number of unique species observed within it (species richness). Empty cells are removed from the map.
Arguments
- df
An
sftibble of iNaturalist occurrences containing at least the columnname(scientific name) and valid point geometry.- site_boundary
An
sfobject representing the eLTER site boundary polygon. IfNULL(default), no boundary is drawn.- cell_size
Numeric. Size of each grid cell in decimal degrees. Default is
0.001(approximately 100 m). Use larger values (e.g.0.005) for broader spatial extents.
Value
A leaflet map object with:
An OpenStreetMap base tile layer.
Grid cells coloured by species richness using the
"viridis"palette.A popup per cell showing the species richness value.
A legend for species richness.
An optional eLTER site boundary polygon layer.
A layers control to toggle map groups.
