CoolFace
Apppublic

arrowassassin/census-iq

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes
App README

Census IQ

A chat agent that answers natural-language questions about the US population, grounded in the SafeGraph US Open Census dataset (ACS 5-year estimates at census block-group level) on Snowflake Marketplace.

Every figure comes from SQL that is shown to you. Open Show work under any answer to see the exact statement that produced it, the row count, how long it took, and to download the rows as CSV.

What it does

  • Answers questions about income, housing, commuting, education, language, and demographics, at national, state, and county level.
  • Renders results as charts and stat cards rather than walls of numbers.
  • Deep analysis mode plans several queries and writes a short report.
  • Audit trail (link in the sidebar) shows every SQL statement and tool call the agent ran, on a hash chain, so the record cannot be quietly edited.

What it will not do

It answers from the census dataset only. Questions outside it — other countries, future projections, individual records — get a plain "I can't answer that from this data" rather than a guess. Aggregate medians are labelled as approximations, because a median cannot be summed across block groups.

The generated SQL is checked by a deterministic layer before it runs: identifiers are resolved against a cached INFORMATION_SCHEMA, only single read-only SELECT statements against allow-listed census tables are permitted, and a row cap is enforced.

Access

This UI talks to a separate backend Space. If the header shows API offline, the backend is asleep or unreachable — the first request after an idle period wakes it and can take a little longer than usual.

Source, architecture notes, and the written reflection: https://github.com/arrowassassin/census-chatbot