Geography & GIS

The Wolfram Language unites data, analytics and visualization for geography and geographic information systems (GIS).

Geographic Data

Importing Built-in Data

The first step in geography-related projects is often to get data. The Wolfram Language enables you to easily access millions of pieces of data using entities, like in this example that returns a list of notable buildings in San Francisco and then plots the location of each building.

Importing External Data

Already have data? Hundreds of file formats can be imported with a single line of code using the Import function.

Import["http://exampledata.wolfram.com/sdtsdlg.tar.gz"]
The Wolfram Language makes it easy to connect to external services. In this example, data is accessed via an API about the location of bikeshares in London:
APIURL="http://api.citybik.es/barclays-cycle-hire.json";
Map[{#["lat"]/1000000,#["lng"]/1000000}&,Import[APIURL,"RawJSON"]]//GeoHistogram

Analysis and Visualization

Geographic Analysis

Once you have formatted data, you'll want to perform some kind of analysis, whether you are trying to find distances between areas, computing densities of data in a region or trying to find clusters where events occur. In this example, the coordinates for all of the United States' respective state capitals are programmatically fetched and the shortest path through each capital is computed and visualized.

GeoGraphics[GeoPath[capitals[[Last[FindShortestTour[capitals]]]]]]

Geographic Visualization

The end result of many geography-related projects is a map. With the Wolfram Language, you have many aesthetic and functional options for mapmaking, including interactive features and more.

In this example, each state in Brazil is colored according to its population, creating a population heat map:
GeoRegionValuePlot[EntityList[Entity["AdministrativeDivision", {EntityProperty["AdministrativeDivision", "ParentRegion"] -> Entity["Country", "Brazil"]}]] -> "Population"]
In this example, wind data is retrieved for the entire United States, and the direction and magnitude of the wind data is represented as arrows with a vector plot:
data=Flatten[Table[{GeoPosition[{lat,long}],WindVectorData[GeoPosition[{lat,long}]]},{long,-125,-67,2},{lat,25,50,1}],1];

Get Started

Learning Resources

Learning Paths

Try it now, learn later

Want to just try it out? Get a feel for what the Wolfram Language is like while trying out real code samples focused on geography and geographic information systems.

Try these instantly! Access with a free Wolfram Cloud account
Get certified for free in the Wolfram Language

We've made it easy to learn the Wolfram Language your way. Try our free interactive course and earn a certification.

Start the interactive online course now! About 20 hours for completion
Try these instantly! Access with a free Wolfram Cloud account
Start the interactive online course now! About 20 hours for completion

Go Further with Geographic Data

Want to keep exploring geography and GIS?

If you want to see more of what Wolfram offers for geography and GIS, head to the Geographic Data & Entities guide page. You'll find:

  • Specialized geography-related functions
  • Built-in data pertaining to geography
  • Functions for geographic visualization
  • Related documentation
Learn more

Recommended Product