Description Usage Arguments Details Examples
Make an interactive map to view in the browser as a Github gist
1 |
data |
A data.frame, with any number of columns, but with at least the following: name (the taxonomic name), latitude (in dec. deg.), longitude (in dec. deg.) |
description |
Description for the Github gist, or leave to default (=no description) |
public |
(logical) Whether gist is public (default: TRUE) |
browse |
If TRUE (default) the map opens in your default browser. |
... |
Further arguments passed on to |
See gist_auth
for help on authentication
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
library("spocc")
spp <- c('Danaus plexippus','Accipiter striatus','Pinus contorta')
dat <- occ(spp, from=c('gbif','ecoengine'), limit=30, gbifopts=list(hasCoordinate=TRUE))
dat <- fixnames(dat, "query")
# Define colors
map_gist(data=dat, color=c('#976AAE','#6B944D','#BD5945'))
map_gist(data=dat$gbif, color=c('#976AAE','#6B944D','#BD5945'))
map_gist(data=dat$ecoengine, color=c('#976AAE','#6B944D','#BD5945'))
# Define colors and marker size
map_gist(data=dat, color=c('#976AAE','#6B944D','#BD5945'), size=c('small','medium','large'))
# Define symbols
map_gist(data=dat, symbol=c('park','zoo','garden'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.