Package: redistmetrics 1.0.7

Christopher T. Kenny

redistmetrics: Redistricting Metrics

Reliable and flexible tools for scoring redistricting plans using common measures and metrics. These functions provide key direct access to tools useful for non-simulation analyses of redistricting plans, such as for measuring compactness or partisan fairness. Tools are designed to work with the 'redist' package seamlessly.

Authors:Christopher T. Kenny [aut, cre], Cory McCartan [aut], Ben Fifield [aut], Kosuke Imai [aut]

redistmetrics_1.0.7.tar.gz
redistmetrics_1.0.7.tar.gz(r-4.5-noble)redistmetrics_1.0.7.tar.gz(r-4.4-noble)
redistmetrics_1.0.7.tgz(r-4.4-emscripten)redistmetrics_1.0.7.tgz(r-4.3-emscripten)
redistmetrics.pdf |redistmetrics.html
redistmetrics/json (API)
NEWS

# Install 'redistmetrics' in R:
install.packages('redistmetrics', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/alarm-redist/redistmetrics/issues

Pkgdown site:https://alarm-redist.org

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:
  • 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'

openblascpp

4.62 score 2 packages 23 scripts 319 downloads 45 exports 36 dependencies

Last updated 1 years agofrom:5c4030be02. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKDec 07 2024
R-4.5-linux-x86_64OKDec 07 2024

Exports:%>%by_plancomp_bccomp_box_reockcomp_chcomp_edges_remcomp_fhcomp_frac_keptcomp_log_stcomp_lwcomp_polsbycomp_reockcomp_schwartzcomp_skewcomp_x_symcomp_y_symcompet_talismandist_eucdist_hamdist_infodist_maninc_pairslist_fnpart_biaspart_declpart_decl_simplepart_dseatspart_dvspart_egappart_egap_eppart_lop_winspart_mean_medianpart_resppart_rmdpart_sscdpart_tau_gapprep_perimsseg_dissimsplits_adminsplits_countsplits_district_fuzzysplits_multisplits_sub_adminsplits_totaltally

Dependencies:classclassIntclicodetoolsDBIdoParalleldplyre1071fansiforeachgenericsgeosglueiteratorsKernSmoothlibgeoslifecyclemagrittrMASSpillarpkgconfigproxyR6RcppRcppArmadilloRcppThreadrlangs2sftibbletidyselectunitsutf8vctrswithrwk

Measures of Administrative Splits

Rendered fromsplits.Rmdusingknitr::rmarkdownon Dec 07 2024.

Last update: 2023-12-13
Started: 2021-12-20

Measures of Compactness

Rendered fromcompactness.Rmdusingknitr::rmarkdownon Dec 07 2024.

Last update: 2023-12-13
Started: 2021-12-20

Measures of Partisan Advantage

Rendered fromparty.Rmdusingknitr::rmarkdownon Dec 07 2024.

Last update: 2023-12-13
Started: 2021-12-20

Measures of Plan Distance

Rendered fromdistances.Rmdusingknitr::rmarkdownon Dec 07 2024.

Last update: 2023-12-13
Started: 2021-12-20

Other Measures

Rendered fromother.Rmdusingknitr::rmarkdownon Dec 07 2024.

Last update: 2023-12-13
Started: 2021-12-20

Using redistmetrics

Rendered fromredistmetrics.Rmdusingknitr::rmarkdownon Dec 07 2024.

Last update: 2023-12-13
Started: 2022-02-17

Readme and manuals

Help Manual

Help pageTopics
Shorten District by Plan vectorby_plan
Calculate Boyce Clark Ratiocomp_bc
Calculate Box Reock Compactnesscomp_box_reock
Calculate Convex Hull Compactnesscomp_ch
Calculate Edges Removed Compactnesscomp_edges_rem
Calculate Fryer Holden Compactnesscomp_fh
Calculate Fraction Kept Compactnesscomp_frac_kept
Calculate Log Spanning Tree Compactnesscomp_log_st
Calculate Length Width Compactnesscomp_lw
Calculate Polsby Popper Compactnesscomp_polsby
Calculate Reock Compactnesscomp_reock
Calculate Schwartzberg Compactnesscomp_schwartz
Calculate Skew Compactnesscomp_skew
Calculate X Symmetry Compactnesscomp_x_sym
Calculate Y Symmetry Compactnesscomp_y_sym
Compute Talismanic Redistricting Competitiveness Metriccompet_talisman
Calculate Euclidean Distancesdist_euc
Calculate Hamming Distancesdist_ham
Calculate Variation of Information Distancesdist_info
Calculate Manhattan Distancesdist_man
Count Incumbent Pairingsinc_pairs
Return Functions Matching a Prefixlist_fn
New Hampshire Election and Demographic Datanh
Redistricting Plans for New Hampshire as 'matrix'nh_m
New Hampshire Election and Demographic Data as a 'redist_map'nh_map
Redistricting Plans for New Hampshire as 'redist_plans'nh_plans
Calculate Partisan Biaspart_bias
Calculate Declinationpart_decl
Calculate Simplified Declinationpart_decl_simple
Calculate Democratic Seatspart_dseats
Calculate Democratic Vote Sharepart_dvs
Calculate Efficiency Gappart_egap
Calculate Efficiency Gap (Equal Population Assumption)part_egap_ep
Calculate Lopsided Winspart_lop_wins
Calculate Mean Median Scorepart_mean_median
Calculate Responsivenesspart_resp
Calculate Ranked Marginal Deviationpart_rmd
Calculate Smoothed Seat Count Deviationpart_sscd
Calculate Tau Gappart_tau_gap
Prep Polsby Popper Perimeter Tibbleprep_perims
Compute Dissimilarity Indexseg_dissim
Compute Number of Administrative Units Splitsplits_admin
Count the Number of Splits in Each Administrative Unitsplits_count
Fuzzy Splits by District (Experimental)splits_district_fuzzy
Compute Number of Administrative Units Split More than Oncesplits_multi
Compute Number of Sub-Administrative Units Splitsplits_sub_admin
Count the Total Splits in Each Plansplits_total
Tally a Column by Districttally