options(width=160)

Basic information and statistics

DOPA provides an array of information on species and protected area (PA) occurrence within the borders (or in some cases the Exclusive Economic Zone boundary) of a given country. country_list() can be used to list all the countries available in the DOPA database:

library(rdopa)
# We'll also be using package dplyr for data manipulation
library(dplyr)

cl <- country_list()
head(cl)

Species

There are also few convience function to retrieve species information on conuntry-level. To list species included in a particular IUCN status category within a given country, use function country_species_list(). For example, if you're interested in all (globally) threatened species (i.e. those in IUCN categories CR, EN, or VU) that occur in Finland, do the following:

threatened.fin <- country_species_list('Finland', status=c("CR", "EN", "VU"))
# Select only part of the columns (using dplyr)
select(threatened.fin, iucn_species_id, taxon, class, status, commonname)

Function country_species_count() returns the total number of species within a given country that belong to a specific status categories. For example, to get the number of threatened species in Brazil:

country_species_count('Brazil', rlstatus=c("CR", "EN", "VU"))

This - and breakdown into individual categories - can of course be achieved by working with the complete country-specific species list:

threatened.bra <- country_species_list('Brazil', status=c("CR", "EN", "VU"))
# Total number
nrow(threatened.bra)
# Per category (using dplyr)
threatened.bra %>%
  group_by(status) %>%
  summarise(count = n()) 

Protected areas

Protected area (PA) statistics are available per country according to IUCN PA categories:

country_stats("Sweden")

Within a given country, statistics for individual PAs can be retrieved using pa_country_stats(). Let's find out all the PAs within Uganda:

uganda_pa_stats <- pa_country_stats("Uganda")
nrow(uganda_pa_stats)

So Uganda has 28 individual PAs in the WDPA.



ropensci/rdopa documentation built on May 18, 2022, 6:32 p.m.