am_map_leaflet: Map for native habitat

Description Usage Arguments See Also Examples

View source: R/spatial.R

Description

Shows a leaflet map for the native habitat given a species identifier

Usage

1
2
3
4
5
am_map_leaflet(
  ras,
  title = "",
  cols = c("#FEB24C", "#FD8D3C", "#FC4E2A", "#E31A1C", "#B10026")
)

Arguments

ras

a raster object, for example from the am_raster function

title

a string to use as legend title, by default blank

cols

a vector with three hex colors to use for a numeric color legend, default: c("#FEB24C", "#FD8D3C", "#FC4E2A", "#E31A1C", "#B10026")

See Also

Other spatial: am_csc_from_extent(), am_raster(), am_species_in_csc(), am_species_per_csc(), csquare_from_dd(), csquare_to_dd(), rasterize_coords(), which_cells_in_raster()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# native habitat for blue trevally
ras <- am_raster(am_search_fuzzy("blue trevally")$key)
am_map_leaflet(ras, title = "Blue trevally (p)")

# where do both blue and white trevally occur?
ras <- am_raster(am_search_fuzzy("trevally AND (white OR blue)")$key,
  fun = "count")
am_map_leaflet(ras, title = "Blue and white trevally (n)")

## End(Not run)

raquamaps/aquamapsdata documentation built on Feb. 25, 2021, 10:28 p.m.