@kahwee/sf-map-svg 1.3.5 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ User-visible changes are recorded here. Unreleased entries describe changes on `
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 1.3.7 — 2026-09-26
8
+
9
+ - Expand the GitHub Pages measure explorer to 44 local measures across November 2002, November 2012, November 2022, and June 2026, covering all three supported district map years.
10
+ - Keep election results and district maps in separate, on-demand JSON chunks; add a searchable measure list, election picker, shareable year-specific views, and dated exports.
11
+ - Reconcile historical district vote totals to official citywide results and document source checksums and the 2012 precinct-to-district grouping method.
12
+
13
+ ## 1.3.6 — 2026-09-26
14
+
15
+ - Simplify district history playback to one JavaScript morph implementation, removing the larger CSS animation and fallback branch while preserving the moving boundaries and reduced-motion switch.
16
+
7
17
  ## 1.3.5 — 2026-09-26
8
18
 
9
19
  - Animate district boundary morphs with CSS path transitions and coordinated CSS fades on supported browsers, retaining a JavaScript fallback and reduced-motion instant switch.
package/README.md CHANGED
@@ -381,7 +381,7 @@ synthetic pointer tests do not establish physical-device compatibility.
381
381
 
382
382
  ## GitHub Pages
383
383
 
384
- The [civic atlas](https://kahwee.github.io/sf-map-svg/) leads with certified June 2026 ballot measure results. Visitors can select a measure and district, switch Yes/No shading, compare the official 2002, 2012, and 2022 district maps, and play a schematic BART journey. The boundary animation morphs matched district outlines between dated SVGs using CSS `d: path()` transitions where supported, with a JavaScript fallback. Intermediate shapes illustrate the change; each completed year uses its exact published geometry. Playback is user initiated, pauses when the page is hidden, and switches instantly when reduced motion is requested. The lightweight neighborhood guide loads on demand. The full [ballot measures explorer](https://kahwee.github.io/sf-map-svg/measures.html) retains comparison and download controls.
384
+ The [civic atlas](https://kahwee.github.io/sf-map-svg/) leads with certified June 2026 ballot measure results. Visitors can select a measure and district, switch Yes/No shading, compare the official 2002, 2012, and 2022 district maps, and play a schematic BART journey. The boundary animation morphs matched district outlines between dated SVGs. Intermediate shapes illustrate the change; each completed year uses its exact published geometry. Playback is user initiated, pauses when the page is hidden, and switches instantly when reduced motion is requested. The lightweight neighborhood guide loads on demand. The full [ballot measures explorer](https://kahwee.github.io/sf-map-svg/measures.html) spans all three district map years with four separately sourced election snapshots.
385
385
 
386
386
  ```sh
387
387
  pnpm build:pages # local preview
