Package: sage 0.2.0
sage: Retrieve Slices of the Small-Area Global Elections Archive
Downloads and subsets slices of the Small-Area Global Elections (SAGE) archive, a harmonized collection of polling-station and precinct-level election results, without having to read monolithic country-level files. Reads partitioned 'Parquet' from a public bucket (configurable through the 'SAGE_SOURCE' environment variable, the 'sage_set_source()' function, or a local copy of the archive) and exposes a 'sage_load(country, years, columns)' function returning a 'tibble', plus helpers for the accompanying boundary polygons and candidate-level vote sidecars. See <https://github.com/noahdasanaike/sage> for the archive itself.
Authors:
sage_0.2.0.tar.gz
sage_0.2.0.zip(r-4.7-any)sage_0.2.0.zip(r-4.6-any)
sage_0.2.0.tar.gz(r-4.7-any)sage_0.2.0.tar.gz(r-4.6-any)
sage_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
sage/json (API)
| # Install 'sage' in R: |
| install.packages('sage', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/noahdasanaike/sage/issues
Last updated from:79d90bd492. Checks:6 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel | OK | 111 | ||
| source / vignettes | OK | 189 | ||
| linux-release | OK | 108 | ||
| windows-devel | OK | 82 | ||
| windows-release | OK | 88 | ||
| wasm-release | OK | 104 |
Exports:sage_columnssage_countriessage_loadsage_polygonssage_preference_votessage_set_sourcesage_years
Dependencies:arrowassertthatbitbit64clicpp11dplyrgenericsgluelifecyclemagrittrpillarpkgconfigpurrrR6rlangtibbletidyselectutf8vctrswithr
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| Small-Area Global Elections (SAGE) Data Retrieval | sage |
| List the columns available in the dataset | sage_columns |
| List countries available in the current source | sage_countries |
| Load a (country, years, columns) slice of SAGE | sage_load |
| Load the polygon set for one country | sage_polygons |
| Load the per-candidate vote sidecar | sage_preference_votes |
| Set the source URL or path for the SAGE archive | sage_set_source |
| List election years available for a country | sage_years |