Vishal Shelar
Project

ADHD Data Explorer

An interactive explorer of public ADHD data, with an AI chat limited to the data on screen.

Python · Streamlit · Plotly · Claude API

The problem

Public ADHD data is scattered across very different sources, from national survey statistics to clinical datasets and raw EEG signals. It's also a sensitive subject, where a confident wrong answer from a chatbot could do real harm.

So this project has two jobs: make the data easy to explore, and put an AI chat on top of it that stays within what the data actually says.

This is an educational tool. It isn't diagnostic and shouldn't be used to draw clinical conclusions.

What's in it

TabDataNeeds
Prevalence & DemographicsCDC / NSCH statistics, plus a state map from America's Health RankingsNothing, it's built in
Adult Health & ActivityHYPERAKTIV: clinical scales, wrist activity, and attention testsA Kaggle download or synthetic data
EEG SignalsRaw EEG channels from children with and without ADHDA Kaggle download or synthetic data
Chat with the DataWhatever is currently loadedAn Anthropic API key

Keeping the AI in bounds

The chat has two kinds of guardrail.

Instructions. The system prompt tells Claude to answer only from the loaded data and glossary, to make no clinical or diagnostic claims, and to say so plainly when the data doesn't contain the answer.

Code. Claude can draw charts, but only by calling a single show_chart tool that takes a data source and a metric. It can't run arbitrary code, and the app rejects any metric it doesn't recognize. A hallucinated column name returns an error, not an invented chart.

The second kind is stronger because it doesn't rely on the model's cooperation. I used the same principle later for the approval step in ArchAgent.

Being honest about the data

Small details make a data tool trustworthy or not, so I paid attention to a few:

  • Synthetic data is labeled. Demo data keeps the tabs usable before any upload, and it's never presented as real patient data.
  • Similar measures are kept apart. The state map shows treatment among all children, while a nearby chart shows treatment among diagnosed children. The app calls out the difference so they aren't confused.
  • Charts are accessible. They use a colorblind-safe palette in both light and dark mode.
  • The data is available. Every tab lets you download the data behind its charts as CSV.

Limits

  • The grounding is untested. The chat's boundaries come from the prompt, and there's no evaluation set measuring how well they hold.
  • Key datasets need a manual step. The clinical and EEG tabs depend on a Kaggle download or synthetic data, so a first-time visitor has to load one of them before those tabs show anything.