Giter Site home page Giter Site logo

dieghernan / igor Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 0.0 61.21 MB

R package to extract information from the Intergovernmental Organizations ('IGO') Database , version 3, provided by the Correlates of War Project https://correlatesofwar.org/

Home Page: https://dieghernan.github.io/igoR/

License: GNU General Public License v3.0

R 90.65% TeX 9.35%
r-package igo correlates-of-war intergovernmental-organizations r rstats cran

igor's Introduction

igoR

CRAN status CRAN results CRAN-Downloads r-universe R-CMD-check codecov CodeFactor DOI Lifecycle: stable status

The goal of igoR is to provide access and to extract information from the Intergovernmental Organizations Database (IGOs), version 3, provided by the Correlates of War Project (Pevehouse et al. 2020).

The dataset (V3) includes information of 534 IGOs from 1816 to 2014, as well as membership information.

Additionally, a distribution of the State System Membership (Correlates of War Project 2017) is included on this package.

Installation

Install igoR from CRAN:

install.packages("igoR")

You can install the developing version from GitHub:

library(remotes)
install_github("dieghernan/igoR")

Alternatively, you can install igoR using the r-universe:

# Install igoR in R:
install.packages("igoR", repos = c(
  "https://dieghernan.r-universe.dev",
  "https://cloud.r-project.org"
))

Basic usage

Search an IGO by name:

Search all IGOs related with “sugar”:

library(igoR)

result_sugar <- igo_search("Sugar")
ionum ioname orgname longorgname label sdate deaddate dead integrated replaced igocode version accuracyofpre1965membershipdates sourcesandnotes imputed political social economic
40 AMSC African/Malgasy Sugar Council African and Malagasy Sugar Council African and Malagasy Sugar Council 1966 1977 1 0 0 NA 2.1 Not applicable - created 1965 or later 0 0 0 1
1920 GLACSEC Group of L/A & Carib. Sugar Exp. Countries Group of Latin American and Caribbean Sugar Exporting Countries Group of Latin American and Caribbean Sugar Exporting Countries 1974 2001 1 0 0 NA 2.3 Not applicable - created 1965 or later 0 1 0 0
3130 ISuC Intl Sugar Council International Sugar Council International Sugar Council 1937 1967 1 0 0 91 3.0 Within 5 years 0 0 1 0
4290 SugU Sugar Union Sugar Union Sugar Union 1902 1913 1 0 0 29 3.0 Completely accurate, except a few minor uncertainties 0 0 0 1

IGO members:

Composition of the European Economic Community over time:

eec_code <- igo_search("EEC", exact = TRUE)

# Founding
eec_init <- igo_members(eec_code$ioname, year = eec_code$sdate)
ioname ccode state statenme year value category orgname
EEC 210 netherlands Netherlands 1958 1 Full Membership European Economic Community
EEC 211 belgium Belgium 1958 1 Full Membership European Economic Community
EEC 212 luxembourg Luxembourg 1958 1 Full Membership European Economic Community
EEC 220 france France 1958 1 Full Membership European Economic Community
EEC 260 wgermany German Federal Republic 1958 1 Full Membership European Economic Community
EEC 325 italy Italy 1958 1 Full Membership European Economic Community

EEC, members (1958)

# Latest date
eec_end <- igo_members(eec_code$ioname)
ioname ccode state statenme year value category orgname
EEC 200 uk United Kingdom 1992 1 Full Membership European Economic Community
EEC 205 ireland Ireland 1992 1 Full Membership European Economic Community
EEC 210 netherlands Netherlands 1992 1 Full Membership European Economic Community
EEC 211 belgium Belgium 1992 1 Full Membership European Economic Community
EEC 212 luxembourg Luxembourg 1992 1 Full Membership European Economic Community
EEC 220 france France 1992 1 Full Membership European Economic Community
EEC 230 spain Spain 1992 1 Full Membership European Economic Community
EEC 235 portugal Portugal 1992 1 Full Membership European Economic Community
EEC 255 germany Germany 1992 1 Full Membership European Economic Community
EEC 325 italy Italy 1992 1 Full Membership European Economic Community
EEC 350 greece Greece 1992 1 Full Membership European Economic Community
EEC 390 denmark Denmark 1992 1 Full Membership European Economic Community

