rinat (version 0.1.4)

inat_map: Plot iNaturalist observations

Description

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

Usage

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 TRUE or FALSE variable, TRUE plots the map object and returns it, and FALSE returns a ggplot2 object that you can modify and plot later

Value

a ggplot2 map object

Examples

Run this code
## Not run: 
#   m_obs <- get_inat_obs(taxon="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)

Run the code above in your browser using DataLab