inat_map: Plot iNaturalist observations

Description Usage Arguments Value Examples

View source: R/inat_map.R

Description

Plot observations from iNaturalist. You have the option of automatically plotting, or returning a ggplot map object that you can add layers onto.

Usage

1
inat_map(data, map = "usa", subregion = ".", plot = TRUE)

Arguments

data

data frame of iNaturalist observations.

map

the map region to plot, you can find full documentation in the map package, default is USA.

subregion

the name of the subregion to plot, see full documentation in the map package.

plot

a logical value. TRUE plots the map object and returns it, and FALSE returns a ggplot object that you can modify and plot later.

Value

A ggplot map object.

Examples

1
2
3
4
5
6
7
## Not run: 
  m_obs <- get_inat_obs(taxon_name = "Ambystoma maculatum")
  salamander_map <- inat_map(m_obs, plot = FALSE)
  ### Now we can modify the returned map
  salamander_map + borders("state") + theme_bw()

## End(Not run)

rinat documentation built on March 8, 2021, 5:06 p.m.