The GeoNames Data Set - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

The GeoNames Data Set

Built-in Data Sets

 • The DataSets package features two built-in data sets: Country and GeoNames.
 • The built-in data sets are accessed by creating a Reference to either data set.

The GeoNames Data set

 • The GeoNames data set contains geographic information on all of the countries of the world.
 • The data in the GeoNames data set is taken from www.geonames.org, a worldwide geographical database with a search function, browsable maps, and downloadable data files.
 • The first column in the GeoNames data set is always the GeoNamesid column.

The following creates a new reference to the GeoNames data set:

 > with(DataSets):
 > ref := Reference("Builtin", "Geonames");
 ${\mathrm{ref}}{≔}\left[\right]$ (1)

The GeoNames data set contains a collection of geographic information. The GetHeaders command returns a list containing the names for all of the data set variables in the GeoNames data set. The following table shows all of the available data variables:

 > DocumentTools:-Tabulate(Matrix(2, 5, [op(sort(GetHeaders(ref))),""])):

 City/County Country Latitude Longitude Name Population Province/State/Region Time Zone Type

It is possible to search the data set by indexing into the Reference object. For example, to see all of data on Uppsala, Sweden:

 > place := ref[[Country = "Sweden", Name = "Uppsala"]][2];
 ${\mathrm{place}}{≔}\left[\right]$ (2)

To return (get) a specific variable, say Population, from this data subset:

 > GetData(place[..,Population]);
 $\left[\right]$ (3)

The WorldMap object can display entries from the GeoNames data set on a world map projection:

 > Display(Builtin:-WorldMap(place));

More examples for interacting with the GeoNames data set can be found on the Reference help page.