The GeoNames Data Set - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics and Data Analysis : DataSets Package : Builtin : DataSets/Builtin/GeoNames

The GeoNames Data Set

 

Built-in Data Sets

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");

refGeonames (GeoNamesid)NameType(7 more)68Boneh-ye Mehdisection of populated place121Lab Sefidlocality166Gorizilocality(1155858 more)

(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];

placeGeonames (GeoNamesid)NameType(7 more)2666218Uppsalafirst-order administrative division

(2)

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

GetData(place[..,Population]);

341977

(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.