map_observations: Generate heatmap for the number of observations within...

Description Usage Arguments Value See Also Examples

View source: R/map_observations.R

Description

Generate heatmap for the number of observations within polygons

Usage

1
2
3
4
5
6
7
8
map_observations(
  query,
  polygons,
  number_obs = TRUE,
  seq_by = NULL,
  cols = NULL,
  plot_results = FALSE
)

Arguments

query

list of query terms list('order:Odonata','etc')

polygons

shapefile of POLYGON or MULTIPOLYGON, can be either an sf object or SpatialPolygons or SpatialPolygonsDataFrame

seq_by

an integer used to 'group' the number of observations. Defaults to 10

cols

should be a vector of colors used for the color ramp

plot_results

boolean. When TRUE a simple plot is returned.

Value

polygon with NumObs and when plot_results=TRUE a map of the number of observations

See Also

queryAPI for description of fields and which fields can be queried

Examples

1
2
3
4
5
6
7
## Not run: 
SurveyBlocks <- sf::st_read("VT_survey_block_WGS.shp", quiet = TRUE)
z <- map_observations(query = list("order:Odonata"),
                          polygons = SurveyBlocks,
                          seq_by = 10,
                          cols = c("gray","blue","firebrick"))
## End(Not run)

VtEcostudies/VTatlas documentation built on Dec. 18, 2021, 6:20 p.m.