Skip to content

Split mayor periods into actual mandates by election cycle - #1

Merged
chtitux merged 7 commits into
mainfrom
claude/split-mayor-mandates-zxXPo
Mar 26, 2026
Merged

Split mayor periods into actual mandates by election cycle#1
chtitux merged 7 commits into
mainfrom
claude/split-mayor-mandates-zxXPo

Conversation

@chtitux

@chtitux chtitux commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Add scripts to detect and split continuous mayor periods at French municipal
election first-round dates, so each row in mayors_by_city.csv represents one
election-cycle mandate (231 → 580 rows). Add validation to prevent regressions.

https://claude.ai/code/session_01DQapMTMSqpUDJProtEMmcJ

claude and others added 7 commits March 26, 2026 14:17
Add scripts to detect and split continuous mayor periods at French municipal
election first-round dates, so each row in mayors_by_city.csv represents one
election-cycle mandate (231 → 580 rows). Add validation to prevent regressions.

https://claude.ai/code/session_01DQapMTMSqpUDJProtEMmcJ
Group consecutive mandates by the same mayor on a single row with
multiple blocks. Add hover tooltip showing either the specific mandate
or all mandates for the mayor. Use darker stroke borders, no rounding.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ping

- Snap approximate dates (YYYY-01-01, YYYY-MM-01) to nearest election
  round in election years to avoid artificial short segments
- Skip splitting within the same election the mandate starts/ends on
- Pick first or second round based on proximity to mandate boundaries
- Remove pre-1965 Cilaos entries (not actual mayors)
- Relax validator to allow mandates split at either round

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hide 1945 label to avoid overlap with 1947.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chtitux
chtitux merged commit c833534 into main Mar 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants