View source: R/merge_small_options.R
merge_small_options | R Documentation |
Merge small parties and also small candidates by, respectively, aggregating them in the options 'Other parties votes' and 'Other candidates votes'.
merge_small_options(x, min.party, min.candidate)
x |
A tibble with the same components and structure as the tibbles in the |
min.party |
A number between 0 and 100. Those parties which individually did not reach at least min.party% of the election-district vote are grouped in the option ‘Other parties votes’. |
min.candidate |
A number between 0 and 100. Those candidates which individually did not reach at least min.candididate% of the election-district vote are grouped in the option ‘Other candidates votes’. |
A tibble similar to x
with small parties and candidates merged on, respectively, ‘Other parties votes’
and ‘Other candidates votes’, with min.party
and min.candidate
used to determine when an electoral
option is small.
Jose M. Pavia, jose.m.pavia@uv.es
Pavia, JM (2021). ei.Datasets: Real datasets for assessing ecological inference algorithms, Social Science Computer Review, forthcoming.
ei_NZ_2002
ei_NZ_2005
ei_NZ_2008
ei_NZ_2011
ei_NZ_2014
ei_NZ_2017
ei_NZ_2020
ei_SCO_2007
collapsed.tibble <- merge_small_options(x = ei_NZ_2020, min.party = 3, min.candidate = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.