Inspiration
A citywide average can hide the people most affected by a decision. We built Morph to help teams explore a question before committing to a policy, product, or message—and to see whose perspectives they still need to hear directly.
What it does
Choose San Francisco, New York City, Los Angeles, Chicago, or Miami. Ask a question, run a scenario, and explore a modeled citywide response alongside demographic breakdowns, example reasons, and a reactive pixel-art city. You can also compare messages and keep a timeline of hypothetical events.
Try a question: If San Francisco can only fund one flood protection measure before this El Niño winter, should it clear and repair storm drains in the hardest-hit areas or help residents and small businesses install flood barriers?
In Morph’s A/B simulation with 10,000 synthetic San Francisco residents, 54% chose clearing and repairing storm drains and 46% chose help installing flood barriers. The split is a model estimate for this hypothetical scenario.
How we built it
Morph samples 10,000 synthetic residents from anonymized U.S. Census American Community Survey Public Use Microdata (ACS PUMS). It keeps Census person weights, groups similar residents into archetypes, uses Gemini to model their responses, and combines those responses into a weighted estimate. The API is written in Rust and deployed on Fly.io; the frontend runs on Vercel. Neo4j stores scenario history and hypothetical events.
Challenges we ran into
Groups differ in size. Counting each group equally would distort the citywide result, so we retained the source survey weights when aggregating. We also had to keep model calls practical for a live demo and make it clear that generated responses are hypotheses rather than facts about real residents.
Accomplishments that we're proud of
We built a working end-to-end demo with 10,000 synthetic residents, five selectable cities, demographic breakdowns, a visual city, and persistent scenario history. Two San Francisco election spot checks produced estimates close to published outcomes, but two examples are not enough to establish predictive accuracy.
What we learned
Even a plausible citywide number can conceal important differences across groups. Morph is most useful for generating follow-up questions and identifying where real community input is needed.
What's next for Morph
Test against more real survey and election outcomes, publish error measurements by city and question type, and explain uncertainty more clearly. We also want users to inspect the source data and assumptions behind each result.
Data, AI, and credits
Demographic source: U.S. Census Bureau ACS PUMS. Gemini models hypothetical responses; OpenAI Codex assisted with implementation, debugging, and deployment. Pixel-art credits: LimeZu Modern Exteriors and @route1rodent character sprites; license details are in the repository credits. Morph's synthetic residents are not real people, and results should not replace surveys or public consultation.