getAbapData | R Documentation |
Download data from ABAP cards for a region and species
getAbapData(
.spp_code,
.region_type = c("country", "province", "pentad", "group"),
.region,
.years = NULL,
.adhoc = FALSE
)
.spp_code |
Character string or integer corresponding to the SAFRING code of the species of interest. See searchAbapSpecies. |
.region_type |
The type of region we are interested on. Four options: "country", "province", "pentad" and "group". See details. |
.region |
A character string corresponding to the specific region we are interested in. It can be either a country in Southern Africa, a South African province or a pentad code. |
.years |
A numeric vector with elements corresponding to the years we want data for. |
.adhoc |
If TRUE, only ad-hoc lists are returned. If FALSE (default), no ad-hoc lists are returned. |
At the moment, ABAP serves data from eleven countries: South Africa, Botswana, eSwatini, Lesotho, Malawi, Mozambique, Namibia, Zambia, Zimbabwe, Kenya and Nigeria. Only South African provinces are available: Western Cape, Eastern Cape, Northern Cape, Free State, Limpopo, Mpumalanga, KwaZulu-Natal, Gauteng, and Northwest Province.
If we specify "group" in the .region
argument the
function returns all records for a specific group of pentads. Groups of
pentads must be created from the birdmap.africa websites (e.g.,
SABAP2 or
Kenya Bird Map). You will need to
create an account. Once logged in, you can create groups from the coverage
menu. Then, these groups can be viewed from you home menu. The name of the
group is the last part of the URL displayed in the browser's navigation bar.
For example, I created a group named "test_group", and the URL for this group
is https://kenya.birdmap.africa/coverage/group/xxxx_tst_grp
. The group name
that we need to pass on to the getAbapData()
function is xxxx_tst_grp
,
the last part of the URL, where xxxx
is your citizen scientist number
(provided when creating an account).
A tibble in which each row corresponds to one ABAP card. The column
'Spp' gives either the code of the species of interest, if it was detected
in that card, or "-" if it wasn't. See abap_visit_vars
for more
information about the columns.
getAbapData(123, .region_type = "country", .region = "South Africa")
getAbapData(169, .region_type = "province", .region = "Eastern Cape", .years = 2008)
getAbapData(95, .region_type = "pentad", .region = "2505_2850", .years = c(2008, 2009))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.