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

Online Help

All Products    Maple    MapleSim


Geographic Data

  Maple 2017 updates the DataSets package to include a built-in geographic information database and a map visualization facility.

 

GeoNames Dataset

WorldMap

GeoNames Dataset

The GeoNames data set is a built-in geographic information database which contains data for over one million geographic locations around the world. The GeoNames data set shares the same set of accessing commands as other built-in data sets.

 

Obtain a Reference object for the GeoNames data set:

(1.1)

 

Each data entry (row) consists of 10 columns where each column denotes certain information about that geographic location. The first column, GeoNamesid, is an integer id unique to each row.

View a list of all the column headers (not including GeoNamesid):

(1.2)

 

You can search the data set by indexing into the Reference object. The most interesting and useful indexing method is to index by boolean constraints on column values. For example, find all places in Canada with the name Waterloo and see the actual data:

(1.3)

 

Find out which states in the US have population greater than 5 million:

(1.4)

WorldMap

The WorldMap object under the Builtin subpackage of the DataSets package is new to Maple 2017. It is a versatile map-displaying tool that can cooperate with the GeoNames data set as well as work alone.

 

The WorldMap object can provide visualization for search results from the GeoNames data set. For example, to generate a map of regions of Austria, first search for the data using the GeoNames data set and then create a WorldMap object using the search results:

(2.1)

(2.2)

Then, plot the map by calling the Display command on the WorldMap object:

 

The WorldMap object can display great circle paths, which are the shortest paths along the earth's surface between two geographic locations.

For example, connect all capital cities in the world with population greater than 8 million in a loop:

(2.3)

 

The WorldMap object can display maps under numerous map projections. Some projections are suitable for the type of data visualization presented in previous examples while others make maps themselves interesting and charming to look at. For the complete list of supported map projections, see the List of Projections help page.

 

(2.4)

 

For example, to generate a world map in the Van der Grinten projection, call the Display command on  with the projection=VanderGrinten option:

 

For parameterized map projections, using Display together with the Explore command, you can easily see how the map transforms with respect to changes in the parameters.

For example, the Bottomley projection accepts a standard parallel () parameter which makes it vary between the sinusoidal projection () and the Werner projection ().

Use Explore to see this transformation:

The WorldMap object can also highlight the countries of the world based on a set of data using the ChoroplethMap command. The example below shows the countries colored based on their coastline length.

(2.5)

 

Many countries have coastline length 0, so taking the logarithm would yield minus infinity. Instead, we add 1 to each coastline length before taking the logarithm.

 

Another example for choropleth maps can be found here: Visualizing Custom Data on a Choropleth Map

 


Download Help Document