Description Usage Arguments Value
View source: R/grid_diversity.R
Data portals such as OBIS typically return tables of geolocated observations upon requests. When combined with packages such as taxizesoap the taxonomy of all occurring species can be added. From there a common task is to map the number of unique species/genus/family (or other taxonomic group) on a lattice.
1 2 | grid_diversity(mydata, taxonomic_level, myresolution = 0.5, myzoom = 7,
lat_centre = NULL, lon_centre = NULL)
|
mydata |
is an R data.frame. It contains two columns that must be named lat and lon, lon corresponding to each observations. mydata must have the right column names for the function to work. See example on how to do that. |
taxonomic_level |
is the taxonomic resolution for gridding. Possible choices are kingdom, phylum, class, order, family, genus and species |
myresolution |
is the size of the cells the data is to be aggregated over |
myzoom |
is the zoom to be applied to plot the gridded data on ggmap map |
lat_centre |
is the user-defined latitude the map will be centred on. Default to mean latitude of observations. |
lon_centre |
is the user-defined longitude the map will be centred on. Default to mean longitude of observations. |
grid_diversity
returns a data frame containing the number of unique
taxonomic group per cell. The taxonomic resolution is defined by the user.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.