---
name: correlates-of-war-ingestion
description: "How to get Correlates of War Project datasets data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load COW country codes into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/correlates-of-war
Provider: https://correlatesofwar.org/data-sets/
Checked against the provider's documentation: 2026-11-01

## Access
- No account or key for the checked country-code CSV.
- Downloading accepts the project's citation, no-charge and no-redistribution terms.

## Request
```bash
curl -O 'https://correlatesofwar.org/wp-content/uploads/COW-country-codes.csv'
```

## Format
CSV rows with StateAbb, numeric CCode and StateNme columns for joining Correlates of War datasets.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""Correlates of War country codes -> pandas -> Parquet. No key."""
import io
import requests
import pandas as pd

URL = "https://correlatesofwar.org/wp-content/uploads/COW-country-codes.csv"
r = requests.get(URL, timeout=60)
r.raise_for_status()
df = pd.read_csv(io.BytesIO(r.content))
df.to_parquet("cow_country_codes.parquet", index=False)
print(len(df), "country codes", df.columns.tolist())
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 243 country codes ['StateAbb', 'CCode', 'StateNme']

## Limits
- Rate limit: Not stated.
- Do not redistribute a dataset to a third party without written permission.
- Do not charge users for access to COW data.

## Quirks
- The checked country-code CSV contains repeated identical rows, so deduplicate all three columns before treating it as a join table.
- Dataset versions have different end dates and coding rules; retain release identifiers and consult each codebook.
- Country identities and system membership change over time; a static name-to-code mapping is not a complete temporal crosswalk.

## Terms and attribution
- Cite each dataset in the form requested on its individual page.
- Do not distribute datasets to third parties without written permission from the COW director and data host.
- Users cannot charge for access to COW data.
- Terms page: https://correlatesofwar.org/data-sets/

## Sources
- https://correlatesofwar.org/data-sets/: "By downloading a COW dataset, you agree to the following terms and conditions:"
- https://correlatesofwar.org/data-sets/: "without written permission of the COW director and data host."
- https://correlatesofwar.org/data-sets/state-system-membership/: "Version 2024 extends the temporal domain of the collection through December 2024."
- https://correlatesofwar.org/data-sets/cow-country-codes-2/: "The list of states with COW abbreviations and ID numbers."
- https://correlatesofwar.org/faq/: "COW data users cannot charge for access."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
