Partisan Bias Calculations

Functions to calulate partisan bias measures

part_bias()

Calculate Partisan Bias

part_decl()

Calculate Declination

part_decl_simple()

Calculate Simplified Declination

part_dil_asym()

Calculate Dilution Asymmetry

part_dseats()

Calculate Democratic Seats

part_dvs()

Calculate Democratic Vote Share

part_egap()

Calculate Efficiency Gap

part_egap_ep()

Calculate Efficiency Gap (Equal Population Assumption)

part_lop_wins()

Calculate Lopsided Wins

part_mean_median()

Calculate Mean Median Score

part_resp()

Calculate Responsiveness

part_rmd()

Calculate Ranked Marginal Deviation

part_sscd()

Calculate Smoothed Seat Count Deviation

part_tau_gap()

Calculate Tau Gap

Compactness Calculations

Functions to calculate compactness measures

comp_bc()

Calculate Boyce Clark Ratio

comp_box_reock()

Calculate Box Reock Compactness

comp_ch()

Calculate Convex Hull Compactness

comp_edges_rem()

Calculate Edges Removed Compactness

comp_fh()

Calculate Fryer Holden Compactness

comp_frac_kept()

Calculate Fraction Kept Compactness

comp_log_st()

Calculate Log Spanning Tree Compactness

comp_lw()

Calculate Length Width Compactness

comp_polsby()

Calculate Polsby Popper Compactness

comp_reock()

Calculate Reock Compactness

comp_schwartz()

Calculate Schwartzberg Compactness

comp_skew()

Calculate Skew Compactness

comp_x_sym()

Calculate X Symmetry Compactness

comp_y_sym()

Calculate Y Symmetry Compactness

prep_perims()

Prep Polsby Popper Perimeter Tibble

Split Calculations

Functions to calculate splits

splits_admin()

Compute Number of Administrative Units Split

splits_count()

Count the Number of Splits in Each Administrative Unit

splits_district_fuzzy()

Fuzzy Splits by District (Experimental)

splits_multi()

Compute Number of Administrative Units Split More than Once

splits_sub_admin()

Compute Number of Sub-Administrative Units Split

splits_sub_count()

Count the Number of Splits in Each Sub-Administrative Unit

splits_total()

Count the Total Splits in Each Plan

Competitiveness Calculations

Functions to calculate competitiveness measures

compet_talisman()

Compute Talismanic Redistricting Competitiveness Metric

Distance Calculations

Functions to calculate distances between partitions

dist_euc()

Calculate Euclidean Distances

dist_ham()

Calculate Hamming Distances

dist_info()

Calculate Variation of Information Distances

dist_man()

Calculate Manhattan Distances

Segregation Calculations

Functions to calculate segregation measures

seg_dissim()

Compute Dissimilarity Index

Incumbent Calculations

Functions to assess incumbent pairings

inc_pairs()

Count Incumbent Pairings

Example Data

Data on New Hampshire for Examples

nh

New Hampshire Election and Demographic Data

nh_m

Redistricting Plans for New Hampshire as matrix

nh_map

New Hampshire Election and Demographic Data as a redist_map

nh_plans

Redistricting Plans for New Hampshire as redist_plans

Misc.

Remaining tools that don’t fit into other categories

by_plan()

Shorten District by Plan vector

list_fn()

Return Functions Matching a Prefix

tally()

Tally a Column by District