EEC, members (1992)

Recommended packages

  • countrycode for converting country names and codes across different systems (ISO3, Eurostat, World Bank, UN, FIPS/GEC, etc..)
  • dplyr for data manipulation.

Citation

Hernangómez D (2024). igoR: Intergovernmental Organizations Database. doi:10.5281/zenodo.4442958, https://dieghernan.github.io/igoR/.

A BibTeX entry for LaTeX users:

@Manual{R-igoR,
  title = {{igoR}: Intergovernmental Organizations Database},
  doi = {10.5281/zenodo.4442958},
  author = {Diego Hernangómez},
  year = {2024},
  version = {0.2.0},
  url = {https://dieghernan.github.io/igoR/},
  abstract = {Tools to extract information from the Intergovernmental Organizations (IGO) Database , version 3, provided by the Correlates of War Project <https://correlatesofwar.org/>. See also Pevehouse, J. C. et al. (2020). Version 3 includes information from 1815 to 2014.},
}

References

Correlates of War Project. 2017. “State System Membership List, V2016.” https://correlatesofwar.org/data-sets/state-system-membership/.

Pevehouse, Jon CW, Timothy Nordstrom, Roseanne W McManus, and Anne Spencer Jamison. 2020. “Tracking Organizations in the World: The Correlates of War IGO Version 3.0 Datasets.” Journal of Peace Research 57 (3): 492–503. https://doi.org/10.1177/0022343319881175.

igor's People

Contributors

actions-user avatar dependabot[bot] avatar dieghernan avatar github-actions[bot] avatar imgbot[bot] avatar imgbotapp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

igor's Issues

Release igoR 0.1.2

Prepare for release:

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_dev_version()

Release igoR 0.2.0

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)

Release igoR 0.1.5

Prepare for release:

  • git pull
  • Check current CRAN check results
  • Polish NEWS
  • devtools::build_readme()
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md
  • git push

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • git push
  • usethis::use_github_release()
  • usethis::use_dev_version()
  • git push

Release igoR 0.1.3

Prepare for release:

  • Check current CRAN check results
  • Polish NEWS
  • devtools::build_readme()
  • urlchecker::url_check()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • rhub::check_for_cran()
  • revdepcheck::revdep_check(num_workers = 4)
  • Update cran-comments.md

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_dev_version()

pkgcheck results - main

Checks for igoR (v0.1.5)

git hash: 6a0f8219

  • ✔️ Package is already on CRAN.
  • ✔️ has a 'codemeta.json' file.
  • ✔️ has a 'contributing' file.
  • ✔️ uses 'roxygen2'.
  • ✔️ 'DESCRIPTION' has a URL field.
  • ✔️ 'DESCRIPTION' has a BugReports field.
  • ✔️ Package has at least one HTML vignette
  • ✔️ All functions have examples.
  • ✔️ Package has continuous integration checks.
  • ✔️ Package coverage is 100%.
  • ✔️ R CMD check found no errors.
  • ✔️ R CMD check found no warnings.

Package License: GPL (>= 3)


1. Package Dependencies

Details of Package Dependency Usage (click to open)

The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.

type package ncalls
internal base 76
internal igoR 11
internal stats 5
imports NA NA
suggests countrycode NA
suggests dplyr NA
suggests ggplot2 NA
suggests knitr NA
suggests rmarkdown NA
suggests testthat NA
linking_to NA NA

Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table.

base

c (15), seq_len (7), colnames (6), for (5), length (5), max (5), data.frame (4), merge (4), unique (4), by (3), list (3), match (3), as.matrix (2), min (2), as.character (1), as.data.frame (1), dim (1), grep (1), matrix (1), mode (1), ncol (1), vector (1)

igoR

igo_search_states (5), igo_dyadic (2), igo_members (1), igo_search (1), igo_state_membership (1), state_year_format3$state (1)

stats

aggregate (3), df (2)

NOTE: No imported packages appear to have associated function calls; please ensure with author that these 'Imports' are listed appropriately.


2. Statistical Properties

This package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing.

Details of statistical properties (click to open)

The package has:

  • code in R (100% in 7 files) and
  • 1 authors
  • 3 vignettes
  • 3 internal data files
  • 1 imported package
  • 5 exported functions (median 74 lines of code)
  • 5 non-exported functions in R (median 150 lines of code)

Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
The following terminology is used:

  • loc = "Lines of Code"
  • fn = "function"
  • exp/not_exp = exported / not exported

All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the checks_to_markdown() function

The final measure (fn_call_network_size) is the total number of calls between functions (in R), or more abstract relationships between code objects in other languages. Values are flagged as "noteworthy" when they lie in the upper or lower 5th percentile.

measure value percentile noteworthy
files_R 7 45.7
files_vignettes 5 96.9
files_tests 5 81.7
loc_R 463 45.1
loc_vignettes 626 83.0
loc_tests 69 31.8
num_vignettes 3 94.2
data_size_total 421344 91.1
data_size_median 201562 94.1
n_fns_r 10 13.0
n_fns_r_exported 5 24.2
n_fns_r_not_exported 5 10.4
n_fns_per_file_r 1 0.2 TRUE
num_params_per_fn 3 33.6
loc_per_fn_r 76 95.1 TRUE
loc_per_fn_r_exp 74 87.9
loc_per_fn_r_not_exp 150 98.7 TRUE
rel_whitespace_R 28 60.2
rel_whitespace_vignettes 25 78.5
rel_whitespace_tests 10 16.8
doclines_per_fn_exp 50 63.0
doclines_per_fn_not_exp 0 0.0 TRUE
fn_call_network_size 13 37.5

2a. Network visualisation

An interactive visualisation of calls between objects in the package has been uploaded as a workflow artefact. To view it, click on results from the latest 'pkgcheck' action, scroll to the bottom, and click on the 'visual-network' artefact.


3. goodpractice and other checks

Details of goodpractice checks (click to open)

3a. Continuous Integration Badges

check-full.yaml

GitHub Workflow Results

id name conclusion sha run_number date
5734803227 CITATION-cff success f8dd1d 139 2023-08-02
5719703964 Clear GHA caches manually success fff2a1 3 2023-07-31
5734803225 lintr success f8dd1d 3 2023-08-02
5734857025 pages build and deployment success 8565b5 92 2023-08-02
5734863181 pkgcheck NA 6a0f82 1 2023-08-02
5734803226 pkgdown-gh-pages success f8dd1d 217 2023-08-02
5734803228 R-CMD-check success f8dd1d 519 2023-08-02
5734803230 test-coverage success f8dd1d 374 2023-08-02
5734817088 update-docs success f8dd1d 131 2023-08-02

3b. goodpractice results

R CMD check with rcmdcheck

R CMD check generated the following note:

  1. checking data for non-ASCII characters ... NOTE
    Note: found 160 marked UTF-8 strings

R CMD check generated the following check_fail:

  1. rcmdcheck_non_ascii_characters_in_data

Test coverage with covr

Package coverage: 100

Cyclocomplexity with cyclocomp

The following function have cyclocomplexity >= 15:

function cyclocomplexity
igo_dyadic 21

Static code analyses with lintr

lintr found the following 8 potential issues:

message number of times
Avoid library() and require() calls in packages 5
Lines should not be more than 80 characters. 3


Package Versions

package version
pkgstats 0.1.3.4
pkgcheck 0.1.2.1

Release igoR 0.1.2

Prepare for release:

Submit to CRAN:

  • usethis::use_version('patch')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • usethis::use_github_release()
  • usethis::use_dev_version()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.