stats step 3: elections, party positions and opinion feeds (schema, collectors, timers); world-opinions data moved into stats.wo_*
All checks were successful
Deploy production / deploy (push) Successful in 1m12s

This commit is contained in:
2026-10-25 22:16:25 +00:00
parent 030f3c08ee
commit 42c9351ebd
37 changed files with 75721 additions and 892 deletions

View File

@@ -0,0 +1,14 @@
# Convert V-Dem's vparty.RData to CSV on stdout (selected columns only). Run with the stats
# Python venv (pyreadr + pandas): ~/.local/share/stats-py/bin/python vparty-csv.py file.RData
import sys
import pyreadr
COLS = [
"v2paid", "pf_party_id", "CHES_ID", "country_text_id", "year", "v2paenname", "v2pashname",
"v2pavote", "v2paseatshare", "v2xpa_popul", "v2xpa_antiplural", "v2pariglef", "v2paimmig",
"v2palgbt", "v2parelig", "v2pawelf", "v2paculsup",
]
frames = pyreadr.read_r(sys.argv[1])
df = next(iter(frames.values()))
df[[c for c in COLS if c in df.columns]].to_csv(sys.stdout, index=False)