ACLEDpopGDPR Documentation

ACLED countries and codes with population and GDP

Description

Countries and codes used by the Armed Conflict Location and Event Data project with population and Gross Domestic Project (GDP) numbers for recent years. Population and GDP data are from the World Bank when available and from other sources otherwise. When no World Bank data are available, numbers may be reported from the closest year conveniently available, as noted in Comments; in those cases, the data may not be as accurate as the numbers from the World Bank.

NOTE: This code will be offered to the maintainer of the acled.api package. If they like it, it may not stay in Ecdat.

Usage

data(ACLEDpopGDP)

Format

A dataframe with rownames = ACLEDcountry containing :

ACLEDcountry

A character vector of the country names used by ACLED in the monthly totals of events and deaths between 2021-01 and 2024-09 extracted 2024-10-24.

ISO3

3-character ISO 3166-1 code for Country.

WBcountry

A character vector of the country names used by the World Bank (WB) in data extracted 2024-11-06.

pop2020, pop2021, pop2022, pop2023, pop, GDPpcn2020, GDPpcn2021, GDPpcn2022, GDPpcn2023, GDPpcn, GDPpcp2020, GDPpcp2021, GDPpcp2022, GDPpcp2023, GDPpcp

World Bank population and nominal Gross Domestic Product per capita (GDPpc) in constant 2015 US$ plus GDP per capita, PPP (constant 2021 international $) extracted 2024-11-13 for the indicated years unless otherwise specified in "Comments". For country subdivisions like Jersey, the World Bank extract used did not include such numbers. For those "countries", numbers were taken from Wikipedia and assigned to the nearest year in the 2020:2023 range and noted in "Comments".

Comments

Blank (”) if the data is from the World Bank. Otherwise, this lists the source of the population and GDP data, the applicable year, and other anomalies.

Source

ACLED Explorer was used 2024-10-24 to download monthly totals between 2021-01 and 2024-09 of events and death in two files: one for events and another for deaths. Both had data on 234 "countries", though some were actually subdivisions. For example, ACLED "countries" includes the "Bailiwick of Jersey", which is a "British Crown" dependency, and the World Bank does not provide data on them as they do on sovereign countries.

However, the country names used by ACLED Explorer do not match the country names used by the World Bank.

This ACLEDpopGDP data.frame was created to facilitate merging ACLED data with data on population and GDP ... from the World Bank when available and from other sources when not.

I got most of the ISO 3166-1 3-character country codes using grepInTable. That function was NOT able to find country codes for the Caribbean Netherlands, Christmas Island, eSwatini, and North Macedonia, which have 3-letter ISO 3166-1 codes of BES, CXR, SWZ, and MKD, respectively.

From the World Bank website, I got something by clicking DataBank. From there, I clicked on "Population, total". This displayed numbers by country and year from 2008 to 2015. I clicked, "Add Time". From there I clicked "Unselect all" then selected 2020, 2021, 2022, and 2023. Then I clicked "x" in the upper right and "Apply Changes".

Then I clicked "Add Series". From there I found that many series I did not want were selected, so I clicked "Unselect all", then selected "GDP (constant 2015 US$)" and "Population, total". Then I clicked "x" in the upper right and "Apply Changes" as before.

Then I clicked "Download options" and selected "Excel". That downloaded a file named 'P_Popular Indicators.xlsx', which I moved to the working directory, read into R and merged in the obvious way to create most of ACLEDpopGDP.

For "Countries" not in the World Bank data I extracted, I got numbers from relevant Wikipedia articles and documented the source in ACLEDpopGDP[, "Comments"].

References

Armed Conflict Location and Event Data

DataBank

See Also

Index.Source, Index.Economics, Index.Econometrics, Index.Observations

Examples

# Country in World Bank data
ACLEDpopGDP['China', ]

# Country NOT in World Bank data
ACLEDpopGDP['Taiwan', ]

# Partial matching works if unique
ACLEDpopGDP['Czech',]

# Partial matching does NOT work if not unique
ACLEDpopGDP['Saint', ]
# Instead use, e.g., grep
ACLEDpopGDP[grep('Saint', ACLEDpopGDP[, 'ACLEDcountry']), ]

# If you know the ISO 3166-1 3-letter code:
ACLEDpopGDP['CPV'==ACLEDpopGDP[, 'ISO3'], ]
# NOTE: In this example, ACLEDcountry != 
# WBcountry.  

# No NAs in pop

all.equal(length(which(is.na(ACLEDpopGDP$pop))), 0)


# Only one NA in GDPpcn and GDPpcp: 
(GDPpNA <- which(is.na(ACLEDpopGDP$GDPpcp)))
(GDPnNA <- which(is.na(ACLEDpopGDP$GDPpcn)))
# Antarctica: 

all.equal(ACLEDpopGDP$ACLEDcountry[GDPpNA], 'Antarctica')



ACLEDpopGDP[c('China', 'India'), ]