@@ -413,4 +413,4 @@ Embed the Pages demo with `<iframe src="https://kahwee.github.io/sf-map-svg/tran
413
413
 
414
414
  ## Ballot measures explorer
415
415
 
416
- [Explore June 2026 ballot measures](https://kahwee.github.io/sf-map-svg/measures.html): certified local Measures A–D, citywide outcomes, full-screen district maps with floating controls, expandable mobile results, touch pan/zoom, a focus view, side-by-side measure comparisons, Yes/No or original district colors, zoom and district fitting, a sortable comparison table, shareable views, and SVG/CSV/JSON downloads. The page uses the released map renderer and separately bundled official election results. It is an archive, not a live results service or voting guide. Methodology and source links are available on the page and in [SOURCES.md](SOURCES.md).
416
+ [Explore local ballot measures](https://kahwee.github.io/sf-map-svg/measures.html): 44 measures from the November 2002, November 2012, November 2022, and June 2026 elections, across all three supported district map vintages. Pick an election, search its measures, inspect a district, compare two measures, and download an SVG, CSV, or the sourced JSON. The page includes touch pan/zoom, keyboard district selection, a sortable district table, and shareable year-specific views. Each election's results and district map load on demand. This is an archive of four elections, not every intervening election or a live results service. See [the election data schema](data/elections/README.md) and [SOURCES.md](SOURCES.md) for methods and source links.
package/SOURCES.md CHANGED
@@ -96,3 +96,40 @@ Downloaded September 26, 2026 from the San Francisco Department of Elections:
96
96
  `data/elections/2026-06-02.json` contains Measures A–D, their citywide counts, and the 11 `SUP DIST n - Total` rows from workbook sheets 20–23. Each row retains its worksheet row number; metadata retains the workbook SHA-256. `scripts/import-election-results.py` extracts these with openpyxl (ingestion only), checks all district sums including under/overvotes, and cross-checks Yes/No citywide counts against the official HTML summary. Rerun with the downloaded workbook and summary paths. No original Site ballot overlays are reused.
97
97
 
98
98
  The Pages-only explorer calculates Yes / (Yes + No), excluding under/overvotes. Measure A uses the two-thirds threshold; B–D use a strict majority, as stated in the official summary. These are citywide outcomes, not district-level passage decisions. District counts are reported directly by Elections, not spatially assigned to neighborhoods. The existing 2022 district display map is reused unchanged. Election JSON is a separate website dataset, not a new npm package API; no live service or forthcoming-election coverage is claimed.
99
+
100
+ ## Historical local measures for the Pages explorer
101
+
102
+ Downloaded September 26, 2026. Each snapshot contains **all local measures in
103
+ the listed election**, not every election in the surrounding decade. All
104
+ eleven district Yes/No totals reconcile to the citywide official totals.
105
+
106
+ | Election | Final results source | Titles and thresholds | District method |
107
+ | --- | --- | --- | --- |
108
+ | November 5, 2002 | https://sfelections.org/results/20021105/SOV021105.xls | https://webbie1.sfpl.org/multimedia/pdf/elections/November5_2002.pdf | Official workbook `PROPOSITIONS` supervisorial rows; under/overvotes unavailable |
109
+ | November 6, 2012 | https://sfelections.org/results/20121106/data/SOV_Nov2012.xls | https://sfelections.org/results/20121106/index.html and https://webbie1.sfpl.org/multimedia/pdf/elections/November6_2012.pdf | 596 official precincts grouped by DataSF's 2012 `supdist` field |
110
+ | November 8, 2022 | https://www.sfelections.org/results/20221108/data/20221201/dsov.xlsx | https://sfelections.org/results/20221108/index.html | Official final district workbook rows |
111
+
112
+ The 2012 historical precinct-to-district source is
113
+ https://data.sfgov.org/resource/bsfq-aeyw.json?$limit=1000 . Its 605 records
114
+ include 596 election precinct identifiers and the `supdist` attribute; joined
115
+ mail-ballot and slash-combined precinct rows map to one district each. This
116
+ 2012 collection is used only to group the 2012 official vote rows. The
117
+ crosswalk and workbook checksums are retained in the JSON. The 2002 voter
118
+ pamphlet explicitly discusses the bond thresholds; 2012 A and B require
119
+ two-thirds, as established by the parcel tax and bond measures.
120
+
121
+ For 2022, the independent **final** summary workbook is
122
+ https://www.sfelections.org/results/20221108/data/20221201/summary.xlsx and
123
+ the certification is
124
+ https://www.sfelections.org/results/20221108/data/20221201/N2022_CertificationLetter.pdf .
125
+ The election summary HTML has older counts for some measures, so it is used
126
+ only for titles, ballot questions, and the stated thresholds. The importer
127
+ compares every citywide Yes, No, undervote, and overvote count with the final
128
+ summary workbook. The 2002 official results index is
129
+ https://sfelections.org/results/20021105w/index.html and the 2012 results
130
+ index is https://sfelections.org/results/20121106/detail.php .
131
+
132
+ `scripts/import-historical-measures.py` records input SHA-256 hashes and
133
+ reconciles all 2002, 2012, and 2022 district totals. The election JSON files
134
+ are Pages datasets; the historical district maps retain their existing
135
+ display geometry, and no precinct polygons or raw workbook data are shipped.
@@ -108,4 +108,4 @@ Neighborhood overview boundaries use a shared coordinate graph: connected bounda
108
108
 
109
109
  ## Election result snapshots (Pages only)
110
110
 
111
- `elections/2026-06-02.json` holds certified local-measure results for the June 2026 Pages explorer. It contains four measures, citywide counts, and eleven supervisorial district totals per measure, plus source URLs, workbook checksum, and source row references. It is not a GeoJSON collection or a public npm export. It does not change the default SFAR neighborhood dataset. See `SOURCES.md` and `scripts/import-election-results.py` for extraction and validation.
111
+ `elections/catalog.json` indexes four local-measure election snapshots spanning the 2002, 2012, and 2022 district map vintages. Each snapshot provides citywide and all eleven district counts for every local measure in that election. The data is separate from GeoJSON and is not a public npm export. See `elections/README.md` for its schema, coverage, and extraction methods.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kahwee/sf-map-svg",
3
- "version": "1.3.5",
3
+ "version": "1.3.7",
4
4
  "description": "Offline SVG maps of San Francisco with district boundaries, parks, landmarks, and BART stations.",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",