Description Usage Arguments Value Examples
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 must contain at least two columns containing latitudes and
longitudes for each observation. |
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.
1 2 3 4 5 6 7 | library(robis)
library(ggmap)
mydata <- occurrence(geometry = "POLYGON ((0 0, 0 45, 45 45, 45 0, 0 0))", year = 1975)
grid_diversity(mydata, taxonomic_level = "genus", myresolution = 2, myzoom = 3)
head(justchecking$gridded_data)
# plot the data
justchecking$myplot
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.