troopdata

Function to generate troop deployment data.

https://github.com/meflynn/troopdata

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.2%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Function to generate troop deployment data.

Basic Info
Statistics
  • Stars: 36
  • Watchers: 1
  • Forks: 7
  • Open Issues: 0
  • Releases: 10
Created over 5 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: 
  github_document:
biblography: one.bib
csl: apsr
---



```{r, include = FALSE}

library(ggtext)
library(badger)

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```
 

# `troopdata`: Tools for Analyzing Cross-National Military Deployment and Basing Data



```{r, echo = FALSE, results='asis'}
cat(
	badge_cran_release("troopdata", "blue"),
	badge_github_version("meflynn/troopdata", "green"),
	badge_cran_download(pkg = "troopdata", type = "grand-total", "orange"),
	badge_cran_download(pkg = "troopdata", type = "last-month", "red"),
	badge_cran_download(pkg = "troopdata", type = "last-week", "yellow")
)
```


troopdata hex logo


The goal of the `{troopdata}` package is to facilitate the distribution of military deployment and basing data for use in social science research and journalism. The troop deployment data were initially compiled by Tim Kane using information obtained from the U.S. Department of Defense's Defense Manpower Data Center (DMDC). The original data ended in 2005 and we have updated it to run through 2024. 

Similarly, the basing data were initially compiled by David Vine, and we have updated the original data using open source information from the U.S. military and press reports through 2018. We have also assembled this R package to allow users to more easily access the data and use it in their own research.

The package will be updated with additional features in the future, but for now please let me know if you find any errors.

Please refer to the bottom of this page for citation information.

You can also find more information on the package and changes corresponding to each update here: https://meflynn.github.io/troopdata/index.html



## Installation

You can install the `troopdata` package from CRAN or [GitHub](https://github.com/) with: 

``` r
#install.packages("devtools")

install.packages("troopdata")

or 

devtools::install_github("meflynn/troopdata")
```



## Use

This package currently has two functions:

`get_troopdata()`: Returns a data frame containing U.S. military deployment values. Depending on the arguments specified the function returns total troop deployments, or total deployments plus service branch-specific deployment values, guard and reserve values, and DoD civilian values. Users can specify select countries and years, or call the entire data frame.

`get_basedata()`: Returns a data frame containing information on U.S. military bases around the globe from the Cold War forward. Depending on the arguments specified the function will return the entire data set or data for a particular country. Observations can be site-specific or can be aggregated to generate country counts.

`get_builddata()`: Returns a data frame containing geocoded location-year information on U.S. military overseas construction spending. Users can specify select countries and years, or call the entire data frame. Currently only select countries are included in the data


## Examples

You can find more detailed vignettes on these functions below:

1. [`get_troopdata`](https://meflynn.github.io/troopdata/articles/troopdata-vignette.html)
2. [`get_basedata`](https://meflynn.github.io/troopdata/articles/basedata-vignette.html)
3. [`get_builddata`](https://meflynn.github.io/troopdata/articles/builddata-vignette.html)


## A note on country codes

The original DMDC data contain information on U.S. troop deployments to a a wide range of locations, including several non-state territories and subnational units (e.g. Okinawa). One downside of using the COW country codes as the primary host ID variable is that there are often no country codes for smaller states and territories. In the case of the Vine basing data, some smaller territories have COW codes for the imperial power that controls a territory. For example, Puerto Rico and Guam both receive a COW country code of 2 as they are territorial possessions of the United States. Users may want to distinguish such cases where deployments are present in a territory versus the metropole. Using the ISO country codes provides some additional flexibility when calling the data. Worst case, you can pull the full data frame and look around at the specific observations and figure out what best suits your needs. 



## How to cite this package and data?

When using the updated troop deployment data and/or the `troopdata` package please cite the following:

- Michael A. Allen, Michael E. Flynn, and Carla Martinez Machain. 2022. "Global U.S. military deployment data: 1950-2020." Conflict Management and Peace Science. 39(3): 351-370.

Kane's original troop deployment data collected from 1950-2005:

- Kane, Tim. 2005. "Global U.S. troop deployment, 1950-2003." Technical Report. Heritage Foundation, Washington, D.C.

Vine's original basing data:

- Vine, David. 2015. "Base nation: How U.S. military bases abroad harm America and the World." Metropolitan Books, Washington, D.C.

Construction data

- Michael A. Allen, Michael E. Flynn, and Carla Martinez Machain. 2020. "Outside the wire: US military deployments and public opinion in host states." American Political Science Review. 114(2): 326-341.



Owner

  • Name: Michael Flynn
  • Login: meflynn
  • Kind: user
  • Company: Kansas State University

I'm an associate professor of political science at Kansas State University.

GitHub Events

Total
  • Release event: 1
  • Push event: 24
  • Create event: 1
Last Year
  • Release event: 1
  • Push event: 24
  • Create event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 114
  • Total Committers: 2
  • Avg Commits per committer: 57.0
  • Development Distribution Score (DDS): 0.009
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Michael Flynn f****e@g****m 113
Michael-A-Allen 9****n 1

Issues and Pull Requests

Last synced: almost 2 years ago

All Time
  • Total issues: 5
  • Total pull requests: 1
  • Average time to close issues: 8 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 4
  • Total pull request authors: 1
  • Average comments per issue: 1.4
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: 2 months
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • meflynn (2)
  • datapumpernickel (1)
  • trhertling (1)
  • bdwaldie (1)
Pull Request Authors
  • Michael-A-Allen (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 363 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 9
  • Total maintainers: 1
cran.r-project.org: troopdata

Tools for Analyzing Cross-National Military Deployment and Basing Data

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 363 Last month
Rankings
Stargazers count: 9.8%
Forks count: 10.1%
Dependent packages count: 29.8%
Average: 30.5%
Dependent repos count: 35.5%
Downloads: 67.3%
Maintainers (1)
Last synced: 11 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5.0 depends
  • dplyr * imports
  • magrittr * imports
  • rlang * imports
  • tibble * imports
  • countrycode * suggests
  • ggplot2 * suggests
  • haven * suggests
  • knitr * suggests
  • maps * suggests
  • readstata13 * suggests
  • rmarkdown * suggests
  • spelling * suggests
  • stringr * suggests
  • testthat >= 3.0.0 suggests
  • tidyr * suggests
  • viridis * suggests
troopdata.Rcheck/00_pkg_src/troopdata/DESCRIPTION cran
  • R >= 3.5.0 depends
  • dplyr * imports
  • magrittr * imports
  • rlang * imports
  • tibble * imports
  • countrycode * suggests
  • ggplot2 * suggests
  • haven * suggests
  • knitr * suggests
  • maps * suggests
  • readstata13 * suggests
  • rmarkdown * suggests
  • spelling * suggests
  • stringr * suggests
  • testthat >= 3.0.0 suggests
  • tidyr * suggests
  • viridis * suggests
troopdata.Rcheck/troopdata/DESCRIPTION cran
  • R >= 3.5.0 depends
  • dplyr * imports
  • magrittr * imports
  • rlang * imports
  • tibble * imports
  • countrycode * suggests
  • ggplot2 * suggests
  • haven * suggests
  • knitr * suggests
  • maps * suggests
  • readstata13 * suggests
  • rmarkdown * suggests
  • spelling * suggests
  • stringr * suggests
  • testthat >= 3.0.0 suggests
  • tidyr * suggests
  • viridis * suggests
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.5.0 composite
  • actions/checkout v4 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite