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.
This commit is contained in:
+8
-4
@@ -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()
|
||||
@@ -829,6 +829,10 @@ def build_svd_components_tab(db_path: str) -> None:
|
||||
"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. "
|
||||
"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
Reference in New Issue
Block a user