Learn R Programming

polAr (version 0.2.0.1)

compute_concentration: Calcula Concentraci<U+00F3>n Elecotral (Computes Electoral Concentration)

Description

Calcula el <U+00ED>ndice de concentraci<U+00F3>n electoral de una elecci<U+00F3>n en funci<U+00F3>n del porecentaje acumulado de las dos listas m<U+00E1>s votadas (Computes the electoral concentration index of an election based on the accumulated percentage of the two most voted lists)

Usage

compute_concentration(data)

Arguments

data

la base de datos para hacer el c<U+00E1>lculo obtenida con get_election_data (tiblle downloaded with get_election_data needed to compute disproportion).#'

Value

Devuelve un tibble con class "tbl_df","tbl", "data.frame" con el c<U+00F3>mputo de concentraci<U+00F3>n. Puede tomar valores entre 0 y 1, siendo concentracion = 1 el de mayor grado (un solo partido obtiene todos los votos). (Returns a tibble with class "tbl_df", "tbl", "data.frame" with concentration computation. It can take values between 0, 1, with concentration = 1 being the highest degree (a single party gets all the votes)).

Details

REQUISITO:

El formato de data debe ser long para calcular compute_concentration. Si data es wide se puede transformar con make_long (long format of data is required for compute_concentration. If data is in wide format you can transform it with make_long)

NOTA:

el grado de concentraci<U+00F3>n ser<U+00E1> sensible al nivel de agregaci<U+00F3>n de los datos determinados por el par<U+00E1>metro level de get_election_data (the degree of concentration will be sensitive to the level of aggregation of the data determined by the parameter level of get_election_data).

See Also

compute_competitiveness, compute_seats, compute_nep, compute_disproportion

Examples

Run this code
# NOT RUN {
tucuman_dip_gral_2017

tucuman_dip_gral_2017 %>% 
  compute_concentration()

# }

Run the code above in your browser using DataLab