0.2.6 • Published 1 year ago

jp-city-lookup v0.2.6

Weekly downloads
3
License
MIT
Repository
github
Last release
1 year ago

Japan City Code Lookup

Node.js CI npm version

  • JIS X 0402: Identification code for cities, towns and villages
  • Reverse Geocoding: Japan Standard Grid Square (1km accuracy)
  • Standalone: No module dependencies

Synopsis

const {City} = require("jp-city-lookup");

// lookup by pair of latitude and longitude
console.log(City.lookup({lat: 35.68944, lng: 139.69167})); // => ["13104", "13113"]

// lookup by comma separated latitude and longitude
console.log(City.lookup({ll: "35.1709,136.8815"})); // => ["23104", "23105"]

// lookup by JIS prefecture code
console.log(City.lookup({pref: "13"})); // => ["13101", "13102", ... "13421"]

// lookup by neighboring city code
console.log(City.lookup({neighboring: "13101"})); // => ["13102", "13104", ... "13106"]

// name for city code
console.log(City.name("13101")); // => "千代田区"

GitHub

Reference

See Also

The MIT License (MIT)

Copyright (c) 2018-2023 Yusuke Kawasaki

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.2.6

1 year ago

0.2.5

2 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

6 years ago

0.1.3

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago