Previously, components 1-2 in the SVD tab used Procrustes-aligned PCA
coordinates (from load_positions), which meant the SVD tab showed PCA
dimensions of the 50D aligned space rather than the actual raw SVD
components. This was a fundamental inconsistency — the SVD tab's component 2
showed completely different party ordering than the raw SVD component 2.
Changes:
- explorer.py: Unified all components 1-10 to use raw SVD values via
load_party_axis_scores_for_window(). Removed the separate
load_positions() path for components 1-2. Now all components use the
same data source (50D vectors from svd_vectors table).
- explorer.py: Updated flip computation to cover ALL components 1-10
(was range 3-11 for components 3-10 only). The compute_flip_direction
function correctly determines sign for each component.
- explorer.py: Unified rendering to always use _render_party_axis_chart_1d
(was _render_party_axis_chart for components 1-2 using 2D coords).
- explorer.py: Unified trajectory to always use load_party_scores_all_windows.
- analysis/config.py: Updated component 1 label (simplified explanation,
removed coalition-specific policy references).
- analysis/config.py: Updated component 2 label to "Nationalistisch versus
kosmopolitisch" matching raw SVD data (PVV/FVD at positive extreme,
Volt/DENK/GL-PvdA at negative extreme).
- tests: Updated test assertions to match new labels.
- scripts/validate_svd_themes.py: Verified all components pass right-wing
alignment check, config flip consistency, and theme pole consistency.
Fixes the core inconsistency: SVD tab component 2 now uses the same raw
SVD data as components 3-10, with consistent party ordering and labels.
The compass remains a separate PCA-based visualization.
A small project that uses QWEN embeddings for semantic features. The codebase includes an example Ansible package under packages/@ansible/example and helper scripts for deployment.
Embeddings
This project uses QWEN embeddings (model: qwen/qwen3-embedding-4b) via OpenRouter-compatible APIs.
Preferred environment variable: OPENROUTER_API_KEY with a fallback to OPENAI_API_KEY.
Publishing and deploying the Ansible package
Package location: packages/@ansible/example — this contains the Ansible playbooks and packaging used by CI.
To publish the package (CI): create a git tag for the version and provide NPM_TOKEN as a secret to the CI runner so it can publish to npm.
To deploy the package (CI): set the following repository secrets in your CI pipeline:
DEPLOY_HOST (default: motief.sgeboers.nl)
DEPLOY_SSH_KEY (private key for the webapps user)
DEPLOY_USER (default: webapps)
Defaults
DEPLOY_HOST: motief.sgeboers.nl
DEPLOY_USER: webapps
See docs/deployment/ansible-package-deploy.md for more detailed deploy instructions and defaults.