Title: | Query Military Expenditure Data From SIPRI |
---|---|
Description: | Queries data from the Military Expenditure Database by SIPRI. |
Authors: | Paul Bochtler [aut, cre, cph] |
Maintainer: | Paul Bochtler <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.1.0 |
Built: | 2024-12-09 06:31:15 UTC |
Source: | https://github.com/datapumpernickel/milRex |
The sipri_get_data
function retrieves military expenditure data from the
SIPRI Milex database. It provides multiple indicators including constant USD,
current USD, share of GDP, and more. You can also join footnotes to the
results and enable caching for faster queries.
sipri_get_data( indicator = "constantUSD", verbose = FALSE, footnotes = FALSE, cache = TRUE )
sipri_get_data( indicator = "constantUSD", verbose = FALSE, footnotes = FALSE, cache = TRUE )
indicator |
Character vector. The type of data to download. Must be one of: "constantUSD", "currentUSD", "shareOfGDP", "shareGovt", "regionalTotals", "currencyFY", "currencyCY", "perCapita", or "all". Default is "constantUSD". |
verbose |
Logical. If TRUE, prints additional details about the query process. Default is FALSE. |
footnotes |
Logical. If TRUE, joins footnotes to the result table. Default is FALSE. |
cache |
Logical. If TRUE, caches the response and processed data to avoid re-querying. Default is TRUE. |
A tibble containing the requested data.
## Not run: # Retrieve military expenditure data in constant 2022 USD milex_data <- sipri_get_data(indicator = "constantUSD", verbose = TRUE, footnotes = TRUE) # Retrieve regional totals without caching regional_totals <- sipri_get_data(indicator = "regionalTotals", cache = FALSE) ## End(Not run)
## Not run: # Retrieve military expenditure data in constant 2022 USD milex_data <- sipri_get_data(indicator = "constantUSD", verbose = TRUE, footnotes = TRUE) # Retrieve regional totals without caching regional_totals <- sipri_get_data(indicator = "regionalTotals", cache = FALSE) ## End(Not run)
ISO3 Country codes and regional codes used by SIPRI for matching to the data.
sipri_regions
sipri_regions
sipri_regions
A data frame with 7,240 rows and 60 columns:
Region name
3 letter ISO country codes
Country name