Package 'milRex'

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-11-09 20:22:03 UTC
Source: https://github.com/datapumpernickel/milRex

Help Index


Get data from SIPRI Military Expenditure (Milex) Database

Description

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.

Usage

sipri_get_data(
  indicator = "constantUSD",
  verbose = FALSE,
  footnotes = FALSE,
  cache = TRUE
)

Arguments

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.

Value

A tibble containing the requested data.

Examples

## 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)

Regions data by SIPRI

Description

ISO3 Country codes and regional codes used by SIPRI for matching to the data.

Usage

sipri_regions

Format

sipri_regions

A data frame with 7,240 rows and 60 columns:

region

Region name

iso3c

3 letter ISO country codes

country

Country name

Source

https://milex.sipri.org/sipri