美國人口普查 有效地理層級 (state/county/tract)
us_get_geography_list
台灣專屬MIT
**關鍵字 / Keywords**: 美國人口普查 地理 層級 州 郡 區 州碼 郡碼 tract block group FIPS GEOID geography level state county census tract block group hierarchy
Scope: US Census Bureau · api.census.gov geography hierarchy.
List the geography levels valid for one dataset — state, county,
county subdivision, place, tract, block group, ZCTA, congressional
district, etc. Also tells you which parent levels a child requires
(e.g. tract requires state+county in the `in_geo` param).
Endpoint:
https://api.census.gov/data/{year}/{dataset}/geography.json
Args:
year: vintage year (e.g. 2022, "2020").
dataset: dataset path — "acs/acs5", "dec/pl", ...
Returns dict with `geographies` — each entry has `name`
(e.g. "state"), `geo_level` (FIPS-style 3-digit like "040"),
`reference_date`, `requires` (parent-geo list), `wildcard`. No API
key required. License: US Public Domain.輸入 schema
{
"properties": {
"year": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"title": "Year"
},
"dataset": {
"title": "Dataset",
"type": "string"
}
},
"required": [
"year",
"dataset"
],
"title": "us_get_geography_listArguments",
"type": "object"
}呼叫方式
配置好 Twinkle Hub 的 MCP client 後,agent 會看到 us_get_geography_list。直接讓它呼叫即可,例如:
# Ask Claude / any MCP client: 請用 us_get_geography_list 處理 "…"。 # It will call: us_get_geography_list(input="…")
尚未設定 Client?
Claude Desktop 約 3 分鐘即可完成設定 — 下載 .mcpb 檔案並雙擊即可,或參閱文件中的各 Client 安裝步驟。
查看使用者設定文件