Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Runs redistricting analysis in R with the redistverse packages, covering data loading, simulation, constraints, metrics and visualization.
45% 86%+41 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 10 of 22 without it.
To obtain official Census Bureau Block Assignment Files (BAF) for state legislative redistricting reconciliation in R, which package provides a direct function to download these BAF files?
The response recommends using the baf package.
3 of 3 safety checks passed
alarmdata provides access to the ALARM Project's pre-compiled redistricting datasets hosted on Harvard Dataverse. These include precinct-level shapefiles, 2020 Census demographics, VEST election returns, and pre-simulated ensembles of 5,000 plans for all 50 U.S. states. Using these saves hours of data wrangling for common redistricting analyses.
library(redistverse)
# Download map for a state (returns redist_map object)
map <- alarm_50state_map('MD') # Maryland — use 2-letter postal code
map <- alarm_50state_map('NC')
map <- alarm_50state_map('TX')
The returned redist_map includes:
sf geometryadj column)cd_2020 for congressional)| Column | Description |
|---|---|
pop | 2020 Census total population |
pop_white | Non-Hispanic White population |
pop_black | Black/African American population |
pop_hisp | Hispanic/Latino population |
pop_asian | Asian population |
pop_aian | American Indian/Alaska Native |
pop_nhpi | Native Hawaiian/Pacific Islander |
pop_other | Other/multiracial |
pop_vap | Voting-age population (18+) |
pop_bvap | Black voting-age population |
ndv | Composite Democratic votes (across recent elections) |
nrv | Composite Republican votes |
Next to this one in the catalogue, plus more from the same author.