Sven Geboers
|
a3154f72df
|
refactor: extract shared helpers to common.py, fix bugs, add TDD tests
- Created analysis/right_wing/common.py with all shared helpers:
Constants: CANONICAL_CENTRIST, COALITION, BREAK_YEAR, etc.
Functions: _conn, cohens_d, build_party_name_map, parse_lead_submitter,
motion_passed, quarter_sort_key, find_inflection_point
- Fixed bugs:
1. ai_provider.py: requests.Timeout now caught alongside ConnectionError
2. voting_margin.py: Removed walrus operator misuse, fixed Mann-Whitney test
- Updated 13 consuming files to import from common.py
- Added 35 TDD tests in tests/right_wing/test_common.py
- 282 tests pass (was 247)
|
3 weeks ago |
Sven Geboers
|
711a410df3
|
chore: simplify Overton scripts, update README, add stemwijzer.db to gitignore
- Extracted EXTREMITY_BUCKET_ORDER constant and _extremity_bucket() helper (4 duplications removed)
- Merged two-pass query loop in compute_yearly_baseline into single pass
- Removed unused import (mticker), dead code (year_titles_map), 12 obvious comments
- Extracted _fmt_axis() helper in SVD drift script
- Updated README analysis/ description to include right-wing motion analysis
|
4 weeks ago |
Sven Geboers
|
e478235c84
|
fix(overton): correct SVD axis interpretation, drop pass rate, synthesis rewrite
- SVD axis 2 sign corrected: negative = nationalist (PVV -0.56, FVD -0.36), positive = kosmopolitisch (Volt +0.27). Centrists moved LEFT on both axes while right-wing moved further right culturally (+0.146 gap). 'Acceptance without conversion' named as unifying interpretation.
- U1: Figure 1 merged to single panel, pass rate removed, 5 centrist_support lines
- U2: Pass rate columns dropped from all breakpoint tables, PR narrative cut
- U3: Findings report rewritten: SVD section replaced, synthesis restructured into 3 tiers, extremity LLM bias qualified
- U4: Axis labels and sign convention added to svd_stability_report.md
- Added centrist_support_mp column (MP-weighted, correlates 0.998 with party-level)
|
1 month ago |