Package {golosovRST}


Type: Package
Title: Golosov Relative Size Triangle Classification and Plotting
Version: 0.0.1
Description: Computes coordinates for the Golosov Relative Size Triangle (RST), classifies party-system observations into Golosov subtypes using polygon mapping and produces publication-ready Relative Size Triangle plots. Method reference: Golosov, G. V. (2011) "Party system classification: A methodological inquiry" <doi:10.1177/1354068810377189>.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 8.0.0
Imports: ggplot2, rlang
Suggests: sf, testthat (≥ 3.0.0), dplyr
NeedsCompilation: no
Packaged: 2026-08-17 09:22:10 UTC; 39333
Author: Federico Taddei [aut, cre]
Maintainer: Federico Taddei <federico.taddei@unimi.it>
Repository: CRAN
Date/Publication: 2026-09-03 11:50:37 UTC

Validate input for Golosov RST functions

Description

Validate input for Golosov RST functions

Usage

.validate_rst_input(data)

Plot Golosov Relative Size Triangle

Description

Plot Golosov Relative Size Triangle

Usage

plot_rst(data, label_col = NULL)

Arguments

data

A data.frame containing numeric columns s1, s2, s3, representing the seat shares of the three largest parties in parliament after the election.

label_col

Optional character scalar: name of a column used as point labels.

Value

A ggplot2 object.

References

Golosov, G. V. (2011). Party system classification: A methodological inquiry. Party Politics, 17(5), 539–560.

Golosov, G. V. (2014). Towards a classification of the world's democratic party systems, step 2: Placing the units into categories. Party Politics, 20(1), 3–15.

Examples

mydata <- data.frame(
  country = c("uk 2015", "ita 2013", "spa 2015"),
  s1 = c(0.508, 0.4714, 0.3514),
  s2 = c(0.357, 0.1730, 0.2571),
  s3 = c(0.086, 0.1556, 0.1971)
)
plot_rst(mydata)
plot_rst(mydata, label_col = "country")

Classify observations in Golosov subtypes using RST polygons

Description

Classify observations in Golosov subtypes using RST polygons

Usage

rst_classify(data, offset = 5e-16)

Arguments

data

A data.frame containing numeric columns s1, s2, s3, representing the seat shares of the three largest parties in parliament after the election.

offset

Small numeric offset used to avoid polygon-edge ambiguity.

Value

A data.frame with coordinates and golosov_subtype.

References

Golosov, G. V. (2011). Party system classification: A methodological inquiry. Party Politics, 17(5), 539–560.

Golosov, G. V. (2014). Towards a classification of the world's democratic party systems, step 2: Placing the units into categories. Party Politics, 20(1), 3–15.


Compute Golosov relative size coordinates

Description

Compute Golosov relative size coordinates

Usage

rst_coords(data)

Arguments

data

A data.frame containing numeric columns s1, s2, s3, representing the seat shares of the three largest parties in parliament after the election.

Value

A data.frame with original columns plus sr, x, and y.

References

Golosov, G. V. (2011). Party system classification: A methodological inquiry. Party Politics, 17(5), 539–560.

Golosov, G. V. (2014). Towards a classification of the world's democratic party systems, step 2: Placing the units into categories. Party Politics, 20(1), 3–15.