Opinion Visualization with Annotated Labels — an experimental tool for visualizing public opinion data.
Users upload CSV files of comments and vote matrices (or a single h5ad file), annotate representative comments on a scale, and the system uses PCA + linear regression to score and visualize all comments along user-defined dimensions.
Data shown from pol.is/report/r7cwmiaxczyj8te9rzdmx — exported via valency-anndata Streamlit app
make install # Install frontend and backend dependencies
make dev # Start both dev serversThe frontend runs at http://localhost:5173 and the backend at http://localhost:8000.
make install Install all dependencies
make dev Start both frontend and backend dev servers
make build Build frontend for production
make lint Lint frontend code
Upload two files:
- Comments CSV — must contain
comment-idandcomment-bodycolumns - Votes matrix CSV — must contain a
participantcolumn, with remaining columns as comment IDs and values as votes
Upload a single .h5ad file following the valency-anndata data model:
.X— votes matrix (participants x statements), values{-1, +1, NaN}.var['content']— statement/comment text
The h5ad file is parsed client-side and converted to the CSV format automatically. You can generate h5ad files from Pol.is report URLs using the valency-anndata export app.
demo/oval/— React/TypeScript frontend (Vite + Tailwind CSS)server/— FastAPI backend (PCA, regression, scoring)data/— Runtime data directory (gitignored)
See CLAUDE.md for detailed architecture documentation.