map_locations creates maps to visualize the geographic spread of
media records.
Usage
map_locations(
metadata,
cluster = FALSE,
palette = viridis::viridis,
by = "species"
)Arguments
- metadata
data frame previously obtained from any suwo query function (i.e. `query_reponame()`).
- cluster
Logical to control if icons are clustered by locality. Default is
FALSE.- palette
Color palette function used for location markers.
- by
Name of column to be used for coloring markers. Default is "species".
Details
This function creates maps for visualizing the geographic spread of observations. Note that only observations with geographic coordinates are displayed.
Author
Marcelo Araya-Salas (marcelo.araya@ucr.ac.cr) and Grace Smith Vidaurre
Examples
# search in xeno-canto
e_hochs <- query_gbif(species = "Entoloma hochstetteri", format = "image")
# run if query didnt fail
if (!is.null(e_hochs)) {
# create map
map_locations(e_hochs)
}
#> ! 2 observations do not have geographic coordinates and were ignored
