跳到正文
FunCoding

census-data

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.

Star
962
分类
数据
许可证
MIT
最近提交
2026年10月8日

skills/census-data/SKILL.md

在 GitHub 上查看

US Census Data Skill

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

When to Use

  • "What's the population of Texas?"
  • "Show demographic breakdown by county"
  • "Get median household income for California"
  • "Compare poverty rates across states"

When NOT to Use

  • Non-US data (use world-bank-data)
  • Real-time economic data (use financial APIs)
  • Historical pre-1790 data

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

VariableDescription
B01001_001ETotal population
B19013_001EMedian household income
B17001_002EPopulation below poverty
B25077_001EMedian home value
B15003_022EBachelor's degree holders
B02001_002EWhite alone population

Notes

  • Free API key required for most queries
  • ACS 5-year estimates are most reliable for small geographies
  • FIPS codes identify states (e.g., 06=CA, 36=NY, 48=TX)
  • Rate limit: 500 requests/day without key, more with key
  • Variables list: https://api.census.gov/data/2022/acs/acs5/variables.html

相似的 Skill

agentic-os

AFaffaan-m/ECC278k近 7 天新增 4,046 个 star

health

GAgarrytan/gstack136k近 7 天新增 883 个 star

deprecation-and-migration

ADaddyosmani/agent-skills106k近 7 天新增 3,628 个 star

官方

flowai-live-dashboard-template

NEnexu-io/open-design101k近 7 天新增 1,126 个 star

官方

dashboard

NEnexu-io/open-design101k近 7 天新增 1,126 个 star

cloud-sync

THthedotmack/claude-mem100k近 7 天新增 3,024 个 star