Skip to content

opinion visualization with annotated lines

License

Notifications You must be signed in to change notification settings

patcon/oval

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OVAL

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.

Screenshot of OVAL Data shown from pol.is/report/r7cwmiaxczyj8te9rzdmx — exported via valency-anndata Streamlit app

Prerequisites

Quickstart

make install   # Install frontend and backend dependencies
make dev       # Start both dev servers

The frontend runs at http://localhost:5173 and the backend at http://localhost:8000.

Available Commands

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

Data Formats

CSV (Pol.is export)

Upload two files:

  • Comments CSV — must contain comment-id and comment-body columns
  • Votes matrix CSV — must contain a participant column, with remaining columns as comment IDs and values as votes

h5ad (AnnData)

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.

Architecture

  • 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.

About

opinion visualization with annotated lines

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages

  • Python 94.1%
  • Makefile 5.9%