Geographic Visualization

Emmanuel Garcés Medina, Wolfram Research

ABSTRACT

Wolfram Language supports differents ways of representing geographic data. We basically deal with coordinates, coordinates with associated values and vectors. Here we will survay through visualization functions depending on the type of data and what we want to look at. We will also introduce new geographic	 visualization functions.

You can see more in Geographic Visualization Twitch Talk

Geographical Data

There are different ways we can represent geographical data in Wolfram Language: Geographic positions or Entities with positions, associate GeoPosition or Entities with values and GeoVectors.

1. GeoPosition or Entities

GeoListPlot

GeoListPlot plots either coordinates or Geo Entities.

GeoListPlot[{LinguisticAssistant,LinguisticAssistant,LinguisticAssistant,GeoVariant[LinguisticAssistant,"AllAreas"],
GeoPosition[{RandomReal[{0,90}],RandomReal[{-180,180}]}]}]

GeoListPlot[LinguisticAssistant,PlotStyle->Red]

GeoHistogram

GeoHistogram plots a discrete bin histogram of either coordinates or Geo Entities.

GeoHistogram[RandomGeoPosition[LinguisticAssistant,300]]

Se can set the bin specification

Table[GeoHistogram[RandomGeoPosition[LinguisticAssistant,300],binspec],{binspec,{"AdministrativeDivision","Rectangle","Triangle"}}]

Use data from W|A

GeoHistogram[LinguisticAssistant]

Specify an entity type bin

GeoHistogram[LinguisticAssistant,"USState"]

GeoHistogram[LinguisticAssistant,"ZIPCode"]

GeoSmoothHistogram

The continous version of GeoHistogram is GeoSmoothHistogram.

GeoSmoothHistogram[RandomGeoPosition[LinguisticAssistant,300]]

GeoSmoothHistogram also accepts entities as input

GeoSmoothHistogram[LinguisticAssistant]

Change the bandwidth of the smooth kernel distribution

GeoSmoothHistogram[LinguisticAssistant,0.8]

Use RegionFunction to specify the region to include in the plot

GeoSmoothHistogram[LinguisticAssistant,RegionFunction->LinguisticAssistant]

2. GeoPosition or Entities associated to values

The second way we can represent data is GeoPosition or Geo Entities associated to values.

GeoRegionValuePlot

GeoRegionValuePlot plots regions associated to numerical values or quantities.

GeoRegionValuePlot[{LinguisticAssistant->0.9, LinguisticAssistant->0.8, LinguisticAssistant->0.7}]

GeoRegionValuePlot also accepts quantities as associated values

GeoRegionValuePlot[{LinguisticAssistant->LinguisticAssistant,LinguisticAssistant->LinguisticAssistant,LinguisticAssistant->LinguisticAssistant,LinguisticAssistant->LinguisticAssistant}]

GeoBubbleChart

Plot bubbles over the map. Each bubble size is proportional to the associated value.

GeoBubbleChart[{LinguisticAssistant->LinguisticAssistant,LinguisticAssistant->LinguisticAssistant,LinguisticAssistant->LinguisticAssistant,LinguisticAssistant->LinguisticAssistant}]

Use ChartElements to show Pie charts as bubbles.

GeoBubbleChart[Table[CountryData[country]->CountryData[country,"OilConsumption"],{country,{"Japan","SouthKorea","China","Philippines"}}],ChartElements->Table[PieChart[{CountryData[country,"OilConsumption"]-CountryData[country,"OilProduction"],CountryData[country,"OilProduction"]}],{country,{"Japan","SouthKorea","China","Philippines"}}]]

GeoHistogram

GeoHistogram also accepts coordinates or entities with associated values

