This function gets the list of world countries listed by the UNEP-WCMC using the Protected Planet API https://api.protectedplanet.net/.

get_countries(sleep = 0, key = "WDPA_KEY")

Arguments

sleep

a numeric specifying the time interval (in seconds) to suspend between each API request.

key

a character providing the WDPA token name stored in the .Renviron file. Default is WDPA_KEY.

Value

A data frame with the following information (columns) for each World countries (rows):

region_name

the name of the region

region_iso2

the ISO-2 code of the region

country_name

the name of the country

country_iso3

the ISO-3 code of the country

pas_count

the number of protected areas per country

See also

wdpa_countries, get_wdpa

Examples

if (FALSE) { ## List World Countries ---- countries <- worldpa::get_countries(sleep = 0.25) head(countries) ## region_name region_iso2 country_name country_iso3 pas_count ## 1 Africa AF Algeria DZA 78 ## 2 Africa AF Angola AGO 14 ## 3 Africa AF Benin BEN 64 ## 4 Africa AF Botswana BWA 22 ## 5 Africa AF Burkina Faso BFA 112 ## 6 Africa AF Burundi BDI 21 }