Skip to content

Instantly share code, notes, and snippets.

@sckott
Last active December 17, 2015 21:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sckott/5674966 to your computer and use it in GitHub Desktop.
Save sckott/5674966 to your computer and use it in GitHub Desktop.
Centaurea diffusa maps

Using rbison, interacts with USGS BISON web service, only US data

## load stuff
install.packages("devtools")
library(devtools)
install_github("rbison", "ropensci")
library(rbison)

## search for knapweed
res <- bison(species='Centaurea diffusa', count=1396) # preliminary search said there were 1396 records
bisonmap(res) # make map of points

bisonmap(res, tomap="county") # summary by county

bisonmap(res, tomap="state") # summary by states

Using GBIF

install_github("rgbif", "ropensci")
library(rgbif)
out <- occurrencelist(scientificname='Centaurea diffusa', maxresults=3000, fixnames="changealltoorig", removeZeros=TRUE, coordinatestatus=TRUE)
gbifmap(out)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment