Tools and Data for Quantitative Peace Science Research
Overview
These are useful tools and data sets for the study of quantitative peace science. The goal for this package is to include tools and data sets for doing original research that mimics well what a user would have to previously get from a software package that may not be well-sourced or well-supported. Those software bundles were useful the extent to which they encourage replications of long-standing analyses by starting the data-generating process from scratch. However, a lot of the functionality can be done relatively quickly and more transparently in the R programming language.
Changes include:
- Package now assumes a version of R greater than 4.1.0.
{isard}introduced as dependency. add_cow_alliance()is deprecated and slated for removal at the request of the data set's maintainer. The function right now returns a stop communicating this information, also at the request of the data set's maintainer.add_sdp_gdp()is deprecated and slated for removal. Its functionality is replaced byadd_sim_gdp_pop().add_gml_mids()is superseded in light of the release of the MIC data.add_cow_mids()is superseded.cow_alliance,ccode_democracy,gwcode_democracy,cow_sdp_gdp,gw_sdp_gdp,cow_gw_years, andgw_cow_yearsare deprecated and slated for removal.- Fix error in
cow_capitalsdata that did not adequately record Burundi's capital change in 2018. This concerns the data generated forcow_capitals. - Fix error in
tss_rivalriesfortssr_id = 61. This was in the book but the change in the data-raw directory shows what they assuredly meant. - Add
mryargument toadd_cow_majors(), fix bug identified by @rochelleterman in 17 - Fix issue of imputing 0s outside temporal domain of contiguity data for
add_contiguity(). Brought to my attention by @jandresgannon in 19. atop_allianceupdated to version 5.1.
Show all changes in 1.2.0Hide the rest of the changes in 1.2.0
add_atop_alliancehas an extra argument (ndir) for how it should perform on non-directed dyad-year or leader-dyad-year data.cow_capitalsandgw_capitalsformally current through 2024. Indonesia is the most likely candidate to require an update in these data, though that change has not happened yet.cow_capitalsandgw_capitalsfurther include some corrections and the introduction of start and end dates for capitals.gw_ddyandcow_ddycurrent through 2024.add_ccode_to_gw()andadd_gwcode_to_cow()now lean on data in{isard}.add_capital_distance()includes an argument ("transsum") for what observation to privilege for yearly summaries in which there was a capital transition. Support for leader-level data momentarily dropped.cow_contdirreplaces columnsbeginandendwithstdateandenddatecommunicating the same information, but in date form.add_contiguity()has an argument ("slice") that determines its behavior for when there is a change in a contiguity relationship in a given year. Themryargument actually does something now.ccode_democracyandgwcode_democracyare deprecated and slated for removal. Democracy data are now maintained in the{isard}package.add_democracy()now leans on{isard}for democracy data.add_democracy()andadd_nmc()have akeepargument now, allowing the user to select particular estimates from the democracy/capabilities data rather than get everything (including stuff they don't want).add_strategic_rivalries()usestss_rivalriesnow and no longer has additional arguments prioritizing rivalry type.add_minimum_distance()optionally (and by default) incorporates extended data available indownload_extdata().- The "create" functions lean on the state system data maintained in
{isard}. This also means micro-states in the G-W system are included. false_gw_dyadsnow includes information about whether the first or second state is/was a micro-state. Two directed entries for Sao Tome and Principe and the Republic of Vietnam were added as well.- Shortcuts added:
add_cap_dist()foradd_capital_distance(),add_creg_frac()foradd_creg_fractionalization(),add_min_dist()foradd_minimum_distance(). ucdp_acdupdated to 25.1.add_ucdp_acd()incorporates these newer versions of the data to allow for armed conflict analyses through 2024.
Additions include:
archigossumsis a basic yearly summary of leader turnover in thearchigosdata. It will makeadd_archigos()much faster by cutting down on computation time.add_sim_gdp_pop()replacesadd_sdp_gdp(), using data from{isard}terrthreatis a state-year data set on latent territorial threat.add_latent_territorial_threat()will add it to your data frames.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK13 OK2026-05-02
Show 2 earlier changesHide 2 earlier changes
- ERROR11 OK, 1 ERROR2026-04-25
- OK14 OK2026-03-10
Documentation
- Help pages
- 94 (1 internal)
- Examples that run
- 29%14 run in a plain check · 29 only when donttest examples are enabled (R CMD check --as-cran) · 5 never run
- Exported functions with examples
- 100%
- Documented parameters
- not tracked
- Return-value docs
- not tracked
- Help pages citing references
- 82%
Downloads
Repository
- PRs merged (all time)
- not measured
- Median days to close, 50 most recently updated closed issues
- 4
- Median days to close, 50 most recently updated closed PRs
- not measured
Stars over time
Forks over time
Releases over time
Issues over time
7 development-tooling and community-health practices detected across 4 families in the upstream repository
Checks run against github.com/svmiller/peacesciencer on 2026-10-21.
Dependencies
Installing peacesciencer adds 82 packages (44 with compiled code, 65 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, bslib 5.6 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.2.0Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.1.02023-03-24 · diff ↗
- RR 4.2.0 released · 2022-04-22
- 1.0.02022-03-24 · diff ↗
- 0.7.02021-11-11 · diff ↗
- 0.6.02021-10-13 · diff ↗
- 0.5.02021-06-21 · diff ↗
- 0.4.02021-05-31 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 0.3.02021-04-28 · diff ↗
- 0.2.02021-03-05 · diff ↗
- 0.1.02020-12-19
Show 1 earlier eventHide 1 earlier event
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2020-12-19
- Total releases
- 10 / 6 yrs
- License
- GPL-2 OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 3.5 MB / 52 files
- Download size
- 3.7 MB
Cite
Cite this package
Run in R for the authors' entry:
citation("peacesciencer")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.1177/07388942221077926.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.