Jenna Jordan
The Correlates of War Project is a collection of datasets that tracks wars and conflicts across the world since 1816. These datasets are commonly used by political scientists interested in peace & conflict studies. To learn more about the Correlates of War (CoW), please visit their website: https://correlatesofwar.org/
This project does a few different things with the Correlates of War datasets:
- clean and re-organize the datasets into a tidy format
- create a relational database in which to store all the CoW data
- visualize the CoW data with interactive plots on a Streamlit web app
This project builds on previous work I have done with the Correlates of War data in the following repos:
Steps to recreate environment used for this repo:
- Create new environment with conda, e.g. named "cow"
conda create --name cow python=3.9
conda activate cow
- Install streamlit (and a bunch of other packages that are dependencies)
conda install -c conda-forge streamlit
- Install plotly (according to the documentation)
conda install -c plotly plotly=5.3.1
conda install -c plotly plotly-geo=1.0.0
- Install sqlmodel
conda install -c conda-forge sqlmodel
- Install black (for code formatting)
conda install -c conda-forge black
- Install jupyterlab
conda install -c conda-forge jupyterlab
And add the kernel so we can work in Jupyter Lab:
python -m ipykernel install --user --name cow
- All datasets are kept in the
data
directory. Raw datasets - downloaded directly from the source and not altered in any way - are kept in thedata/raw
subdirectory. Datasets produced by my wrangling code (and destined to be added to the database) are kept in thedata/processed
subdirectory. - All data documentation is kept in the
docs
directory. This includes both the official CoW PDF documentation (docs/Official_CoW_Docs
) and any documentation I create. - Code for wrangling data (manipulating it into the format needed by the database) is kept in the
wrangling_code
directory. This is usually done in Jupyter Notebooks - Code for creating and manipulating the database is kept in the
database_code
directory
- All dataset and documentation citations are kept in
CITATIONS.md
- The license, found at
LICENSE
, is a BSD 3-Clause License with an addendum for the Correlates of War Project's Terms & Conditions
All datasets were downloaded from the Correlates of War website. The raw datasets were saved to data/Raw
. Accompanying documentation were saved to docs/Official_CoW_Docs
. These files have not been altered in any way. The requested citations for these datasets have been included in CITATIONS.md
.
-
COW Country Codes
- Downloaded from:
https://correlatesofwar.org/data-sets/cow-country-codes
- Downloaded on:
2021-07-17
- Data Filename(s):
COW country codes.csv
- Documentation Filename(s): n/a
- Downloaded from:
-
State System Membership (v2016)
- Downloaded from:
https://correlatesofwar.org/data-sets/state-system-membership
- Downloaded on:
2021-07-17
- Data Filename(s):
states2016.csv
,majors2016.csv
,system2016.csv
- Documentation Filename(s):
State System Membership Codebook V2016.pdf
,State FAQ.pdf
- Downloaded from:
-
COW War Data, 1816 - 2007 (v4.0)
-
Downloaded from:
https://correlatesofwar.org/data-sets/COW-war
-
Downloaded on:
2021-07-17
-
Documentation Filename(s):
CowWarList.pdf
,COW Website - Typology of war.pdf
-
Non-State Wars
- Data Filename(s):
Non-StateWarData_v4.0.csv
- Documentation Filename(s):
Non-StateWars_Codebook.pdf
,Non-StateWarsList.pdf
- Data Filename(s):
-
Intra-State Wars
- Data Filename(s):
INTRA-STATE WARS v5.1 CSV.csv
,INTRA-STATE_State_participants v5.1 CSV.csv
- Documentation Filename(s):
Codebook for Intra-state v5.1 2.9.20.pdf
,Description of Intra-state v5.1.pdf.pdf
- Data Filename(s):
-
Inter-State Wars
- Data Filename(s):
Inter-StateWarData_v4.0.csv
- Documentation Filename(s):
Inter-StateWarsList.pdf
,Inter-StateWars_Codebook.pdf
- Data Filename(s):
-
Extra-State Wars
- Data Filename(s):
Extra-StateWarData_v4.0.csv
- Documentation Filename(s):
Extra-StateWars_Codebook.pdf
- Data Filename(s):
-
-
National Material Capabilities (v5.0)
- Downloaded from:
https://correlatesofwar.org/data-sets/national-material-capabilities
- Downloaded on:
2021-07-17
- Data Filename(s):
NMC_5_0.csv
,NMC_5_0-wsupplementary.csv
- Documentation Filename(s):
NMC_Documentation_v5_0.pdf
- Downloaded from:
-
Territorial Change (v6)
- Downloaded from:
https://correlatesofwar.org/data-sets/territorial-change
- Downloaded on:
2021-11-08
- Data Filename(s):
tc2018.csv
,Entities.pdf
->tc_entities.csv
Entities.pdf
is a PDF that contains tables. I used Tabula to transform this into the CSV filetc_entities.csv
- Documentation Filename(s):
tcmanual.pdf
- Downloaded from:
-
Colonial/Dependency Contiguity (v3.1)
- Downloaded from:
https://correlatesofwar.org/data-sets/colonial-dependency-contiguity
- Downloaded on:
2021-11-08
- Data Filename(s):
contcols.csv
,contcold.csv
,contcol.csv
Entities.pdf
was also included in this dataset, and looks to be the same file as in the Territorial Change dataset. However, as the last modified date for this file was in 2003, I'm choosing to use the Territorial Change Entities file (last modified in 2019) to put through Tabula.
- Documentation Filename(s):
Colonial Contiguity Codebook.pdf
- Downloaded from: