library("spocc")
spp <- c('Danaus plexippus','Accipiter striatus','Pinus contorta')
dat <- occ(query = spp, from = 'gbif', gbifopts = list(hasCoordinate = TRUE), limit=50)
map_leaflet(dat, dest = ".")
# An example with more species, a different base map, and different color palette
spp <- c('Danaus plexippus','Accipiter striatus','Pinus contorta','Puma concolor',
'Ursus americanus','Gymnogyps californianus')
dat <- occ(query = spp, from = 'gbif', gbifopts = list(hasCoordinate = TRUE), limit=50)
map_leaflet(dat, map_provider = 'toner')
Run the code above in your browser using DataLab