GeoHistogram[WeightedData[EntityList[LinguisticAssistant],#["Population"]&]]

Some inputs doesn' t make sense for GeoHistogram with weighted data

GeoHistogram[WeightedData[EntityList@LinguisticAssistant,#["Height"]&]]

GeoSmoothHistogram

GeoSmoothHistogram[WeightedData[EntityList@LinguisticAssistant,#["Population"]&]]

Specify the region to include in the plot

GeoSmoothHistogram[WeightedData[EntityList[LinguisticAssistant],#["Population"]&],RegionFunction->LinguisticAssistant]

GeoDensityPlot (coming soon)

GeoDensityPlot makes a density plot of positions with associated values.

ozone=

GeoDensityPlot[ozone]

GeoDensityPlot[ozone,GeoProjection->"LambertAzimuthal",ColorFunction->Hue,GeoRange->"World"]

We can use GeoElevation with heights specified in

elevations=GeoElevationData[GeoBoundingBox[GeoDisk[LinguisticAssistant,LinguisticAssistant]],Automatic,"GeoPosition",GeoZoomLevel->10]

GeoDensityPlot[elevations]

GeoContourPlot (coming soon)

GeoContourPlot makes a contour plot of values on the map.

GeoContourPlot[WeightedData[EntityList[LinguisticAssistant],#["Population"]&],RegionFunction->LinguisticAssistant]

elevations=GeoElevationData[GeoBoundingBox[GeoDisk[LinguisticAssistant,LinguisticAssistant]],Automatic,"GeoPosition",GeoZoomLevel->10]

GeoContourPlot[elevations]

Specify the number of contours

GeoContourPlot[elevations,Contours->15]

Set contour shading

GeoContourPlot[elevations,Contours->15,ContourShading->Automatic]

Specify a color function

GeoContourPlot[elevations,Contours->15,ContourShading->Automatic,ColorFunction->"TemperatureMap"]

We have to be wise about choosing what data to use for GeoContourPlot and GeoDensityPlot

GeoContourPlot[WeightedData[EntityList@LinguisticAssistant,#["Height"]&],RegionFunction->LinguisticAssistant,Contours->8,ContourShading->Automatic]

3. Geographic Vectors

Geographic vectors are represented in three forms: GeoVector, GeoVectorENU and GeoVectorXYZ.

GeoVectorPlot

Use GeoVectorPlot to generate a vector plot of a field of vectors represented by magnitud and bearing.

Short[data=Table[GeoVector[RandomGeoPosition[LinguisticAssistant]->{RandomReal[],Quantity[RandomReal[{0,360}],"AngularDegrees"]}],{50}],5]

GeoVectorPlot[data]

Use GeoVectorENU

coords=RandomGeoPosition[100]

vects = QuantityArray[RandomReal[{-1,1},{100,2}],"Kilometers"]

GeoVectorPlot[GeoVectorENU[coords->vects]]

Use GeoVectorXYZ

data=GeoVectorXYZ[Table[RandomGeoPosition[LinguisticAssistant]->{RandomChoice[{1,-1}],Mod[x,2],0},{x,20}]]

GeoVectorPlot[data]

GeoStreamPlot

GeoStreamPlot generates a stream plot from the field of geo vectors.

Short[data=Table[GeoVector[RandomGeoPosition[LinguisticAssistant]->{RandomReal[],Quantity[RandomReal[{0,360}],"AngularDegrees"]}],{50}],5]

GeoStreamPlot[data]

Some applications

Wind farms

windfarms=;

GeoGraphics[Point@windfarms]

density=GeoSmoothHistogram[windfarms,RegionFunction->LinguisticAssistant]

vectors=WindVectorData[RandomGeoPosition[Entity["Country","UnitedStates"],200],Now,"DownwindGeoVector"];

windplot=GeoVectorPlot[vectors,RegionFunction->LinguisticAssistant]

Combine two outputs

Show[density,windplot]

Magnetic field

world=GeomagneticModelData[Entity["GeographicRegion","World"],DateObject[{2019,2,19},"Day","Gregorian",-6.`],GeoVector]

Legended[Show[GeoStreamPlot[GeomagneticModelData[Entity["Ocean","ArcticOcean"],Today,GeoVector],GeoCenter->GeoPosition[{90,0}],GeoGridLines->Automatic],GeoGraphics[{AbsolutePointSize[7],{Darker[Red],Point[GeoPosition["NorthModelDipPole"]]},{Darker[Green],Point[GeoPosition["NorthPole"]]},{Darker[Blue],Point[GeoPosition["NorthGeomagneticPole"]]}}]],PointLegend[Map[Darker,{Red,Green,Blue}],{"north dip pole","north pole","geomagnetic north pole"}]]