Skip to content

Fetch Swedish zipcodes and metadata such as their closest city, county, municipality and geo-coordinates

License

Notifications You must be signed in to change notification settings

Gronis/postnummer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

postnummer

Fetch all Swedish zipcodes and metadata such as their closest city, county, municipality and geo-coordinates. The data is fetched from geonames.org which in turns fetch data from the swedish authorities.

Original data sources:

Reference: http://www.geonames.org/countries/SE/kingdom-of-sweden.html

Usage

No dependencies required. To fetch all ~16000 zipcodes and associated metadata and write it to zipcodes.json:

npm run start

Example

Print zipcode 111 23 and its metadata

cat zipcodes.json | grep '111 23' -B 1 -A 6

Output:

  {
    "zipcode": "111 23",
    "city": "Stockholm",
    "county": "Stockholm",
    "municipality": "Stockholm",
    "lat": "59.3326",
    "lng": "18.0649"
  },

About

Fetch Swedish zipcodes and metadata such as their closest city, county, municipality and geo-coordinates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published