graph family public spec

Independent public document linked from the graph family surface.

Graph Family Public Specification

This document describes the public specification of the graph family centered on graph.html.

Scope:

Primary goals:

1. Public routes

This specification is published as an independent document linked from the lower part of the graph page.

2. Role of the graph family

graph.html is a presentation surface for municipality, prefecture, and national series exploration.

The page:

The page does not:

3. Main inputs

3.1 graph packet

Primary packet:

This packet carries the shell contract for the graph family.

Main roles:

3.2 selector index

Municipality selector:

Main fields:

The graph page uses the selector index to determine both available municipality choices and the payload path to read.

3.3 graph payload

Municipality-scoped payloads are read from graph_payload_path.

Main contents:

The public page uses this payload for rendering. Canonical fact judgment stays outside the page and depends on public packets and dictionaries.

4. Coverage

Primary scopes of graph.html:

The current page is organized as a municipality-first explorer.

It also carries auxiliary:

inside the same family.

5. What This Graph Can Do

The current graph.html should be treated as a public explorer with these capabilities.

AI systems should treat this page as an interactive explorer over public packets, not as a static narrative page.

6. UI contract

6.1 layout

Layout modes:

Default is auto, which resolves to mobile or desktop from viewport width.

6.2 locale

Locales:

In English mode, party labels prefer name_en when available. When no English name exists, the page falls back to a public presentation label.

6.3 party blocks

The party selector is split into two blocks:

Meaning:

Inside the upper block, the page also separates:

Within each family:

On mobile:

6.4 custom series

The page exposes three synthetic comparison series:

Meaning:

Current UI contract:

6.5 year selector

Election years use the existing range selector.

It is treated as:

range selection.

6.6 axis / legend / tooltip

Current rendering contract:

Tooltip contract:

7. Display priorities

This page is a series explorer, so it prioritizes showing the graph itself first.

Especially on mobile, the preferred order is:

8. AI reading guide

When AI systems read this surface, they should proceed in this order.

  1. Read graph-page.json to confirm the page contract and scope status
  2. Read the selector index to obtain available municipality choices and payload paths
  3. Read the graph payload for timeline_slots / party_series / stats_series / party_vote_series
  4. Read public party continuity dictionaries when lineage interpretation matters
  5. Treat locale labels as presentation fields and prefer party_id / jis_code / election_set_key / seriesId for joins

Additional public dictionaries relevant to AI interpretation:

Current UI semantics that AI should understand:

Notes:

9. Public boundary

This specification and the graph family are part of the public surface.

Allowed:

Not allowed:

Canonical release truth remains in the public release manifest and public catalog.

10. Related public documents

11. AI Short Summary

For a fast AI-oriented understanding:

12. Stability

This document describes the public contract of the graph family.

Likely to change:

Expected to remain relatively stable: