milrex

Query Military Expenditure from SIPRI

https://github.com/datapumpernickel/milrex

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
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Query Military Expenditure from SIPRI

Basic Info
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Created almost 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Codemeta

README.Rmd

---
output: github_document
---



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

# milRex milRex website
  

[![R-CMD-check](https://github.com/datapumpernickel/milRex/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/datapumpernickel/milRex/actions/workflows/R-CMD-check.yaml) [![codecov](https://codecov.io/gh/datapumpernickel/milRex/graph/badge.svg?token=08ULI3CEWH)](https://codecov.io/gh/datapumpernickel/milRex)




The goal of milRex is to make it easy to query military expenditure data from 
the [Stockholm International Peace Research Institute](https://www.sipri.org/databases/milex). 
They offer the most up-to date, openly available data on military expenditure. 

## 🚧 Under construction 🚧 

* ⚠️ Please verify a few data points of downloaded data with the SIPRI website
to make sure that everything works, as this is currently under construction. 
* ⚠️ Please cite SIPRI when using the data and read the Sources and Methods 
section on their website concerning limitations linked below ⬇️. 


## ⚙️ Installation

You can install the development version of 
milRex from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("datapumpernickel/milRex")
```

## 💲🏛️ Usage

This would query all the data, for military expenditure in constant USD. 

```{r example, eval = F}
library(milRex)
data <- sipri_get_data(indicator = "constantUSD", 
                    cache = TRUE,
                    verbose = FALSE,
                    footnotes = FALSE)
```

The available **indicators** are: 
```{r labels, echo = F, message=F, warning=F} library(dplyr) library(knitr) dplyr::tribble( ~sheet_name, ~unit,~skip,~indicator, "Constant (2022) US$", 2, 5,'constantUSD', "Current US$", 2, 5,'currentUSD', "Share of GDP", 1, 5,'shareOfGDP', "Share of Govt. spending", 3, 7,'shareGovt', "Regional totals", 2, 13,'regionalTotals', "Local currency financial years", 2, 7,'currencyFY', "Local currency calendar years", 2, 6,'currencyCY', "Per capita", 2, 6,'perCapita', "all of the above", 2, 6,'all' ) |> dplyr::select(sheet_name, indicator) |> knitr::kable() ```
## 📝 Sources and Methods Military Expenditure is a concept that is difficult to measure adequately in a comparative manner across the globe. The dataset by SIPRI is the best effort that exists today, using only open sources. Nonetheless, there is limitation to their data. I **highly** encourage anyone who wants to use this dataset, to read their Sources and Methods section here: https://www.sipri.org/databases/milex/sources-and-methods ## 🔎 Estimates and uncertain data Some of the SIPRI estimates reported in their dataset are marked as uncertain or estimations (e.g. all the data for China). These cells are marked in blue or red in the resulting excel-file. Unfortunately, color coding is not machine-readable, hence this information cannot be translated into data.frames in R and is missing. Please be aware of this limitation. ## 🔒 Copyright The Stockholm International Peace Research Institute limits the copying and redistribution of its data to the following two use-cases: * the excerption of SIPRI copyrighted material for such purposes as criticism, comment, news reporting, teaching, scholarship or research in which the use is for non-commercial purposes * the reproduction of less than 10 per cent of a published data set. Hence, this package does **not** contain any SIPRI data itself. It merely automatizes the access through the website, by making the corresponding POST request and cleaning the resulting xlsx file into tidy formats. ## 🤝 Citation Please make sure to cite SIPRI when using their data with: *SIPRI Military Expenditure Database 2024, https://www.sipri.org/databases/milex* You can get a citation for the package with: ```{r citation, eval = F} citation('milRex') ```

Owner

  • Login: datapumpernickel
  • Kind: user

CodeMeta (codemeta.json)

{
  "@context": "https://doi.org/10.5063/schema/codemeta-2.0",
  "@type": "SoftwareSourceCode",
  "identifier": "milRex",
  "description": "Queries data from the Military Expenditure Database by SIPRI.",
  "name": "milRex: Query Military Expenditure Data From SIPRI",
  "codeRepository": "https://github.com/datapumpernickel/milRex",
  "issueTracker": "https://github.com/datapumpernickel/milRex/issues",
  "license": "https://spdx.org/licenses/MIT",
  "version": "0.0.0.9000",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.4.1 (2024-06-14)",
  "author": [
    {
      "@type": "Person",
      "givenName": "Paul",
      "familyName": "Bochtler",
      "email": "paulbochtler.gh@gmail.com",
      "@id": "https://orcid.org/0000-0002-9146-6185"
    }
  ],
  "copyrightHolder": [
    {
      "@type": "Person",
      "givenName": "Paul",
      "familyName": "Bochtler",
      "email": "paulbochtler.gh@gmail.com",
      "@id": "https://orcid.org/0000-0002-9146-6185"
    }
  ],
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Paul",
      "familyName": "Bochtler",
      "email": "paulbochtler.gh@gmail.com",
      "@id": "https://orcid.org/0000-0002-9146-6185"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "callr",
      "name": "callr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=callr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "fs",
      "name": "fs",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=fs"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "lubridate",
      "name": "lubridate",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=lubridate"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "ggplot2",
      "name": "ggplot2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ggplot2"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "httptest2",
      "name": "httptest2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=httptest2"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "rmarkdown",
      "name": "rmarkdown",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rmarkdown"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "version": ">= 3.0.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    }
  ],
  "softwareRequirements": {
    "1": {
      "@type": "SoftwareApplication",
      "identifier": "base64enc",
      "name": "base64enc",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=base64enc"
    },
    "2": {
      "@type": "SoftwareApplication",
      "identifier": "cachem",
      "name": "cachem",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=cachem"
    },
    "3": {
      "@type": "SoftwareApplication",
      "identifier": "dplyr",
      "name": "dplyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=dplyr"
    },
    "4": {
      "@type": "SoftwareApplication",
      "identifier": "httr2",
      "name": "httr2",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=httr2"
    },
    "5": {
      "@type": "SoftwareApplication",
      "identifier": "janitor",
      "name": "janitor",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=janitor"
    },
    "6": {
      "@type": "SoftwareApplication",
      "identifier": "memoise",
      "name": "memoise",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=memoise"
    },
    "7": {
      "@type": "SoftwareApplication",
      "identifier": "purrr",
      "name": "purrr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=purrr"
    },
    "8": {
      "@type": "SoftwareApplication",
      "identifier": "readxl",
      "name": "readxl",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=readxl"
    },
    "9": {
      "@type": "SoftwareApplication",
      "identifier": "rlang",
      "name": "rlang",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=rlang"
    },
    "10": {
      "@type": "SoftwareApplication",
      "identifier": "stringr",
      "name": "stringr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=stringr"
    },
    "11": {
      "@type": "SoftwareApplication",
      "identifier": "tidyr",
      "name": "tidyr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tidyr"
    },
    "12": {
      "@type": "SoftwareApplication",
      "identifier": "tidyselect",
      "name": "tidyselect",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=tidyselect"
    },
    "13": {
      "@type": "SoftwareApplication",
      "identifier": "R",
      "name": "R",
      "version": ">= 2.10"
    },
    "SystemRequirements": null
  },
  "fileSize": "1179.4KB",
  "relatedLink": "https://datapumpernickel.github.io/milRex/",
  "readme": "https://github.com/datapumpernickel/milRex/blob/main/README.md",
  "contIntegration": [
    "https://github.com/datapumpernickel/milRex/actions/workflows/R-CMD-check.yaml",
    "https://codecov.io/gh/datapumpernickel/milRex"
  ]
}

GitHub Events

Total
  • Create event: 2
  • Release event: 2
  • Issues event: 2
  • Watch event: 2
  • Push event: 8
Last Year
  • Create event: 2
  • Release event: 2
  • Issues event: 2
  • Watch event: 2
  • Push event: 8

Dependencies

.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
DESCRIPTION cran
  • base64enc * imports
  • cachem * imports
  • dplyr * imports
  • httr2 * imports
  • janitor * imports
  • memoise * imports
  • purrr * imports
  • readxl * imports
  • rlang * imports
  • stringr * imports
  • tidyr * imports
.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v4 composite
  • actions/upload-artifact v4 composite
  • codecov/codecov-action v4 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite