Skip to content

Instantly share code, notes, and snippets.

@emhart
Created September 24, 2014 23:15
Show Gist options
  • Save emhart/57042c7400c15b110bfb to your computer and use it in GitHub Desktop.
Save emhart/57042c7400c15b110bfb to your computer and use it in GitHub Desktop.
Alpha testing coverage extraction
library(devtools)
install_github("ropensci/mdextract",dependencies = TRUE)
library(spocc)
saltest <- occ("Ambystoma maculatum",from="inat")
saltest <- occ2df(saltest)
## See a bounding box
scov <- coverage_extract(saltest,spatial=list(type="box",lat = "latitude", lon = "longitude",elevation = FALSE))
plot(scov)
### Now let's try poly
scov <- coverage_extract(saltest,spatial=list(type="poly",lat = "latitude", lon = "longitude",elevation = FALSE))
plot(scov)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment