# Method notes: rebuilding and scoring Alberta's proposed 91-riding map

This document describes how the boundaries, vote estimates and comparisons in the report were produced. The aim is that anyone can check or reproduce them.

## 1. Inputs

| Input | Source | Use |
|---|---|---|
| Independent Advisory Panel report, high-resolution edition (848 MB PDF) | Legislative Assembly of Alberta, Legislature Library; linked from the Select Special Committee on Electoral Boundaries page | Riding outlines (Appendix 8), populations and areas (Appendix 7) |
| 2019 electoral division boundaries | Elections Alberta, GIS boundary data | Reference lines for fitting |
| 2023 and 2026 voting-area boundaries | Elections Alberta, GIS boundary data | Reference lines; units for vote attribution |
| 2023 poll-by-poll results | Elections Alberta Statement of Vote, as compiled in the open-source audit repository `Ixby/alberta-electoral-boundaries-audit` | Votes by poll and ballot type |
| 2021 census population by voting area | Same repository (derived from Statistics Canada dissemination areas) | Population checks; splitting votes within polls |
| 2025–26 Commission majority and minority district files | Same repository (files received from Elections Alberta; SHA-256 verified against the repository's LFS pointers) | Comparison maps |
| Neutral-map samples (91-riding chain, 47,500 plans; 87-riding canonical chains, 1,010,000 plans) | Same repository, committed sample files | Neutral-map comparison |

No code from the audit repository was executed. Only its data files were read.

## 2. Extracting the outlines

Each of the 91 riding pages in Appendix 8 (PDF pages 216–306; page = 215 + riding number) draws its riding as a single rust-coloured vector path. We read the PDF drawing operators (PyMuPDF), kept strokes of that colour wider than 2.3 pt, and dropped the small locator inset. We closed the strokes into polygons and applied an even-odd rule, so ridings that surround a city (for example Strathcona-Sherwood Park around Sherwood Park) keep their hole.

## 3. Georeferencing

- **Projection.** On the province map (PDF p. 215), x and y scales agree to 0.0004%. That is consistent with Alberta 10TM (EPSG:3400), the projection of Elections Alberta's files. That map was georeferenced by iterative closest-point (ICP) alignment against the Commission's boundaries (median residual 91 m at its scale of about 2 km per point).
- **Scale.** For each riding page, scale was fixed so the polygon's area equals the area printed in Appendix 7. A final ±3% adjustment was allowed.
- **Rotation.** Taken from the text direction of the riding's own red label. Many pages are printed rotated 90°.
- **Position.** A grid search, then trimmed rigid ICP against densified reference lines: the 2023 and 2026 voting areas, the 2019 ridings and the Commission map. Ridings over 400 km² were first aligned to the georeferenced province map. If fine alignment drifted from that, the coarse fit was kept (3 ridings: Banff-Canmore-Diamond Valley, Lacombe-Sylvan Lake, Rocky Mountain House-Sundre).
- **Repairs.** 13 ridings were re-fitted with a penalty for overlapping well-fitted neighbours. These were five pages with a different outline style, three ridings surrounding a city, and five poor initial fits. The final 5 (Red Deer-South, Sherwood Park, Edmonton-Strathcona, Edmonton-Meadows, Edmonton-Ellerslie) were fitted into the gaps left by their neighbours.

## 4. Validation

- The 91 polygons cover 99.989% of Alberta; the sum of their areas is 1.0001 times the area of their union.
- All 4,765 voting areas are covered by the reconstruction.
- Median boundary-to-reference distance: about 1 m for most urban ridings; the maximum is 36 m, in large northern and mountain ridings. Per-riding values are in `iap_91_results_2023.csv` (`med_err`, `within25`).
- The four Lethbridge ridings contain 98,207 people on 2021 census figures. Statistics Canada counts 98,406 for the city.
- Each riding's Appendix 7 population divided by its 2021 population falls between 0.86 and 1.65 times the province-wide factor. The high values are fast-growing new suburbs.

## 5. Vote attribution

- **Election-day votes.** Each poll's votes are split across its voting areas in proportion to 2021 population.
- **Advance, special and mobile votes.** These are reported only at riding level, so they are spread across the voting areas of each 2019 riding in proportion to election-day turnout.
- **Check.** The resulting voting-area table reproduces official 2023 totals in all 87 ridings exactly (UCP 928,900; NDP 777,404).
- **Split voting areas.** A voting area cut by a new boundary is split by area share.

## 6. Measures

All measures use the UCP–NDP two-party vote. Positive values favour the UCP.

- **Seats.** Ridings where the UCP leads.
- **Tied vote.** Uniform swing of every riding's UCP share by (50 − provincial share); the provincial share is 54.44%.
- **Seats-votes curve.** The same uniform swing, in 0.25-point steps.
- **Efficiency gap.** (NDP wasted − UCP wasted) / total two-party votes. Wasted votes are all of a losing party's votes plus a winner's votes above half the riding total.
- **Mean-median.** Median minus mean of riding UCP shares.
- **Declination.** Warrington (2018), as implemented in the audit repository.
- **Neutral-map percentiles.** Mid-rank percentile of each map's value within the neutral samples. These are computed on election-day votes, the basis on which the samples were scored. The 89-seat Commission maps are compared using seat share.

## 7. Known limitations

1. These are reconstructions, not official boundary files.
2. They use 2023 voting patterns and a uniform swing. Regional swing narrows the differences between maps.
3. Splitting voting areas by area share, and apportioning advance ballots, introduces small local errors.
4. The neutral samples do not model the rural weighting the law permits, count election-day ballots only, and (for 91 ridings) come from a single correlated chain.
5. The analysis measures effects, not intent, and takes no position on legality or constitutionality.

## 8. Files

- `index.html`: the report.
- `iap_91_ridings_unofficial.geojson`: rebuilt riding boundaries (WGS84, simplified to about 5 m), with 2023 vote estimates and fit-quality fields.
- `iap_91_results_2023.csv`: per-riding results, population, deviation and fit quality.
- `page286.png`: one page of the panel report (Lethbridge), used to illustrate the method.

## 9. Random maps of the Lethbridge area (story edition)

- **Territory:** the five panel ridings around Lethbridge (Lethbridge, Lethbridge-Cardston, Lethbridge-Little Bow, Lethbridge-Taber-Warner, Macleod-Crowsnest).
- **Units:** the 300 voting areas with most of their area inside that territory, carrying 2021 population and 2023 all-ballot votes.
- **Sampler:** recombination (ReCom). At each step, two adjacent ridings are merged, a random spanning tree is drawn, and an edge is cut so that both new ridings fall within ±25% of the average population.
- **Run:** 200,000 steps per variant, sampling every 10th map after 2,000 steps of burn-in (19,800 maps per variant).
- **Variants:** "Any valid lines" uses uniform random edge weights. "Try to keep Lethbridge whole" adds a weight to edges that cross the 2019 Lethbridge city ridings' outer boundary, so the sampler rarely cuts the city limit.
- **Scoring:** NDP seats on the 2023 vote, and under a uniform 4.44-point swing to a tied province.
