Learn R Programming

AntWeb (version 0.7)

aw_map: LeafletJS Map

Description

Builds an interactive map of locations for any list of species

Usage

aw_map(aw_obj, dest = tempdir(), title = "AntWeb species map",
  incl.data = TRUE)

Arguments

aw_obj
Result from a search on AntWeb
dest
Location where the html file and geojson file should be stored. Default is the temp directory
title
Title of the map.
incl.data
Default is TRUE. Writes geoJSON data into the html file to get around security restrictions in browsers like Google Chrome. Set to FALSE to read from a separate local geoJSON file.

Examples

Run this code
acanthognathus_df <- aw_data(genus = "acanthognathus", georeferenced = TRUE)
 aw_map(acanthognathus_df)
# Or just plot data by habitat. So for e.g. using sandstone as a substrate
sandstone <- aw_data(habitat = "sandstone")
aw_map(sandstone)

Run the code above in your browser using DataLab