Census data

From beita6969/ScienceClaw · View interactive version

Census data is an AI agent skill from the GitHub repository beita6969/ScienceClaw. US Census Bureau data via API. Use when: user asks about US demographics, population, housing, or economic data by geography. NOT for: non-US data or real-time statistics.

How to use this skill

Skill file

US Census Data Skill

Query the US Census Bureau API for demographics, population, and economic data.

When to Use

When NOT to Use

Setup

Get a free API key at https://api.census.gov/data/key_signup.html

export CENSUS_API_KEY=your_key_here

API Base

https://api.census.gov/data/

Common Commands

ACS 5-Year Estimates (Most Used)

# Total population by state
curl -s "https://api.census.gov/data/2022/acs/acs5?get=NAME,B01001_001E&for=state:*&key=$CENSUS_API_KEY"

# Median household income by state
curl -s "https://api.census.gov/data/2022/acs/acs5?get=NAME,B19013_001E&for=state:*&key=$CENSUS_API_KEY"

# Population by county in California (state FIPS=06)
curl -s "https://api.census.gov/data/2022/acs/acs5?get=NAME,B01001_001E&for=county:*&in=state:06&key=$CENSUS_API_KEY"

# Poverty rate by state
curl -s "https://api.census.gov/data/2022/acs/acs5?get=NAME,B17001_001E,B17001_002E&for=state:*&key=$CENSUS_API_KEY"

Decennial Census

# 2020 total population by state
curl -s "https://api.census.gov/data/2020/dec/pl?get=NAME,P1_001N&for=state:*&key=$CENSUS_API_KEY"

Common Variables

| Variable | Description |

|----------|-------------|

| B01001_001E | Total population |

| B19013_001E | Median household income |

| B17001_002E | Population below poverty |

| B25077_001E | Median home value |

| B15003_022E | Bachelor's degree holders |

| B02001_002E | White alone population |

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.