cities15k.json

Cities of the world (over 15k population) in JSON, based on GeoNames Gazetteer


Keywords
cities, json
License
CC-BY-3.0
Install
npm install cities15k.json@1.1.2

Documentation

Cities of the World

Creative Commons License

These cities comes from GeoNames Gazetteer: http://www.geonames.org

Here is the description of the original dataset:

all cities with a population > 15000 or capitals (ca 25.000) [...]

Install

npm install --save cities15k.json

Usage

Either on node or the browser (with webpack) it get as simple as this:

ES5

const cities = require('cities15k.json');

ES6

import cities from 'cities15k.json';

Since webpack >= v2.0.0, importing of JSON files will work by default.

Description

This Json version is an array of object of the following shape:

  • ISO 3166-1 alpha-2 country code
  • name
  • Latitude
  • Longitude
[
  {
    "country": "FR",
    "name": "Lyon",
    "lat": "45.75",
    "lng": "4.583333"
  },
  ...
]

These cities can pretty easily be matched with countries by code using the following dataset: https://github.com/annexare/Countries