Skip to main content

city

This module provides a dictionary of over 9,000 world cities.

Import

Import the dictionary to your project via the require tag:

require: city/cityEn.sc
module = sys.zb-common

After importing the file, the following becomes available:

Value format

FieldTypeDescription
nameStringCity name
latNumberLatitude
lonNumberLongitude
countryStringISO 3166-1 alpha-2 country code
timezoneStringTime zone conforming to the Java specification
populationNumberPopulation in 2017

Entry examples

2082;Seattle;{"name": "Seattle", "lat": 47.60621, "lon": -122.33207, "country": "US", "timezone": "America/Los_Angeles", "population": 608660}
4551;Osaka;{"name": "Osaka", "lat": 34.69374, "lon": 135.50218, "country": "JP", "timezone": "Asia/Tokyo", "population": 2592413}
tip
Learn how to use this dictionary by walking through the Last Letter game bot tutorial.