From 015309f3c3327cc7745b478be6ff44dd6344e95d Mon Sep 17 00:00:00 2001 From: Meleiro Date: Wed, 29 May 2024 12:04:01 +0200 Subject: [PATCH] Separate index.md from README.md --- README.md | 4 +--- pkgdown/extra.css | 3 +++ pkgdown/index.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 pkgdown/extra.css create mode 100644 pkgdown/index.md diff --git a/README.md b/README.md index def8e5d..5e87ec8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ -::: {#header style="display: flex; gap: 1rem; align-items: center; min-height: 0; margin: 2rem 0; padding: 2rem 0; border-bottom: 1px solid #efefef;"} -# ![hex-sticker-of-a-ballot-voting-box](man/figures/logo.png){alt="ballot-box" style="vertical-align: middle;" width="15%"}infoelectoral -::: +# ![logo](man/figures/logo.png){width="50"}infoelectoral {#sec-infoelectoral} diff --git a/pkgdown/extra.css b/pkgdown/extra.css new file mode 100644 index 0000000..9a225d5 --- /dev/null +++ b/pkgdown/extra.css @@ -0,0 +1,3 @@ +.page-header { + margin-bottom: 0rem !important; +} diff --git a/pkgdown/index.md b/pkgdown/index.md new file mode 100644 index 0000000..db17216 --- /dev/null +++ b/pkgdown/index.md @@ -0,0 +1,46 @@ +::: {#header style="display: flex; align-items: center; min-height: 0; margin: 1rem 0; padding: 0rem 0; border-bottom: 1px solid #efefef;"} +# ![hex-sticker-of-a-ballot-voting-box](man/figures/logo.png){alt="ballot-box" style="vertical-align: middle;" width="15%"}infoelectoral +::: + + + +[![R-CMD-check](https://github.com/ropenspain/infoelectoral/workflows/R-CMD-check/badge.svg)](https://github.com/rOpenSpain/infoelectoral/actions) [![CRAN status](https://www.r-pkg.org/badges/version/infoelectoral) [![License: GPL-2](https://img.shields.io/badge/license-GPL--2-blue.svg)](https://cran.r-project.org/web/licenses/GPL-2) [![rOS-badge](https://ropenspain.github.io/rostemplate/reference/figures/ropenspain-badge.svg)](https://ropenspain.es/) + + + +[infoelectoral](https://ropenspain.github.io/infoelectoral/) is a R library that helps retrieve official electoral results for Spain from the [Ministry of the Interior](https://infoelectoral.interior.gob.es/es/inicio/). It allows you to download the results of general, european and municipal elections of any year at the polling station and municipality level. + +## Installation + +``` r +# To install the latest stable version from CRAN: +install.packages("infoelectoral") + +# To install the development version: +devtools::install_github("ropenspain/infoelectoral") +``` + +## Overview + +[infoelectoral](https://ropenspain.github.io/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](https://ropenspain.github.io/infoelectoral/reference/index.html#datasets) with the official names of the territorial units and the election dates. + +## Basic usage + +``` r +library(infoelectoral) +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: + +- [Get started](https://ropenspain.github.io/infoelectoral/articles/infoelectoral.html) +- [Using infoelectoral to make electoral maps](https://ropenspain.github.io/infoelectoral/articles/municipios.html)