compute_concentration: Calcula Concentración Elecotral (_Computes Electoral...

View source: R/compute_concentration.R

compute_concentrationR Documentation

Calcula Concentración Elecotral (Computes Electoral Concentration)

Description

Calcula el índice de concentración electoral de una elección en función del porecentaje acumulado de las dos listas má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álculo obtenida con get_election_data (tiblle downloaded with get_election_data needed to compute disproportion).#'

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ón será sensible al nivel de agregación de los datos determinados por el pará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).

Value

Devuelve un tibble con class "tbl_df","tbl", "data.frame" con el cómputo de concentració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)).

See Also

compute_competitiveness, compute_seats, compute_nep, compute_disproportion

Examples


tucuman_dip_gral_2017

tucuman_dip_gral_2017 %>% 
  compute_concentration()


electorArg/polAr documentation built on Oct. 31, 2023, 8:27 a.m.