# graph / municipality-proportional-swing-2025-2026

This derived-shape dataset stores graph-ready shards for municipality-level
proportional party swing from 2025 to 2026.

## Boundary

- This is not canonical fact storage.
- The input is `derived/extraction/municipality-series/proportional-party-comparison-2025-2026`.
- The graph shape is a UI contract layer, not a reusable tidy extraction table.
- Browser code reads one prebuilt nationwide `party_id` shard at prefecture
  aggregate grain, one `prefecture_code x party_id` shard at municipality grain,
  or one prebuilt `party_id x ranking_id` municipality-ranking shard and does
  not rebuild comparison rows.
- The municipality choropleth map reads a separate view-layer geometry shape
  dataset and joins it to this graph shape by `jis_code`; geometry is not a
  canonical election fact.
- Locale and layout are presentation-layer concerns. English-facing party labels
  are copied from `party_master.csv:name_en`; municipality and prefecture names
  remain canonical Japanese display labels in this graph shape.

## Selector and Row Grain

- family: `graph`
- dataset: `municipality-proportional-swing-2025-2026`
- selector fields: `prefecture_code`, `party_id`, optional `ranking_id`
- party selector scope: parties present on the 2026-02-08 target side plus
  documented graph-only comparison blocs
- row grain inside each shard:
  - nationwide: `party_id x prefecture_code`
  - prefecture: `prefecture_code x party_id x jis_code`
  - ranking: `party_id x ranking_id x jis_code`
- nationwide mode is a prefecture aggregate list for the selected party/bloc; it
  is distinct from `top50` / `worst50`.
- ranking modes: `top50`, `worst50` are nationwide municipality rankings by
  `votes_change_rate_pct`; these override the prefecture selector in the UI.
- mobile layout is a view mode over the same payloads, not a different data grain.

## Graph Metric

- primary metric: `votes_change_rate_pct`
- center line: zero percent change against the 2025 party vote baseline
- negative values render left, positive values render right
- secondary metric: `votes_delta`
- pilot-specific shortcut: `CDR_TJU` / 中道+ゆうこく compares
  `2025 KMT + CDP` against `2026 CDR + TJU`
- standalone `CDR` and `TJU` are excluded from this graph because candidate-level
  apportionment of 2025 `CDP` votes is not available in canonical facts

## Files

- `current.yaml`: contract and latest metadata
- `latest/catalog.json`: prefecture and party selector catalog
- `latest/by-party/<party_id>.json`: one nationwide graph shard
- `latest/by-prefecture-party/<prefecture_code>/<party_id>.json`: one graph shard
- `latest/by-party-ranking/<party_id>/<ranking_id>.json`: one nationwide ranking shard
- `releases/<source_release_version>/...`: release-scoped mirror

Map geometry for the route is supplied by
`derived/shape/geo/municipality-boundary-geoshape-2020` and mirrored under
`/analysis/municipality-proportional-swing/latest/geo/`.

The route/page packet is mirrored for the page runtime under
`/analysis/municipality-proportional-swing/latest/graph-page.json`.
It is not part of this derived-shape dataset's public catalog contract.
