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:
+9
-5
@@ -206,13 +206,13 @@ def load_party_map(db_path: str) -> Dict[str, str]:
|
|||||||
|
|
||||||
@st.cache_data(show_spinner="Partijposities op SVD-assen laden…")
|
@st.cache_data(show_spinner="Partijposities op SVD-assen laden…")
|
||||||
def load_party_axis_scores(db_path: str) -> Dict[str, List[float]]:
|
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.
|
AND entity_id is a known current-parliament party.
|
||||||
|
|
||||||
Returns:
|
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).
|
Duplicate rows for the same party are de-duplicated (last row wins).
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
@@ -221,7 +221,7 @@ def load_party_axis_scores(db_path: str) -> Dict[str, List[float]]:
|
|||||||
placeholders = ", ".join("?" for _ in party_list)
|
placeholders = ", ".join("?" for _ in party_list)
|
||||||
rows = con.execute(
|
rows = con.execute(
|
||||||
f"SELECT entity_id, vector FROM svd_vectors "
|
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})",
|
f"AND entity_id IN ({placeholders})",
|
||||||
party_list,
|
party_list,
|
||||||
).fetchall()
|
).fetchall()
|
||||||
@@ -828,7 +828,11 @@ def build_svd_components_tab(db_path: str) -> None:
|
|||||||
"discriminatieregels. De uitzonderlijk grote scoremagnitudes (±11,7) duiden op een "
|
"discriminatieregels. De uitzonderlijk grote scoremagnitudes (±11,7) duiden op een "
|
||||||
"bijzonder scherpe polarisatie, waarbij links-progressieve en christelijk-sociale partijen "
|
"bijzonder scherpe polarisatie, waarbij links-progressieve en christelijk-sociale partijen "
|
||||||
"(SP, D66, GL, DENK, CU, PvdA, CDA, NSC) tegenover rechts-nationalistisch georiënteerde "
|
"(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",
|
"positive_pole": "Internationale solidariteit, inclusie en pragmatische overheidsinterventie",
|
||||||
"negative_pole": "Strikte handhaving, deregulering en nationalistisch eigenbelang boven humanitaire verplichtingen",
|
"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