项目作者: hmeleiro

项目描述 :
Una librería de R para descargar resultados electorales de España del Ministerio del Interior.
高级语言: R
项目地址: git://github.com/hmeleiro/elecciones.git
创建时间: 2018-11-15T15:52:10Z
项目社区:https://github.com/hmeleiro/elecciones

开源协议:

下载


infoelectoral

R-CMD-check CRAN status [License: GPL-2 rOS-badge

infoelectoral is a R library that helps retrieve official electoral results for Spain from the Ministry of the Interior. It allows you to download the results of general, european and municipal elections of any year at the polling station and municipality level.

Installation

  1. # To install the latest stable version from CRAN:
  2. install.packages("infoelectoral")
  3. # To install the development version:
  4. devtools::install_github("ropenspain/infoelectoral")

Overview

infoelectoral has four functions:

  • mesas() downloads the electoral results data of the selected election at the polling station level.
  • municipios() downloads the electoral results data of the selected election at the municipality level.
  • provincias() downloads the electoral results data of the selected election at the constituency level.
  • candidatos() downloads the candidates data of the selected elections.

The package also includes some datasets with the official names of the territorial units and the election dates.

Basic usage

  1. library(infoelectoral)
  2. df <- municipios(tipo_eleccion = "congreso", anno = 1982, mes = "10")

Learn more

For a a extended example of how all functions work please check the vignettes: