•
|
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:
>
|
ref := Reference("Builtin", "Geonames");
|
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];
|
To return (get) a specific variable, say Population, from this data subset:
>
|
GetData(place[..,Population]);
|
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.