Description Usage Arguments Value See Also Examples
View source: R/get_countries.R
This function gets the list of world countries listed by the UNEP-WCMC using the Protected Planet API https://api.protectedplanet.net/.
1 | get_countries(sleep = 0, key = "WDPA_KEY")
|
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
|
A data frame with the following information (columns) for each World countries (rows):
the name of the region
the ISO-2 code of the region
the name of the country
the ISO-3 code of the country
the number of protected areas per country
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
## 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
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.