# prefecture-series / party-votes / 都道府県系列 政党得票

This dataset stores prefecture-level party-vote rows as selector-oriented derived extraction CSV.  
この dataset は、都道府県単位の政党得票 row を selector-oriented な derived extraction CSV として保存します。

## Boundary / 境界

- this is not canonical fact storage  
  これは canonical fact storage ではありません
- source of truth remains Layer 2 release facts and release manifests  
  正本は Layer 2 release facts と release manifests に残ります
- this dataset is a deterministic rearrangement for prefecture-centric lookup  
  この dataset は prefecture-centric lookup のための deterministic rearrangement です
- this dataset is not a graph payload and not a semantic aggregate packet  
  この dataset は graph payload でも semantic aggregate packet でもありません

## Selector and row grain / selector と row grain

- family: `prefecture-series`
- dataset: `party-votes`
- primary selector field: `prefecture_code`
- selector shard directory: `by-prefecture`
- row grain: `prefecture_code x election_key x party_id`

## Important semantics rules / 重要な semantic 規則

- `vote_system` remains row-level authority and must not be dropped  
  `vote_system` は row-level authority なので落としてはいけません
- this dataset may contain `block`, `pr`, `smd`, and `multi` rows together  
  この dataset には `block`, `pr`, `smd`, `multi` が混在し得ます
- this dataset does not itself define `proportional` or `constituency` series  
  この dataset 自体は `proportional` や `constituency` の series を定義しません

## Files in this directory / このディレクトリのファイル

- `current.yaml`: contract and latest metadata for this dataset  
  この dataset の contract と latest metadata
- `latest/nationwide.csv`: stable convenience table for the whole dataset  
  dataset 全体の stable convenience table
- `latest/by-prefecture/<prefecture_code>.csv`: one selector shard  
  1 selector 分の shard CSV
- `releases/<source_release_version>/...`: release-scoped materialization snapshot  
  release 単位の materialization snapshot

## `current.yaml` keys / `current.yaml` の主要キー

| key | meaning / 意味 |
|---|---|
| `dataset_id` | fixed dataset contract id / 固定の dataset 契約 ID |
| `family` | extraction family name / extraction family 名 |
| `dataset` | dataset name within the family / family 内 dataset 名 |
| `source_release_version` | Layer 2 release version used to build this snapshot / この snapshot の build 元になった Layer 2 release version |
| `source_layer` | upstream layer authority / 上流 authority layer |
| `primary_selector_field` | shard key field / shard の主キー列 |
| `primary_selector_index_dir` | directory name used for shard files / shard ファイルに使う directory 名 |
| `row_grain` | one-row meaning / 1 row の意味 |
| `built_at` | UTC build timestamp / UTC build 時刻 |
| `notes` | dataset-specific contract note / dataset 固有の契約メモ |
| `source_election_set_keys` | election sets included in the build / build に含めた election set 一覧 |
| `files` | latest/release nationwide artifact metadata / latest/release artifact metadata |
| `summary` | selector count and shard summary / selector 件数と shard 要約 |

## CSV columns / CSV 列定義

| column | meaning / 意味 |
|---|---|
| `election_set_key` | election-set id such as `20260208_hr` / `20260208_hr` のような election-set id |
| `election_key` | component-level election id / component 単位の election id |
| `election_date` | election date in `YYYY-MM-DD` / `YYYY-MM-DD` の election date |
| `election_type` | election type such as `hr`, `hc` / `hr`, `hc` などの election type |
| `vote_system` | vote system such as `smd`, `block`, `multi`, `pr` / `smd`, `block`, `multi`, `pr` などの vote system |
| `prefecture_code` | two-digit prefecture code / 2 桁の prefecture code |
| `prefecture_name` | prefecture display name / prefecture の表示名 |
| `pr_block` | proportional block label when present / 比例 block 表示名がある場合の値 |
| `party_id` | normalized party id / 正規化済み party id |
| `votes` | votes for that party in that row grain / その row grain における当該 party の票数 |
| `valid_votes` | valid votes for the same prefecture/election row, when available / 同一 prefecture・同一 election row の valid votes |
| `vote_share_pct_prefecture` | party vote share within the prefecture row, when available / 都道府県 row 内での得票率 |

## Notes / 注意

- blank numeric fields mean the upstream Layer 2 fact did not expose a stable value for this row  
  空の数値列は upstream Layer 2 fact に stable な値がなかったことを意味します
- `party_id` alone must not be treated as a mixed-component trend series  
  `party_id` 単独を mixed-component trend series とみなしてはいけません
- if you need `proportional` or `constituency`, build those semantics downstream with explicit `component_family`  
  `proportional` や `constituency` が必要なら、downstream で `component_family` を明示して組みます
