fix(right-wing): update DB with latest motions, fix DROP TABLE bug, score all missing 2D

- Fetched 276 new motions from Tweede Kamer API (2026-04-23 to 2026-05-31)
- Fixed classify_motions.py: DROP TABLE → CREATE TABLE IF NOT EXISTS
- Restored derived columns (centrist_support_strict, category, etc.) via migration
- Scored 180 missing motions in extremity_scores_2d (now 3,049 total, 0 missing)
- Re-ran temporal trajectory with updated data (inflection: 2024-Q2)
This commit is contained in:
2026-05-31 22:21:35 +02:00
parent 2d5b28fe1b
commit 364c312076
4 changed files with 120 additions and 34 deletions
+2 -3
View File
@@ -130,11 +130,10 @@ def classify_motions(
con = duckdb.connect(str(db))
try:
# Create output table
con.execute("DROP TABLE IF EXISTS right_wing_motions")
# Create output table (idempotent — does not drop existing columns)
con.execute(
"""
CREATE TABLE right_wing_motions (
CREATE TABLE IF NOT EXISTS right_wing_motions (
motion_id INTEGER PRIMARY KEY,
year INTEGER,
title VARCHAR,