@aciesai/fips-county-codes 中文文档教程

发布于 3年前 浏览 21 项目主页 更新于 3年前

用于查找 FIPS 县代码的工具。

Example

const fips = require('fips-county-codes');

fips.get({
  "state": "AL",
  "county": "Chambers"
});

// 017

fips.get({
  "fips": "017"
});

// {
//   "state": "AL",
//   "county": "Chambers"
// }

Options

OptionDescriptiontype
fipsA three digit fips codestring
stateTwo letter state abbrviationstring
countyCounty namestring

Source

美国人口普查局(2010 年)。 以下是全美国的 CSV 数据

Data manipulation

我对数据集所做的唯一更改是在 CSV 文件中包含一个标题行; 我使用 csv2json 将数据集转换为 JSON。 我没有尝试改变类型。 所有字段都是 String 类型。

Field descriptions

Field NameField DescriptionExample
stateState Postal CodeFL
statefpState FIPS Code12
countyfpCounty FIPS Code011
countynameCounty nameBroward County
classfpFIPS Class CodeH1

FIPS Class Codes

  • H1: identifies an active county or statistically equivalent entity that does not qualify under subclass C7 or H6.
  • H4: identifies a legally defined inactive or nonfunctioning county or statistically equivalent entity that does not qualify under subclass H6.
  • H5: identifies census areas in Alaska, a statistical county equivalent entity.
  • H6: identifies a county or statistically equivalent entity that is areally coextensive or governmentally consolidated with an incorporated place, part of an incorporated place, or a consolidated city.
  • C7: identifies an incorporated place that is an independent city; that is, it also serves as a county equivalent because it is not part of any county, and a minor civil division (MCD) equivalent because it is not part of any MCD.

Browser support

所有现代浏览器。 对于 IE11 支持,您必须填充 Array.find()

Tests

npm test

License

Sax 公共领域声明

A tool for looking up FIPS county codes.

Example

const fips = require('fips-county-codes');

fips.get({
  "state": "AL",
  "county": "Chambers"
});

// 017

fips.get({
  "fips": "017"
});

// {
//   "state": "AL",
//   "county": "Chambers"
// }

Options

OptionDescriptiontype
fipsA three digit fips codestring
stateTwo letter state abbrviationstring
countyCounty namestring

Source

U.S. Census Bureau (2010). Here is the CSV data for all of the United States.

Data manipulation

The only change I made to the dataset was to include a header row in the CSV file; I use csv2json to convert dataset to JSON. I did not attempt to change types. All fields are of type String.

Field descriptions

Field NameField DescriptionExample
stateState Postal CodeFL
statefpState FIPS Code12
countyfpCounty FIPS Code011
countynameCounty nameBroward County
classfpFIPS Class CodeH1

FIPS Class Codes

  • H1: identifies an active county or statistically equivalent entity that does not qualify under subclass C7 or H6.
  • H4: identifies a legally defined inactive or nonfunctioning county or statistically equivalent entity that does not qualify under subclass H6.
  • H5: identifies census areas in Alaska, a statistical county equivalent entity.
  • H6: identifies a county or statistically equivalent entity that is areally coextensive or governmentally consolidated with an incorporated place, part of an incorporated place, or a consolidated city.
  • C7: identifies an incorporated place that is an independent city; that is, it also serves as a county equivalent because it is not part of any county, and a minor civil division (MCD) equivalent because it is not part of any MCD.

Browser support

All modern browsers. For IE11 support, you must polyfill Array.find().

Tests

npm test

License

Sax Public Domain Notice

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文