Package: redistmetrics 1.0.8

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.8.tar.gz
redistmetrics_1.0.8.zip(r-4.5)redistmetrics_1.0.8.zip(r-4.4)redistmetrics_1.0.8.zip(r-4.3)
redistmetrics_1.0.8.tgz(r-4.4-x86_64)redistmetrics_1.0.8.tgz(r-4.4-arm64)redistmetrics_1.0.8.tgz(r-4.3-x86_64)redistmetrics_1.0.8.tgz(r-4.3-arm64)
redistmetrics_1.0.8.tar.gz(r-4.5-noble)redistmetrics_1.0.8.tar.gz(r-4.4-noble)
redistmetrics_1.0.8.tgz(r-4.4-emscripten)redistmetrics_1.0.8.tgz(r-4.3-emscripten)
redistmetrics.pdf |redistmetrics.html
redistmetrics/json (API)
NEWS

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

Peer review:

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

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'

On CRAN:

7.94 score 10 stars 2 packages 23 scripts 251 downloads 47 exports 36 dependencies

Last updated 6 months agofrom:5f7b36d8a7. Checks:OK: 9. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 04 2024
R-4.5-win-x86_64OKNov 04 2024
R-4.5-linux-x86_64OKNov 04 2024
R-4.4-win-x86_64OKNov 04 2024
R-4.4-mac-x86_64OKNov 04 2024
R-4.4-mac-aarch64OKNov 04 2024
R-4.3-win-x86_64OKNov 04 2024
R-4.3-mac-x86_64OKNov 04 2024
R-4.3-mac-aarch64OKNov 04 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_dil_asympart_dseatspart_dvspart_egappart_egap_eppart_lop_winspart_mean_medianpart_resppart_rmdpart_sscdpart_tau_gapprep_perimsseg_dissimsplits_adminsplits_countsplits_district_fuzzysplits_multisplits_sub_adminsplits_sub_countsplits_totaltally

Dependencies:classclassIntclicodetoolsDBIdoParalleldplyre1071fansiforeachgenericsgeosglueiteratorsKernSmoothlibgeoslifecyclemagrittrMASSpillarpkgconfigproxyR6RcppRcppArmadilloRcppThreadrlangs2sftibbletidyselectunitsutf8vctrswithrwk

Measures of Administrative Splits

Rendered fromsplits.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2021-12-17
Started: 2021-12-16

Measures of Compactness

Rendered fromcompactness.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2024-05-28
Started: 2021-12-16

Measures of Partisan Advantage

Rendered fromparty.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2024-06-06
Started: 2021-12-16

Measures of Plan Distance

Rendered fromdistances.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2021-12-17
Started: 2021-12-16

Other Measures

Rendered fromother.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2021-12-20
Started: 2021-12-16

Using redistmetrics

Rendered fromredistmetrics.Rmdusingknitr::rmarkdownon Nov 04 2024.

Last update: 2023-11-30
Started: 2021-12-20

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 Dilution Asymmetrypart_dil_asym
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 Number of Splits in Each Sub-Administrative Unitsplits_sub_count
Count the Total Splits in Each Plansplits_total
Tally a Column by Districttally