The rangemap R package presents various tools to create species range maps based on occurrence data, statistics, and SpatialPolygons objects. Other tools of this package can be used to analyze environmental characteristics of the species ranges and to create high quality figures of these maps.
The main functions of this package are:
All the functions that create species ranges also generate an approach to the species extent of occurrence (using convex hulls) and the area of occupancy according to the IUCN criteria. Shapefiles of the resultant polygons can be saved in the working directory if it is needed.
The data included in this package are:
Let’s read the species records and check how the are geographically distributed using the rangemap_explore function.
# Getting the data
data("occ_f", package = "rangemap")
# checking which countries may be involved in the analysis
par(mar = rep(0, 4)) # optional, reduces the margins of the figure
rangemap_explore(occurrences = occ_f)
rangemap_explore(occurrences = occ_f, show_countries = TRUE)
Let’s check the rangemap_boundaries function’s help to be aware of all the parameters.
help(rangemap_boundaries)
Defining parameters and reading the data
# Getting the data
data("occ_d", package = "rangemap")
# preparing arguments
<- 0 # Level of detail for administrative areas
level <- "Ecuador" # Although no record is on this country, we know it is in Ecuador
adm <- c("PER", "BRA", "COL", "VEN", "ECU", "GUF", "GUY", "SUR", "BOL") # ISO names of countries involved in the analysis countries
Now we can create the species range based on administrative areas
<- rangemap_boundaries(occurrences = occ_d, adm_areas = adm,
b_range country_code = countries, boundary_level = level)
If you want to save the results of this analysis as shapefiles try using the parameters save_shp and name.
<- TRUE # to save the results
save <- "test" # name of the results
name
<- rangemap_boundaries(occurrences = occ_d, adm_areas = adm,
b_range country_code = countries, boundary_level = level,
save_shp = save, name = name)
The function rangemap_plot will allow you to produce a nice figure of your results.
Check the function’s help to be aware of all the parameters.
help(rangemap_plot)
Now the figures. One with the species range only.
# arguments for the species range figure
<- TRUE
extent <- TRUE
occ <- TRUE
legend
# creating the species range figure
par(mar = rep(0, 4))
rangemap_plot(b_range, add_EOO = extent, add_occurrences = occ,
legend = legend)
The other one with the potential extent of occurrence, the species occurrences and other map details. But let’s first define the characteristics we want in the figure.
<- TRUE # adds the extent of occurrence of the species to the figure
extent <- TRUE # adds the occurrence records of the species to the figure
occ <- TRUE # adds a legend to the figure
legend <- "topright" # position of the legend in the figure
leg_pos <- TRUE # adds a north arrow to the figure
north <- "bottomleft" # position of the north arrow n_pos
par(mar = rep(0, 4), cex = 0.8)
rangemap_plot(b_range, add_EOO = extent, add_occurrences = occ,
legend = legend, legend_position = leg_pos,
northarrow = north, northarrow_position = n_pos)