| Title: | Tools for Analyzing Cross-National Military Deployment and Basing Data |
| Version: | 1.0.4 |
| Maintainer: | Michael Flynn <meflynn@ksu.edu> |
| Description: | These functions generate data frames on troop deployments and military basing using U.S. Department of Defense data on overseas military deployments. This package provides functions for pulling country-year troop deployment and basing data. Subsequent versions will hopefully include cross-national data on deploying countries. |
| License: | GPL (≥ 3) |
| Language: | en-US |
| Encoding: | UTF-8 |
| LazyData: | true |
| RoxygenNote: | 7.3.2 |
| URL: | https://github.com/meflynn/troopdata, https://meflynn.github.io/troopdata/ |
| BugReports: | https://github.com/meflynn/troopdata/issues |
| Depends: | R (≥ 3.5.0) |
| Imports: | magrittr, dplyr, rlang |
| Suggests: | testthat (≥ 3.0.0), furrr, tidyselect, spelling, knitr, rmarkdown, viridis, ggplot2, countrycode, tidyr, stringr, haven, maps, pdftools |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2025-06-30 20:17:43 UTC; michaelflynn |
| Author: | Michael Flynn |
| Repository: | CRAN |
| Date/Publication: | 2025-07-03 14:30:02 UTC |
Tools for Analyzing Cross-National Military Deployment and Basing Data
Description
Generate customized data frames containing U.S. military deployment data
Details
The troopdata package contains functions for generating customized data sets on U.S. military
deployment data and U.S. overseas basing data. The data contain country identifiers that can be used to merge
these data with other data to analyze trends in the United States' overseas military posture.
Author(s)
Michael E. Flynn meflynn@ksu.edu
References
https://www.m-flynn.com/ https://github.com/meflynn/troopdata
See Also
Useful links:
Report bugs at https://github.com/meflynn/troopdata/issues
Pipe operator
Description
See magrittr::%>% for details.
Usage
lhs %>% rhs
Value
No return value, called for side effects.
Vine's U.S. basing data
Description
basedata returns a data frame containing David Vine's US basing data.
Usage
basedata
Format
A data frame with country-base observations including the following variables:
countrynameA character vector of country names.
ccodeA numeric vector of Correlates of War country codes.
iso3cA character vector of ISO three character country codes.
basenameName of the facility.
latThe facility's latitude.
lonThe facility's longitude.
baseBinary indicator identifying the facility as a major base or not.
lilypadA binary indicator identifying the facility as a lilypad or not. Vine codes lilypads as less than 200 personnel or "other site" designation in Pentagon reports.
fundedsiteA binary variable indicating whether or not the facility is a host-state base funded by the US.
Value
Returns the full data frame containing country observations of US military bases from the Cold War period through 2018.
Source
U.S. Military overseas construction spending data
Description
builddata returns a data frame containing geocoded location-project-year overseas military construction spending data.
Usage
builddata
Format
A data frame with country-base observations including the following variables:
countrynameA character vector of country names.
ccodeA numeric vector of Correlates of War country codes.
yearYear of observed country-year spending.
iso3cA character vector of ISO three character country codes.
locationName of the facility where spending occurred, or host country where detailed facility information is unavailable.
spend_constructionTotal obligational authority associated with the observed location-year in thousands of current US dollars.
latThe facility's latitude.
lonThe facility's longitude.
Value
Returns the full data frame containing location-project-year observations of U.S. military construction spending data from 2008-2019.
Function to retrieve customized U.S. basing data
Description
get_basedata() generates a customized data frame containing data obtained from David Vine's U.S. basing data.
Usage
get_basedata(host = NA, country_count = FALSE, groupvar = NULL)
Arguments
host |
The Correlates of War (COW) numeric country code or ISO3C code for the host country or countries in the series |
country_count |
Logical. Should the function return a country-level count of the total number of bases or the country-site data |
groupvar |
A character string indicating how country count totals should be generated. Accepted values are 'countryname', 'ccode', or 'iso3c'. Can take on Required when using country_count argument. |
Details
Our research team updated these data through 2018.
Value
get_basedata() returns a data frame containing information on U.S. military bases present within selected host countries. This can be customized to include country-base observations or country-count observations.
Author(s)
Michael E. Flynn
References
David Vine. 2015. Base Nation. Metropolitan Books. New York, NY.
Examples
## Not run:
library(tidyverse)
library(troopdata)
example <- get_basedata(host = NA)
head(example)
## End(Not run)
Function to retrieve customized U.S. construction spending data.
Description
get_builddata() generates a customized data frame containing location-project-year observations of U.S. military construction and housing spending in thousands of current dollars.
Usage
get_builddata(host = NA, startyear, endyear)
Arguments
host |
The Correlates of War (COW) numeric country code or ISO3C code for the host country or countries in the series |
startyear |
The first year for the series |
endyear |
The last year for the series |
Value
get_builddata() returns a data frame containing location-project-year observations of U.S. military construction and housing spending in thousands of current dollars.
Author(s)
Michael E. Flynn
References
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.
Examples
## Not run:
library(tidyverse)
library(troopdata)
example <- get_builddata(host = NA, startyear = 2008, endyear = 2019)
head(example)
## End(Not run)
Function to retrieve customized U.S. troop deployment data
Description
get_troopdata() generates a customized data frame containing country-year observations of U.S. military deployments overseas.
Usage
get_troopdata(
host = NULL,
branch = FALSE,
startyear = 1950,
endyear = 2024,
quarters = FALSE,
guard_reserve = FALSE,
civilians = FALSE,
reports = FALSE
)
Arguments
host |
The Correlates of War (COW) numeric country code, ISO3C code, or country name, for the host country or countries in the series. If region == TRUE the user can specify a COW region name and the function will try to match it to the region column in the data. The default is NA. |
branch |
Logical. Should the function return a single vector containing total troop values or multiple vectors containing total values and values for individual branches? Default is FALSE. |
startyear |
The first year for the series. The default is set to 1950. |
endyear |
The last year for the series. The default is the maximum year in the currently published data. |
quarters |
Logical. Should the function return quarterly data? Default is FALSE. |
guard_reserve |
Logical. Should the function return values for the National Guard and Reserve? Default is FALSE. |
civilians |
Logical. Should the function return values for civilian DoD personnel? Default is FALSE. |
reports |
Logical. Should the function return reports for the specified countries and years? Default is FALSE. |
Value
get_troopdata() returns a data frame containing country-year observations for U.S. troop deployments.
Author(s)
Michael E. Flynn
References
Tim Kane. Global U.S. troop deployment, 1950-2003. Technical Report. Heritage Foundation, Washington, D.C.
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.
Examples
## Not run:
library(tidyverse)
library(troopdata)
example <- get_troopdata(host = "United States",
branch = TRUE,
startyear = 1980,
endyear = 2015)
head(example)
## End(Not run)
U.S. overseas troop deployment data
Description
troopdata returns a data frame containing information on US military deployments.
Usage
troopdata_rebuild_long
Format
A data frame with country year observations including the following variables:
ccodeA numeric vector of Correlates of War country codes.
iso3cA character vector of ISO three character country codes.
countrynameA character vector of country names.
regionCorrelates of War geographic region name.
yearThe year of the observation.
monthThe month of the observation.
quarterThe quarter of the observation.
sourceThe DMDC report source of the observation.
troops_adThe total number of active duty US military personnel deployed to the host country.
troops_allThe total number of US military personnel deployed to the host country including guard and reserve.
army_adTotal number of active duty Army personnel deployed to the host country.
navy_adTotal number of active duty Navy personnel deployed to the host country.
air_force_adTotal number of active duty Air Force personnel deployed to the host country.
space_force_adTotal number of active duty Space Force personnel deployed to the host country.
marine_corps_adTotal number of Marine Corps personnel deployed to the host country.
coast_guard_adTotal number of Coast Guard personnel deployed to the host country.
total_selected_reserveTotal number of reserve US military personnel deployed to the host country.
army_reserveTotal number of reserve Army personnel deployed to the host country.
navy_reserveTotal number of reserve Navy personnel deployed to the host country.
air_force_reserveTotal number of reserve Air Force personnel deployed to the host country.
marine_corps_reserveTotal number of reserve Marine Corps personnel deployed to the host country.
coast_guard_reserveTotal number of reserve Coast Guard personnel deployed to the host country.
army_national_guardTotal number of Army National Guard personnel deployed to the host country.
air_national_guardTotal number of Air National Guard personnel deployed to the host country.
army_civilianTotal number of Army civilian personnel deployed to the host country.
navy_civilianTotal number of Navy civilian personnel deployed to the host country.
air_force_civilianTotal number of Air Force civilian personnel deployed to the host country.
marine_corps_civilianTotal number of Marine Corps civilian personnel deployed to the host country.
dod_civilianTotal number of Department of Defense civilian personnel deployed to the host country.
total_civilianTotal number of civilian personnel deployed to the host country.
Value
Returns the full data frame containing observations of US military deployments to overseas locations (countries and territories) from 1950 through 2024.
Source
https://www.heritage.org/defense/report/global-us-troop-deployment-1950-2005
DMDC Deployment Reports
Description
troopdata_rebuild_reports returns a data frame containing DMDC reports on US military deployments.
Usage
troopdata_rebuild_reports
Format
A data frame with country year quarter observations including the following variables:
ccodeA numeric vector of Correlates of War country codes.
iso3cA character vector of ISO three character country codes.
countrynameA character vector of country names.
regionCorrelates of War geographic region name.
yearThe year of the observation.
monthThe month of the observation.
quarterThe quarter of the observation.
sourceThe DMDC report source of the observation.
LocationThe geographic location listed in the DMDC reports.
Total"Total number of US military personnel deployed to the host country.
Total Ashore"Total number of US military personnel deployed to the host country, excluding those at sea.
Total Afloat"Total number of US military personnel deployed to the host country, at sea.
Army TotalTotal number of Army personnel deployed to the host country.
Navy AshoreTotal number of Navy personnel deployed to the host country, excluding those at sea.
Navy Temporary AshoreTotal number of Navy personnel deployed to the host country, temporarily.
Navy OtherTotal number of Navy personnel deployed to the host country, in other capacities.
Marine Corps AshoreTotal number of Marine Corps personnel deployed to the host country, excluding those at sea.
Marine Corps AfloatTotal number of Marine Corps personnel deployed to the host country, at sea.
Air Force TotalTotal number of Air Force personnel deployed to the host country.
Navy AfloatTotal number of Navy personnel deployed to the host country, at sea.
Navy TotalTotal number of Navy personnel deployed to the host country.
Marine Corps TotalTotal number of Marine Corps personnel deployed to the host country.
troops_adThe total number of active duty US military personnel deployed to the host country.
army_adTotal number of active duty Army personnel deployed to the host country.
navy_adTotal number of active duty Navy personnel deployed to the host country.
marine_corps_adTotal number of active duty Marine Corps personnel deployed to the host country.
space_force_adTotal number of active duty Space Force personnel deployed to the host country.
air_force_adTotal number of active duty Air Force personnel deployed to the host country.
coast_guard_adTotal number of Coast Guard personnel deployed to the host country.
Macro LocationThe geographic location listed in the DMDC reports.
Army Active DutyTotal number of active duty Army personnel deployed to the host country.
Navy Active DutyTotal number of active duty Navy personnel deployed to the host country.
Marine Corps Active DutyTotal number of active duty Marine Corps personnel deployed to the host country.
Air Force Active DutyTotal number of active duty Air Force personnel deployed to the host country.
Coast Guard Active DutyTotal number of active duty Coast Guard personnel deployed to the host country.
Space Force Active DutyTotal number of active duty Space Force personnel deployed to the host country.
Total Active DutyTotal number of active duty US military personnel deployed to the host country.
Army National GuardTotal number of Army National Guard personnel deployed to the host country.
Army ReserveTotal number of reserve Army personnel deployed to the host country.
Navy ReserveTotal number of reserve Navy personnel deployed to the host country.
Marine Corps ReserveTotal number of reserve Marine Corps personnel deployed to the host country.
Air National GuardTotal number of Air National Guard personnel deployed to the host country.
Air Force ReserveTotal number of reserve Air Force personnel deployed to the host country.
Coast Guard ReserveTotal number of reserve Coast Guard personnel deployed to the host country.
Total Selected ReserveTotal number of reserve US military personnel deployed to the host country.
Army CivilianTotal number of Army civilian personnel deployed to the host country.
Navy CivilianTotal number of Navy civilian personnel deployed to the host country.
Marine Corps CivilianTotal number of Marine Corps civilian personnel deployed to the host country.
Air Force CivilianTotal number of Air Force civilian personnel deployed to the host country.
DOD CivilianTotal number of Department of Defense civilian personnel deployed to the host country.
Total CivilianTotal number of civilian personnel deployed to the host country.
Grand TotalTotal number of US military and civilian personnel deployed to the host country.
Value
Returns a data frame containing DMDC reports of US military deployments to overseas locations from 1950 through 2024.
Source
https://www.heritage.org/defense/report/global-us-troop-deployment-1950-2005