Visualize Species Occurrence Data

Utilities for visualizing species occurrence data. Includes functions to visualize occurrence data from 'spocc', 'rgbif', and other packages. Mapping options included for base R plots, 'ggplot2', 'ggmap', 'leaflet' and 'GitHub' 'gists'.


Helper for making maps of species occurrence data, including for:

This package has utilities for making maps with:

  • base R
  • ggplot2
  • ggplot2 with map layers - via ggmap pkg
  • Leaflet - via leaflet pkg
  • GitHub Gists - via gistr package

Install mapr

install.packages("mapr", dependencies = TRUE)

Or the development version from GitHub

devtools::install_github("ropensci/mapr")
library("mapr")
library("spocc")
spp <- c('Danaus plexippus', 'Accipiter striatus', 'Pinus contorta')
dat <- occ(query = spp, from = 'gbif', has_coords = TRUE, limit = 50)
map_leaflet(dat)

dat <- fixnames(dat)
map_gist(dat, color = c("#976AAE","#6B944D","#BD5945"))

x <- occ(query = 'Lynx rufus californicus', from = 'gbif', limit = 100)
map_ggmap(x)

map_ggplot(x, "usa")

map_plot(dat, cex = 1, pch = 10)

if that's your jam, though you might find rgbif easier

library("dismo")
g <- gbif('Batrachoseps', 'luciae', geo = TRUE, end = 300)
map_leaflet(g, "lon", "lat")

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for mapr in R doing citation(package = 'mapr')
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

News

mapr 0.3.0

  • Now in all functions, when there's more than 1 taxon, we'll do a separate color for each taxon and draw a legend if applicable (#21) (#22)
  • Added support for adding convex hulls to some of the plot types (#23) thanks to @rossmounce for the feature request
  • map_leaflet() now adds metadata as a popup to each marker (#18) (#25)

mapr 0.2.0

  • Released to CRAN.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mapr")

0.3.4 by Scott Chamberlain, 5 months ago


https://github.com/ropensci/mapr


Report a bug at https://github.com/ropensci/mapr/issues


Browse source code at https://github.com/cran/mapr


Authors: Scott Chamberlain [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports ggplot2, leaflet, spocc, sp, rworldmap, RColorBrewer, jsonlite, gistr

Suggests testthat, ggmap, knitr, taxize, maptools


See at CRAN