@fuzzysaj/location-to-usa-county
[![npm (scoped)](https://img.shields.io/npm/v/@fuzzysaj/location-to-usa-county.svg)](https://www.npmjs.com/package/@fuzzysaj/location-to-usa-county) [![Build Status](https://travis-ci.org/fuzzysaj/location-to-usa-county.svg?branch=master)](https://travis-
Last updated a month ago by fuzzysaj .
GPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @fuzzysaj/location-to-usa-county 
SYNC missed versions from official npm registry.

@fuzzysaj/location-to-usa-county

npm (scoped) Build Status dependencies Status code coverage

A program to convert latitude/longitude coordinates into USA counties. Data is stored locally based on publicly available boundary files from United States Census Bureau.

Install

$ npm install @fuzzysaj/location-to-usa-county

Usage

With JavaScript:

const getLocToCountyLookupService = require('@fuzzysaj/location-to-usa-county');

(async ()=> {
  const locToCounty = await getLocToCountyLookupService(); 
  const county = await locToCounty(33.5038, -112.0253); // latitude, longitude for Phoenix
  // -> { county_name: "Maricopa", county_fips: "04013" }
})();

With TypeScript:

import { getLocToCountyLookupService, County } from '@fuzzysaj/location-to-usa-county'

(async ()=> {
  const locToCounty = await getLocToCountyLookupService();
  const county: County = await locToCounty(33.5038, -112.0253); // latitude, longitude for Phoeinx
  // -> { county_name: "Maricopa", county_fips: "04013" }
})();

About

2018 US counties boundaries obtained from United States Census Bureau in Shapefile format. Shapefile was converted to GeoJson and downsampled to 10% of original size using mapshaper.

Current Tags

  • 1.0.4                                ...           latest (a month ago)

4 Versions

  • 1.0.4                                ...           a month ago
  • 1.0.3                                ...           2 months ago
  • 1.0.2                                ...           3 months ago
  • 1.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 4
Last Day 0
Last Week 4
Last Month 21
Dependencies (5)
Dev Dependencies (11)

Copyright 2014 - 2016 © taobao.org |