bisonmap: Make map to visualize BISON data.

View source: R/bisonmap.r

bisonmapR Documentation

Make map to visualize BISON data.

Description

Make map to visualize BISON data.

Usage

bisonmap(
  input = NULL,
  tomap = "points",
  geom = geom_point,
  jitter = NULL,
  customize = NULL
)

## S3 method for class 'bison'
bisonmap(
  input = NULL,
  tomap = "points",
  geom = geom_point,
  jitter = NULL,
  customize = NULL
)

## S3 method for class 'bison_solr'
bisonmap(
  input = NULL,
  tomap = "points",
  geom = geom_point,
  jitter = NULL,
  customize = NULL
)

Arguments

input

Input bison object.

tomap

One of points (occurrences), county (counts by county), or state (counts by state). For bison class objects, we stop with message if you pass in data from bison() that doesn't include data by each state. For bison_solr class objects, we only allow points.

geom

geom_point or geom_jitter, not quoted.

jitter

jitter position, see ggplot2 help.

customize

Pass in more to the plot.

Value

Map (using ggplot2 package) of points on a map.

Examples

## Not run: 
# Using function bison
library("ggplot2")
out <- bison(species="Accipiter", type="scientific_name", count=300)
bisonmap(input=out)
bisonmap(input=out, geom=geom_jitter, jitter=position_jitter(width = 0.3, 
  height = 0.3))

# Using function bison_solr
out <- bison_solr(scientificName='Ursus americanus', rows=200)
bisonmap(out)

## End(Not run)

ropensci/rbison documentation built on May 18, 2022, 6:31 p.m.