BUILT-IN MATHEMATICA SYMBOL

CityData

CityData["name", "property"]
gives the value of the specified property for the city with the specified name.

CityData["name"]
gives a list of the full specifications of cities whose names are consistent with name.

DetailsDetails

• The full specification of a city is , where is a state, province or other administrative division.
• Names of cities, regions, and countries are given in standard forms, such as , , and .
• CityData["city"] gives a list of all available cities worldwide that use the name , sorted in order of decreasing population.
• CityData[{"city", "country"}] gives the full specifications for all available cities in the specified country that use the name . The results are sorted in order of decreasing population.
• CityData[{"city", "country"}, "property"] gives the value of for the city with the largest population in the given country that has the specified name.
• CityData[{"city", "region", "country"}, "property"] gives the value of for the particular city represented by the full city specification .
• If there is more than one city with a given name in a particular region and country, the standard name for that city will contain additional identifying information, such as a county name.
• CityData[{All, "region", "country"}] gives a list of all available cities in the specified region of a country, sorted in order of decreasing population.
• CityData[{Large, "region", "country"}] gives a list of all large cities in the specified region. Large cities are typically defined as having populations above 100,000.
• CityData[{All, "country"}] and CityData[{Large, "country"}] give all available cities and all large cities, respectively, in the specified country.
• CityData[] or gives a list of all available cities in the world.
• Typical properties for cities include:
•  "Coordinates" latitude, longitude for the city center "Elevation" elevation in meters of the city center "Latitude" latitude for the city center "LocationLink" URI for a map centered on the city "Longitude" longitude for the city center "Population" estimated total ordinary population "TimeZone" current time zone relative to UTC
• Names and identification-related properties include:
•  "AlternateNames" alternate names "Country" country in which the city lies "FullName" primary full English name (e.g. ) "Name" primary short English name (e.g. ) "Region" state, province, or other administrative division "RegionName" English or local name for region
• CityData["name", "property", "ann"] gives various annotations associated with a property. Typical annotations include:
•  "Date" date to which the data refers "Description" the description of the property "Note" special note about the property given "Units" units in which the value is given "UnitsName" English name for the units used "UnitsNotation" notation for the units used "UnitsStandardName" Mathematica standard name for the units used

ExamplesExamplesopen allclose all

Basic Examples (6)Basic Examples (6)

Find all available cities in the world named London, sorted by decreasing population:

 Out[1]=

Find the population of London, England:

 Out[1]=

Find the population of London, Ontario:

 Out[2]=

Find the latitude and longitude of the center of London, England:

 Out[1]=

Give English names for a city:

 Out[1]=
 Out[2]=

Large cities (of over 100,000) in Ireland:

 Out[1]=

Large cities in Ohio:

 Out[2]=

Find all available cities in Vanuatu:

 Out[1]=

TutorialsTutorials

New in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »