feat: recompute SVD for full current parliament (2023-11-22 to 2026-03-17)

Adds new SVD window 'current_parliament' covering 8732 motions and 451 MPs
(vs 7424 motions in old '2025' window, adding ~1300 motions from 2025-Q4+).
Updates explorer.py to query the new window. Regenerates top_svd_top_motions.json.
Also clarifies axis 3 explanation noting FVD's anti-American positioning.
main
Sven Geboers 1 month ago
parent 9daa899885
commit 867fcd1989
  1. 14
      explorer.py
  2. 964
      thoughts/explorer/top_svd_top_motions.json

@ -206,13 +206,13 @@ def load_party_map(db_path: str) -> Dict[str, str]:
@st.cache_data(show_spinner="Partijposities op SVD-assen laden…")
def load_party_axis_scores(db_path: str) -> Dict[str, List[float]]:
"""Return per-party SVD vectors for window='2025'.
"""Return per-party SVD vectors for window='current_parliament'.
Queries svd_vectors WHERE entity_type='mp' AND window_id='2025'
Queries svd_vectors WHERE entity_type='mp' AND window_id='current_parliament'
AND entity_id is a known current-parliament party.
Returns:
{party_name: [float * k]} k = 50 for the canonical 2025 window.
{party_name: [float * k]} k = 50 for the canonical current_parliament window.
Duplicate rows for the same party are de-duplicated (last row wins).
"""
try:
@ -221,7 +221,7 @@ def load_party_axis_scores(db_path: str) -> Dict[str, List[float]]:
placeholders = ", ".join("?" for _ in party_list)
rows = con.execute(
f"SELECT entity_id, vector FROM svd_vectors "
f"WHERE entity_type='mp' AND window_id='2025' "
f"WHERE entity_type='mp' AND window_id='current_parliament' "
f"AND entity_id IN ({placeholders})",
party_list,
).fetchall()
@ -828,7 +828,11 @@ def build_svd_components_tab(db_path: str) -> None:
"discriminatieregels. De uitzonderlijk grote scoremagnitudes (±11,7) duiden op een "
"bijzonder scherpe polarisatie, waarbij links-progressieve en christelijk-sociale partijen "
"(SP, D66, GL, DENK, CU, PvdA, CDA, NSC) tegenover rechts-nationalistisch georiënteerde "
"partijen (PVV, BBB, VVD-rechtsflank, JA21) staan."
"partijen (PVV, BBB, VVD-rechtsflank, JA21) staan. "
"Opvallend: FVD scoort ook aan de solidariteitskant, niet vanuit humanitaire overtuiging "
"maar vanwege hun anti-Amerikaans/pro-Russisch buitenlandbeleid — zij stemden vóór "
"opheffing van Amerikaanse sancties tegen Syrië om dezelfde reden als DENK en SP, "
"maar vanuit een heel andere politieke logica."
),
"positive_pole": "Internationale solidariteit, inclusie en pragmatische overheidsinterventie",
"negative_pole": "Strikte handhaving, deregulering en nationalistisch eigenbelang boven humanitaire verplichtingen",

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save