Closed christopherkenny closed 2 years ago
Can you paste the overall summary in the marked spot?
Also, could you show me a couple more random plans? Just want to spot-check the diversity, esp. in SoCal.
I also notice that the E-most big district connects to the SoCal cluster the same way in every example map (but the enacted map doesn't do this). Are we sure that the cluster-based sim process could yield the enacted plan?
Yeah, just added the summary. Will get you more sample plans today
Here are six more. I think that we may need to run a bit more for the south?
Hm you see what I mean about the S-central connection all being through that one precicnt? Any way to dig into that — is it the adj graph or the boundary check?
Oh, I hope it's the adjacency! I have a seam_sew function that never gets any use for this problem. Will look into it.
Okay, making the clusters a bit smaller looks hopeful @CoryMcCartan.
Validation:
Bay region summary:
SMC: 20,000 sampled plans of 14 districts on 2,532 units
`adapt_k_thresh`=0.985 • `seq_alpha`=0.5
`est_label_mult`=1 • `pop_temper`=0.0025
Plan diversity 80% range: 0.62 to 0.88
Sampling diagnostics for SMC run 1 of 2 (10,000 samples)
Eff. samples (%) Acc. rate Log wgt. sd Max. unique Est. k
Split 1 4,216 (42.2%) 10.8% 0.46 6,334 (100%) 9
Split 2 3,842 (38.4%) 15.6% 0.99 4,598 ( 73%) 6
Split 3 3,655 (36.5%) 22.2% 1.09 4,517 ( 71%) 4
Split 4 4,326 (43.3%) 20.8% 1.09 4,571 ( 72%) 4
Split 5 4,733 (47.3%) 19.5% 1.01 4,961 ( 78%) 4
Split 6 4,637 (46.4%) 23.3% 0.97 5,163 ( 82%) 3
Split 7 5,025 (50.2%) 21.1% 0.99 5,258 ( 83%) 3
Split 8 5,147 (51.5%) 19.5% 0.99 5,269 ( 83%) 3
Split 9 4,243 (42.4%) 25.0% 0.99 5,285 ( 84%) 2
Split 10 4,274 (42.7%) 11.7% 1.04 5,136 ( 81%) 4
Split 11 4,276 (42.8%) 13.8% 1.07 4,903 ( 78%) 3
Split 12 4,527 (45.3%) 17.5% 0.99 4,771 ( 75%) 2
Split 13 4,499 (45.0%) 14.7% 1.02 4,730 ( 75%) 2
Resample 1,124 (11.2%) NA% 8.69 3,129 ( 50%) NA
Sampling diagnostics for SMC run 2 of 2 (10,000 samples)
Eff. samples (%) Acc. rate Log wgt. sd Max. unique Est. k
Split 1 4,173 (41.7%) 12.3% 0.46 6,335 (100%) 8
Split 2 3,944 (39.4%) 18.5% 1.01 4,721 ( 75%) 5
Split 3 3,746 (37.5%) 21.6% 1.08 4,512 ( 71%) 4
Split 4 4,134 (41.3%) 27.4% 1.09 4,647 ( 74%) 3
Split 5 4,520 (45.2%) 34.8% 1.05 4,988 ( 79%) 2
Split 6 4,590 (45.9%) 22.9% 1.02 5,093 ( 81%) 3
Split 7 4,951 (49.5%) 15.9% 1.01 5,262 ( 83%) 4
Split 8 5,304 (53.0%) 18.8% 0.98 5,263 ( 83%) 3
Split 9 5,212 (52.1%) 24.1% 0.94 5,327 ( 84%) 2
Split 10 5,244 (52.4%) 14.9% 0.96 5,246 ( 83%) 3
Split 11 4,304 (43.0%) 13.4% 0.97 5,160 ( 82%) 3
Split 12 4,813 (48.1%) 17.0% 1.05 4,934 ( 78%) 2
Split 13 4,053 (40.5%) 10.3% 1.00 4,695 ( 74%) 3
Resample 579 (5.8%) NA% 8.93 3,115 ( 49%) NA
South region summary:
SMC: 20,000 sampled plans of 28 districts on 4,873 units
`adapt_k_thresh`=0.985 • `seq_alpha`=0.95
`est_label_mult`=1 • `pop_temper`=0.005
Plan diversity 80% range: 0.78 to 0.95
Sampling diagnostics for SMC run 1 of 2 (10,000 samples)
Eff. samples (%) Acc. rate Log wgt. sd Max. unique Est. k
Split 1 3,396 (34.0%) 17.3% 0.29 6,315 (100%) 11
Split 2 3,337 (33.4%) 25.9% 0.31 4,105 ( 65%) 7
Split 3 3,117 (31.2%) 34.4% 0.36 4,005 ( 63%) 5
Split 4 2,970 (29.7%) 39.7% 0.38 3,926 ( 62%) 4
Split 5 2,889 (28.9%) 47.8% 0.39 3,935 ( 62%) 3
Split 6 2,620 (26.2%) 29.7% 0.40 3,882 ( 61%) 5
Split 7 2,495 (25.0%) 34.3% 0.42 3,874 ( 61%) 4
Split 8 2,444 (24.4%) 41.3% 0.43 3,837 ( 61%) 3
Split 9 2,281 (22.8%) 39.9% 0.46 3,830 ( 61%) 3
Split 10 2,064 (20.6%) 49.9% 0.48 3,828 ( 61%) 2
Split 11 1,904 (19.0%) 47.9% 0.49 3,785 ( 60%) 2
Split 12 2,008 (20.1%) 21.6% 0.50 3,744 ( 59%) 5
Split 13 2,035 (20.3%) 25.5% 0.53 3,897 ( 62%) 4
Split 14 1,926 (19.3%) 24.2% 0.55 3,839 ( 61%) 4
Split 15 1,447 (14.5%) 29.5% 0.62 3,871 ( 61%) 3
Split 16 1,586 (15.9%) 27.5% 0.65 3,769 ( 60%) 3
Split 17 1,494 (14.9%) 25.8% 0.65 3,808 ( 60%) 3
Split 18 1,585 (15.8%) 32.9% 0.67 3,798 ( 60%) 2
Split 19 1,626 (16.3%) 30.4% 0.64 3,998 ( 63%) 2
Split 20 1,513 (15.1%) 26.7% 0.64 4,021 ( 64%) 2
Split 21 1,448 (14.5%) 16.4% 0.66 4,098 ( 65%) 3
Split 22 998 (10.0%) 14.8% 0.67 3,951 ( 63%) 3
Split 23 1,993 (19.9%) 19.5% 0.69 3,741 ( 59%) 2
Split 24 1,739 (17.4%) 15.6% 0.75 4,113 ( 65%) 2
Split 25 1,433 (14.3%) 7.5% 0.85 3,651 ( 58%) 4
Split 26 1,449 (14.5%) 7.4% 0.74 3,791 ( 60%) 3
Split 27 785 (7.9%) 6.3% 0.66 2,780 ( 44%) 2
Resample 430 (4.3%) NA% 9.78 3,395 ( 54%) NA *
Sampling diagnostics for SMC run 2 of 2 (10,000 samples)
Eff. samples (%) Acc. rate Log wgt. sd Max. unique Est. k
Split 1 3,455 (34.5%) 18.8% 0.29 6,333 (100%) 10
Split 2 3,304 (33.0%) 26.4% 0.31 4,054 ( 64%) 7
Split 3 3,176 (31.8%) 29.0% 0.37 4,035 ( 64%) 6
Split 4 2,988 (29.9%) 27.5% 0.38 4,039 ( 64%) 6
Split 5 2,822 (28.2%) 38.4% 0.40 3,914 ( 62%) 4
Split 6 2,597 (26.0%) 35.9% 0.41 3,898 ( 62%) 4
Split 7 2,489 (24.9%) 44.0% 0.42 3,832 ( 61%) 3
Split 8 2,248 (22.5%) 41.2% 0.44 3,798 ( 60%) 3
Split 9 2,234 (22.3%) 31.4% 0.46 3,836 ( 61%) 4
Split 10 2,013 (20.1%) 38.3% 0.47 3,755 ( 59%) 3
Split 11 1,707 (17.1%) 36.0% 0.48 3,873 ( 61%) 3
Split 12 1,718 (17.2%) 45.4% 0.50 3,842 ( 61%) 2
Split 13 1,666 (16.7%) 43.5% 0.50 3,852 ( 61%) 2
Split 14 1,786 (17.9%) 30.8% 0.51 3,896 ( 62%) 3
Split 15 1,355 (13.6%) 38.9% 0.61 3,983 ( 63%) 2
Split 16 1,604 (16.0%) 26.2% 0.62 3,963 ( 63%) 3
Split 17 1,811 (18.1%) 24.8% 0.63 3,881 ( 61%) 3
Split 18 1,162 (11.6%) 22.6% 0.65 4,035 ( 64%) 3
Split 19 1,142 (11.4%) 29.4% 0.65 3,706 ( 59%) 2
Split 20 1,532 (15.3%) 11.9% 0.64 3,782 ( 60%) 5
Split 21 1,047 (10.5%) 12.4% 0.63 4,051 ( 64%) 4
Split 22 1,082 (10.8%) 13.9% 0.70 3,755 ( 59%) 3
Split 23 1,315 (13.1%) 10.3% 0.73 3,472 ( 55%) 4
Split 24 1,950 (19.5%) 12.1% 0.74 3,910 ( 62%) 3
Split 25 2,052 (20.5%) 14.7% 0.69 3,897 ( 62%) 2
Split 26 2,162 (21.6%) 13.9% 0.73 3,879 ( 61%) 2
Split 27 1,640 (16.4%) 5.8% 0.85 2,973 ( 47%) 2
Resample 1,823 (18.2%) NA% 10.07 3,088 ( 49%) NA
• Watch out for low effective samples, very low acceptance rates (less than 1%), large
std. devs. of the log weights (more than 3 or so), and low numbers of unique plans. R-hat
values for summary statistics should be between 1 and 1.05.
• (*) Bottlenecks found: Consider weakening or removing constraints, or increasing the
population tolerance. If the accpetance rate drops quickly in the final splits, try
increasing `pop_temper` by 0.01. To visualize what geographic areas may be causing
problems, try running the following code. Highlighted areas are those that may be causing
the bottleneck.
plot(<map object>, rowMeans(as.matrix(plans_south) == <bottleneck iteration>))
Remainder summary:
SMC: 5,000 sampled plans of 52 districts on 9,129 units
`adapt_k_thresh`=0.985 • `seq_alpha`=0.5
`est_label_mult`=1 • `pop_temper`=0
Plan diversity 80% range: 0.42 to 0.86
R-hat values for summary statistics:
pop_overlap total_vap plan_dev comp_edge comp_polsby pop_hisp
1.0045232 1.0112384 1.0003201 1.0175013 1.0146713 1.0091355
pop_white pop_black pop_aian pop_asian pop_nhpi pop_other
1.0069664 1.0185153 1.0057457 1.0100283 1.0234747 1.0079842
pop_two vap_hisp vap_white vap_black vap_aian vap_asian
0.9998509 1.0085254 1.0100374 1.0159567 1.0064864 1.0115489
vap_nhpi vap_other vap_two pre_16_dem_cli pre_16_rep_tru pre_20_dem_bid
1.0244848 1.0052043 1.0028274 1.0144599 1.0145071 1.0014293
pre_20_rep_tru arv_16 adv_16 arv_20 adv_20 county_splits
1.0287086 1.0145071 1.0144599 1.0287086 1.0014293 1.0102642
muni_splits ndv nrv ndshare e_dvs pr_dem
1.0136140 1.0082826 1.0498364 1.0044934 1.0046764 1.0086745
e_dem pbias egap
1.0008221 1.0041871 0.9999721
Sampling diagnostics for SMC run 1 of 2 (20,000 samples)
Eff. samples (%) Acc. rate Log wgt. sd Max. unique Est. k
Split 1 15,300 (76.5%) 13.7% 0.70 12,041 ( 95%) 6
Split 2 15,206 (76.0%) 13.4% 0.75 11,755 ( 93%) 5
Split 3 15,514 (77.6%) 14.8% 0.74 11,692 ( 92%) 4
Split 4 16,106 (80.5%) 13.6% 0.72 11,508 ( 91%) 4
Split 5 16,234 (81.2%) 16.6% 0.69 11,572 ( 92%) 3
Split 6 16,316 (81.6%) 14.8% 0.67 11,589 ( 92%) 3
Split 7 16,236 (81.2%) 10.0% 0.68 11,489 ( 91%) 4
Split 8 15,919 (79.6%) 11.2% 0.69 11,268 ( 89%) 3
Split 9 16,306 (81.5%) 12.8% 0.68 11,110 ( 88%) 2
Split 10 16,530 (82.6%) 6.6% 0.66 10,823 ( 86%) 3
Split 11 16,146 (80.7%) 2.5% 0.67 9,975 ( 79%) 3
Resample 8,262 (41.3%) NA% 0.67 10,749 ( 85%) NA
Sampling diagnostics for SMC run 2 of 2 (20,000 samples)
Eff. samples (%) Acc. rate Log wgt. sd Max. unique Est. k
Split 1 15,271 (76.4%) 16.6% 0.70 12,062 ( 95%) 5
Split 2 15,274 (76.4%) 11.0% 0.75 11,770 ( 93%) 6
Split 3 15,370 (76.8%) 11.7% 0.76 11,638 ( 92%) 5
Split 4 15,557 (77.8%) 13.7% 0.75 11,554 ( 91%) 4
Split 5 15,885 (79.4%) 12.6% 0.72 11,492 ( 91%) 4
Split 6 16,349 (81.7%) 11.3% 0.69 11,525 ( 91%) 4
Split 7 16,490 (82.5%) 13.4% 0.67 11,441 ( 90%) 3
Split 8 16,489 (82.4%) 11.2% 0.66 11,491 ( 91%) 3
Split 9 16,584 (82.9%) 6.6% 0.67 11,030 ( 87%) 4
Split 10 16,760 (83.8%) 6.6% 0.65 10,725 ( 85%) 3
Split 11 16,416 (82.1%) 2.5% 0.67 10,167 ( 80%) 3
Resample 10,964 (54.8%) NA% 0.67 10,935 ( 86%) NA
Additional validation plots:
Checking counts:
Dots:
@CoryMcCartan
Redistricting requirements
In California, under Article XXI, districts must:
Interpretation of requirements
We enforce a maximum population deviation of 0.5%. We add a pseudo-county constraint, as described below. We add VRA constraints encouraging Hispanic VAP and Asian VAP majorities in districts.
Data Sources
Data for California comes from the ALARM Project's 2020 Redistricting Data Files.
Pre-processing Notes
Islands were connected to their nearest point within county on the mainland.
Simulation Notes
We sample 20,000 districting plans in each cluster across 2 indpenednet runs of the SMC algorithm. We next sample 40,000 districting plans for California across 2 independent runs of the SMC algorithm for the remainder. We then thin the sample to down to 5,000 plans. To balance county and municipality splits, we create pseudocounties for use in the county constraint. These are counties are Alameda County, Contra Costa County, Fresno County, Kern County, Los Angeles County, Orange County, Riverside County, Sacramento County, San Bernardino County, San Diego County, San Francisco County, San Joaquin County, San Mateo County, Santa Clara County, and Ventura County, which are larger than a congressional district in population. A small population tempering value was used for each cluster to avoid losing diversity at the final step based on initial runs.
1. Clustering Procedure
First, we run partial SMC in two pieces: the south and the Bay Area. The counties in each cluster are:
Los Angeles, San Bernardino, Orange, Riverside, San Diego, and Imperial
Alameda, Contra Costa, Fresno, Kings, Madera, Madera, Merced, Monterey, Sacramento, San Benito, San Francisco, San Joaquin, San Mateo, Santa Clara, Santa Cruz, Solano, Stanislaus, Tulare, and Yolo
We sample in each of these regions with a population deviation of 0.5%. We sample 27 districts in the southern region and 15 districts in the Bay Area. Because each cluster will have leftover population, we apply an additional constraint that incentivizes leaving any unassigned areas on the edge of these clusters to avoid discontiguities. For each cluster, we add VRA constraints encouraging Hispanic VAP and Asian VAP concentrations in districts, in line with the enacted plan.
2. Combination Procedure
Then, these partial map simulations are combined to run statewide simulations. We sample 10 districts in the remainder.
Validation
Checklist
TODO
lines from the template code have been removedenforce_style()
to format my coderedist_map
andredist_plans
objects, and summary statistics) have been edited@CoryMcCartan
Additional Notes:
Summary for south region:
Summary for Bay region: