Simulation Algorithm ImplementationsCore functions to perform a redistricting simulation |
|
---|---|
SMC Redistricting Sampler (McCartan and Imai 2023) |
|
Merge-Split/Recombination MCMC Redistricting Sampler (Carter et al. 2019) |
|
Parallel Merge-Split/Recombination MCMC Redistricting Sampler |
|
'Flip' Markov Chain Monte Carlo Redistricting Simulation (Fifield et al. 2020) |
|
Redistricting Optimization through Short Bursts |
|
Set up constraints for sampling |
|
|
Sampling constraints |
Redistricting via Compact Random Seed and Grow Algorithm |
|
MCMC Redistricting Simulator using MPI |
|
Redistricting via Random Seed and Grow Algorithm |
|
Flip MCMC Redistricting Simulator using Simulated Annealing |
|
Analysis FunctionsFunctions for analyzing simulation outputs |
|
A set of redistricting plans |
|
Diagnostic information on sampled plans |
|
Add a reference plan to a set of plans |
|
Subset to sampled or reference draws |
|
Extract the matrix of district assignments from a redistricting simulation |
|
Extract the sampling weights from a redistricting simulation. |
|
Renumber districts to match a quantity of interest |
|
Pull back plans to unmerged units |
|
Renumber districts to match an existing plan |
|
Tally a variable by district |
|
Average a variable by precinct |
|
Hierarchically classify a set of redistricting plans |
|
Make a comparison between two sets of plans |
|
Identify which counties are split by a plan |
|
Extract the last plan from a set of plans |
|
Calculates Sparse Population Moves to Minimize Population Deviation |
|
Calculate the diversity of a set of plans |
|
Plot a plan classification |
|
Extract the district assignments for a precinct across all simulated plans |
|
Compute a matrix of precinct co-occurrences |
|
Combine multiple sets of redistricting plans |
|
Calculate compactness measures for a set of plans |
|
Compute Competitiveness |
|
Compute Distance between Partitions |
|
Counts the Number of Counties within a District |
|
Calculate Group Proportion by District |
|
Calculate gerrymandering metrics for a set of plans |
|
Counts the Number of Counties Split Between 3 or More Districts |
|
Counts the Number of Municipalities Split Between Districts |
|
Calculates Maximum Deviation from Population Parity |
|
Segregation index calculation for MCMC redistricting. |
|
Count County Splits |
|
Confidence Intervals for SMC and MCMC Estimates |
|
Setup HelpersFunctions that help prepare data and select constraints |
|
Create a |
|
Get and set the adjacency graph from a |
|
Extract the existing district assignment from a |
|
Get and set the population tolerance from a |
|
Extract the target district population from a |
|
Check that a |
|
Merge map units |
|
Visualize constraints |
|
Plot a |
|
Coarsen Adjacency List |
|
Create Constraints for SMC |
|
Create County IDs |
|
Relabel Discontinuous Counties |
|
Find Majority Minority Remainder |
|
Run parameter testing for |
|
Freeze Parts of a Map |
|
Identify Cores of a District (Heuristic) |
|
(Deprecated) Visualize Group Power Penalty |
|
Reduce Adjacency List |
|
Sink Plans to 1:ndists |
|
Subset a shp |
|
|
Scoring function arithmetic |
Combine scoring functions |
|
|
Scoring functions for |
Plotting ToolsFunctions for creating plots and maps |
|
Plot a |
|
Summary plots for |
|
Diagnostic plotting functionality for MCMC redistricting. |
|
Creates a Graph Overlay |
|
Plot Cores |
|
Plot quantities by district |
|
Plot a histogram of a summary statistic |
|
Majority Minority Plots |
|
Plot a Map |
|
Plot a district assignment |
|
Scatter plot of plan summary statistics |
|
Make a traceplot for a summary statistic |
|
Static Variation of Information Plot |
|
DataData included to help demonstrate capabilities |
|
EPSG Table |
|
Florida 25 Precinct Shape File |
|
Florida 250 Precinct Shape File |
|
Florida 25 Precinct File |
|
All Partitions of 25 Precincts into 3 Congressional Districts (No Population Constraint) |
|
Florida 70 Precinct Shape File |
|
Iowa County File |
|
Post Processing HelpersFunctions that help setup outputs for easier use |
|
Combine successive runs of |
|
Inverse probability reweighting for MCMC Redistricting |
|
(Deprecated) Confidence Intervals for Importance Sampling Estimates |
|
Uncoarsen a District Matrix |
|
Enumeration ToolsFunctions for more involved enumeration choices |
|
Calculate Frontier Size |
|
Enumerate All Parititions (Fifield et al. 2020) |
|
Initialize enumpart |
|
Prepares a run of the enumpart algorithm by ordering edges |
|
Read Results from enumpart |
|
Runs the enumpart algorithm |
|
MiscellaneousOther functions |
|
redist: Simulation Methods for Legislative Redistricting |
|
Extract the Metropolis Hastings Acceptance Rate |
|
Extract the sampling information from a redistricting simulation |
|
Access the Current |
|
Print redist_classified objects |
|
Generic to print redist_constr |
|
Generic to print redist_map |
|
Print method for |
|
Adjacency List functionality for redist |
|
Compare the Population Overlap Across Plans at the District Level |
|
Plot Weighted Border Adjacency |
|
Compare the Population Overlap Across Plans at the Precinct Level |
|
Return a random subgraph of a shape |
|
Reorders district numbers |
|
Create Weighted Adjacency Data |
|
Helper function to truncate importance weights |