The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
Focuses on creating data sets and other tools that help make understanding gerrymandering faster and easier. Designed for easy preparation to run simulation analysis with the R package redist, but is aimed at the geographic aspects of redistricting, not partitioning methods. Most of these tools are gathered from seminar papers and do not correspond to a single publication.
You can install the released version of geomander from CRAN with:
install.packages("geomander")
And the development version from GitHub with:
# install.packages("devtools")
::install_github("christopherkenny/geomander") devtools
A very common task is aggregating block data to precincts.
library(geomander)
library(tidyverse)
#> ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
#> ✔ dplyr 1.1.4 ✔ readr 2.1.4
#> ✔ forcats 1.0.0 ✔ stringr 1.5.1
#> ✔ ggplot2 3.4.4 ✔ tibble 3.2.1
#> ✔ lubridate 1.9.3 ✔ tidyr 1.3.0
#> ✔ purrr 1.0.2
#> ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
#> ✖ dplyr::filter() masks stats::filter()
#> ✖ dplyr::lag() masks stats::lag()
#> ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
# load precincts
data('va18sub')
# create block data
<- create_block_table(state = 'VA', county = '087')
block
# match the geographies
<- geo_match(from = block, to = va18sub)
matches
# Aggregate
<- block2prec(block_table = block, matches = matches) prec
Other important tasks include breaking data into pieces by blocks underlying them.
library(geomander)
library(tidyverse)
# load precincts
data("va18sub")
# subset to target area
<- va18sub %>% filter(COUNTYFP == '087') va18sub
Then we can get common block data:
<- create_block_table(state = 'VA', county = '087') block
And estimate down to blocks
<- geo_estimate_down(from = va18sub, to = block, wts = block$vap, value = va18sub$G18USSRSTE) disagg
For more information, see the documentation and vignettes, available at https://christophertkenny.com/geomander/
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.