Commit Graph
20 Commits
Author SHA1 Message Date
sgeboers 414c16ae9e refactor: extract data loading and trajectory logic from explorer.py
- Move trajectory analysis to analysis/trajectory.py (+136 lines)
- Move projection helpers to analysis/projections.py (+128 lines)
- Extract tab-specific data loaders to analysis/tabs/ (8 modules, +133 lines)
- Remove 702 lines from explorer.py (data loading extracted to
  analysis/explorer_data.py and new modules)
- Add axis label fallback tests (tests/test_axis_label_fallback.py)
- Add session docs: brainstorms, ideation, plans, and test-failures
2026-04-05 00:51:30 +02:00
sgeboers 154762a4c8 docs: refresh 2 stale references in solutions docs
- refactoring-streamlit-data-loading.md: update test count
  164/164 → 173/173 (7 new axis validation tests added)
- svd-component-labels-mismatch.md: SVD_THEMES moved from
  explorer.py:434-611 → analysis/config.py:67+ per the
  refactoring that extracted constants to analysis/config.py
2026-04-05 00:46:57 +02:00
sgeboers 5afbad11ad feat: add right-wing party axis validation
- Add CANONICAL_RIGHT (PVV, FVD, JA21, SGP) and CANONICAL_LEFT frozensets
  to analysis/config.py as the canonical source of truth
- Update analysis/svd_labels.py to import from config; re-export as
  RIGHT_PARTIES/LEFT_PARTIES for backward compatibility
- Add build_window_party_scores helper to analysis/explorer_data.py
- Add 7 integration tests in tests/test_axis_political_orientation.py
  validating that canonical right parties appear on the right side of SVD
  axes (x=component 1, y=component 2) using real DuckDB data
2026-04-05 00:42:46 +02:00
sgeboers 805cc7e284 docs: add session ledger files and logic-errors docs 2026-04-04 18:47:05 +02:00
sgeboers 1dbf8da3a2 docs: move active plan to docs/plans/ 2026-04-04 18:47:01 +02:00
sgeboers 0308d20f12 docs: add AGENTS.md with docs/solutions reference and SVD label best practice
- Add AGENTS.md with documented solutions reference
- Include SVD label convention (right-wing parties on right side)
- Document SVD insight: labels reflect voting patterns, not semantics
- Fix SQL verification example to use Python approach
2026-04-04 18:36:05 +02:00
sgeboers 5f7126f53f docs: add voting discipline analysis
Explain Rice index methodology and what it reveals about Dutch political parties
2026-04-02 21:47:08 +02:00
sgeboers a1c3e92fab docs: add SVD label unification implementation plan 2026-04-02 20:45:44 +02:00
sgeboers bed776f295 docs: add SVD label unification design spec 2026-04-02 20:40:56 +02:00
sgeboers 93a2287c04 docs: add motion-driven axis labeling implementation plan 2026-03-29 14:36:28 +02:00
sgeboers 9dcf6201bb Add design spec for motion-driven axis labeling
Replaces static ideology CSV as primary axis classification signal with
per-year motion projection + Dutch keyword classifier. Adds axis-swap
logic so left-right is conventionally on X when present. Adds Option C
UI expander showing top motions per axis pole.
2026-03-29 14:19:54 +02:00
sgeboers 23849c9cb6 docs: add axis classification implementation plan 2026-03-29 00:58:53 +01:00
sgeboers 6b811364c5 docs: add deployment note to axis classification spec
CSV files committed to git, baked into Docker image — no rsync needed.
2026-03-29 00:53:54 +01:00
sgeboers bb5f2961d1 docs: fix two spec ambiguities in axis classification design
- Clarify CSV path derivation from db_path (same data/ directory)
- Handle current_parliament window exclusion from modal label voting
2026-03-29 00:52:11 +01:00
sgeboers bed911b92c docs: add axis classification design spec
Add design for honest PCA axis labeling — validates each compass axis
against a party ideology reference CSV and labels dynamically (Links–Rechts,
Coalitie–Oppositie, or fallback) instead of hardcoding Left–Right always.
2026-03-29 00:51:34 +01:00
sgeboers 6914b2284a Add implementation plan for compass UI improvements 2026-03-28 23:33:03 +01:00
sgeboers 445f0bfb24 feat(ansible-example): add @ansible/example package, tests, CI, publish & deploy workflows, docs and changelog 2026-03-28 20:00:31 +01:00
sgeboers 521385c832 docs: add SVD tab redesign implementation plan 2026-03-24 23:52:54 +01:00
sgeboers 8c79aaf917 docs: add SVD tab redesign spec 2026-03-24 23:50:40 +01:00
sgeboers a36e6cba4e feat(pipeline): implement parliamentary embedding pipeline MVP
- Add 4 migration files: mp_votes, mp_metadata, svd_vectors, fused_embeddings
- Extend database.py with 5 new helper methods and table init
- Add pipeline/ package: extract_mp_votes, fetch_mp_metadata, text_pipeline,
  svd_pipeline (with Procrustes alignment), fusion
- Add full test suite (17 tests) covering all pipeline modules and migrations
- Fix Procrustes alignment bug: scipy scale is a norm value, not a multiplier
- Fix DuckDB date type handling in test assertions (datetime.date vs string)
- Remove duckdb.py shim; tests now run against real duckdb + scipy via uv

Ref: thoughts/shared/plans/2026-03-21-parliamentary-embedding-pipeline-plan.md
2026-03-21 22:31:22 +01:00