Learn R Programming

rAvis (version 0.1.4)

avisMapSpecies: Renders a map for each of the species provided in names

Description

This function map the species occurrences in the Iberian Peninsula.

Usage

avisMapSpecies(names, maptype = "admin", ...)

Arguments

names
scientific name of the species (it could be a list of scientific names). E.g. "Pica pica"
maptype
Available types of map are 'admin', administrative provinces of Spain (by default) or 'phys', physical map of Spain.
...
other filters passed to the observations query with avisQuerySpecies

Value

a plot with the occurrences of the species in the Iberian Peninsula. Maps have high resolution, so they could be printed.

Details

For constructing these maps we used free online map repositories. We downloaded the Spanish administrative map from http://www.diva-gis.org/ and the Spanish physical map of http://www.openstreetmap.org/ using the R- library OpenStreetMap.

Examples

Run this code
## Not run: 
# 
# avisMapSpecies("Bubo bubo", "phys")
# 
# # if interested in several species, you can explore the database using avisMapSpecies
# avisMapSpecies (list("Tyto alba", "Athene noctua", "Bubo bubo", "Strix aluco"),
#                maptype="phys")
# 
# # and you can save those maps individually using the tiff function
# 
# directory<- "C:/your_directory"
# species<- list("Tyto alba", "Athene noctua", "Bubo bubo", "Strix aluco")
# for (x in species){
#  tiff (file.path (directory, paste ("/", x, ".tiff", sep="")))
#  avisMapSpecies (x)
#  dev.off()
# }
# 
# ## End(Not run)

Run the code above in your browser using DataLab