MyNixOS website logo
Description

Calculating Political System Metrics.

A toolbox to facilitate the calculation of political system indicators for researchers. This package offers a variety of basic indicators related to electoral systems, party systems, elections, and parliamentary studies, as well as others. Main references are: Loosemore and Hanby (1971) <doi:10.1017/S000712340000925X>; Gallagher (1991) <doi:10.1016/0261-3794(91)90004-C>; Laakso and Taagepera (1979) <doi:10.1177/001041407901200101>; Rae (1968) <doi:10.1177/001041406800100305>; Hirschmaņ (1945) <ISBN:0-520-04082-1>; Kesselman (1966) <doi:10.2307/1953769>; Jones and Mainwaring (2003) <doi:10.1177/13540688030092002>; Rice (1925) <doi:10.2307/2142407>; Pedersen (1979) <doi:10.1111/j.1475-6765.1979.tb01267.x>; SANTOS (2002) <ISBN:85-225-0395-8>.

politicsR

CRAN_Status_Badge AppVeyor BuildStatus DOI

politicsR is an R package designed to help political science researchers in calculating conventional party system and political metrics. It offers a comprehensive set of functions for calculating a wide range of indicators, including:

  • Party System Fractionalization Index as proposed by Douglas Rae (1968)

  • Effective Number of Political Parties by Laakso, M., & Taagepera, R. (1979)

  • Party Nationalization Index by Jones, M. P., & Mainwaring, S. (2003)

  • Rice Party Cohesion Index by Rice (1925); and many more.

Installation

You can install the development version of politicsR from GitHub with:

# install.packages("devtools")
devtools::install_github("silvadenisson/politicsR")

Basic usage

To get started with politicsR, load the package with:

library(politicsR)
#> 
#> To cite politicsR in publications, use: citation('politicsR')

Then you can start calculating diffent metrics, such as the Herfindahl-Hirschman Concentration Index (HH):

x <- c(0.1, 0.1, 0.3, 0.5)
hh(x)
#> [1] 0.36

Or the Effective Number of Political Parties (ENP):

enp(x)
#> [1] 2.777778

The politicsR package also contains a few datasets with electoral results that can be used to test its functions. These datasets are organized by the Constituency-Level Elections Archive (CLEA) project and provide a rich source of information for political analysis. With these datasets and the functions provided by the package, users can easily calculate political science metrics such as Douglas Rae’s Fractionalization Index:

data(spain)
barc2019 <- spain[spain$yr == 2019 & spain$cst_n == "Barcelona",]
fractionalization(barc2019$pvs1)
#> [1] 0.6828265
Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows