({{, (RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram])[locs] 
plots a smooth kernel histogram of the geo locations locs.}, {, (RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram])[locs,espec]
plots a smooth kernel histogram with estimator specification espec.}, {, (RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram])[locs,espec,dfun]
plots the distribution function dfun.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram]) is also known as geo intensity and kernel density.

(RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram]) effectively puts a small bump over each location and sums the heights so that there is a greater overall height where the distribution of locations is denser.

The location locs has the following forms and interpretations:

The locations (Subscript[loc, i]) have the following forms:

The estimator specification espec can be of the form bw or {bw,kernel}.

The specifications for bandwidth bw and kernel are the same as for (RefLink[SmoothKernelDistribution, paclet:ref/SmoothKernelDistribution]).

The default distribution function dfun is "Intensity".

The possible settings for dfun are the same as in (RefLink[SmoothHistogram, paclet:ref/SmoothHistogram]).

(RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram]) has the same options as (RefLink[GeoGraphics, paclet:ref/GeoGraphics]) with the following additions and changes:

(RefLink[ColorFunction, paclet:ref/ColorFunction]) and (RefLink[OpacityFunction, paclet:ref/OpacityFunction]) are supplied with a single argument, given by default by the scaled value of the intensity f.

The arguments supplied to (RefLink[RegionFunction, paclet:ref/RegionFunction]) are x, y and f, where f is the intensity.

The value of region in (RefLink[RegionFunction, paclet:ref/RegionFunction])->region can be an entity or geo polygon over which to plot.

With the setting (RefLink[MeshShading, paclet:ref/MeshShading])->(RefLink[Automatic, paclet:ref/Automatic]), the colors between mesh lines are computed from the (RefLink[ColorFunction, paclet:ref/ColorFunction]) setting.

OpenersPrimaryExamplesSection(Spacer1)Examples  (63)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Generate an intensity plot for a list of geographic points:

data=GeoPosition[];

GeoSmoothHistogram[data]

Use a smaller bandwidth to reduce the smoothing of the intensity:

data=GeoPosition[];

GeoSmoothHistogram[data,0.1]

OpenersExampleSection1(Spacer1)Scope  (23)

OpenersExampleSubsection0(Spacer1)Data  (11)

Use a (RefLink[GeoPosition, paclet:ref/GeoPosition]) representing a list of locations:

data=GeoPosition[];

GeoSmoothHistogram[data]

Use a list of (RefLink[GeoPosition, paclet:ref/GeoPosition]) locations:

Short[data=EntityValue[CountryData["Japan","LargestCities"],"Position"],4]

GeoSmoothHistogram[data]

Use entities to represent locations:

data=CityData[{All,"Iceland"}];

GeoSmoothHistogram[data]

Create an intensity plot from the (RefLink[EntityClass, paclet:ref/EntityClass]) containing skyscrapers around the world:

GeoSmoothHistogram[(EntityClass["skyscrapers", EntityClass["Building","Skyscraper"], "EntityClass[\"Building\", \"Skyscraper\"]", "buildings"]),GeoRange->"World",PlotLegends->Automatic]

Use an (RefLink[Association, paclet:ref/Association]) with locations for keys and values for counts:

data=AssociationMap[(EntityProperty["population", EntityProperty["Country","Population"], "EntityProperty[\"Country\", \"Population\"]"]),EntityList[LinguisticAssistant]]

GeoSmoothHistogram[data,PlotLegends->Automatic]

Use (RefLink[WeightedData, paclet:ref/WeightedData]):

GeoSmoothHistogram[WeightedData[CountryData["UnitedStates","LargestCities"],#["Population"]&],20,PlotLegends->Automatic]

(RefLink[GeoRange, paclet:ref/GeoRange]) is selected automatically:

data=GeoPosition[];

GeoSmoothHistogram[data]

Use (RefLink[GeoRange, paclet:ref/GeoRange]) to focus on geographic areas of interest:

GeoSmoothHistogram[data,GeoRange->{{50,60},{-10,5}}]

Nonreal data points are ignored:

data=GeoPosition[{{49.0,-121.9},{35.0,-91.1},{24,-81.3},{1.2,0.+0.5 I},{1.,0.+0.9 I}}];

GeoSmoothHistogram[data]

Specify the number of points to use:

data=GeoPosition[];

GeoSmoothHistogram[data,PlotPoints->10]

Plot an intensity plot of a list of locations:

GeoSmoothHistogram[GeoEntities[(Entity["New York City", Entity["City",{"NewYork","NewYork","UnitedStates"}], "Entity[\"City\", {\"NewYork\", \"NewYork\", \"UnitedStates\"}]", "city"]), "Building"]]

Plot an intensity plot of locations with weights:

entities=EntityList[LinguisticAssistant];

wd=WeightedData[entities,EntityValue[entities, "Population"]];

GeoSmoothHistogram[wd]

OpenersExampleSubsection1(Spacer1)Bandwidth and Kernel  (7)

Specify a single bandwidth for bivariate data:

data=GeoPosition[];

Table[GeoSmoothHistogram[data, bw,ColorFunction->"DeepSeaColors"],{bw,{.1,1}}]

Allow bivariate bandwidths to vary adaptively with local density:

data=GeoPosition[];

Use the local sensitivity from 0.25 (small) to 0.75 (large):

Table[GeoSmoothHistogram[data, bw],{bw,{{"Adaptive",Automatic,0.25},{"Adaptive",Automatic,0.75}}}]

Use any of several automatic bandwidth selection methods:

data=GeoPosition[];

Table[GeoSmoothHistogram[data,name,PlotLabel->name],{name,{"LeastSquaresCrossValidation","Oversmooth","Scott","SheatherJones","StandardDeviation","StandardGaussian"}}]

Silverman's method is used by default for bandwidth selection:

data=GeoPosition[];

The PDFs are equivalent:

Table[GeoSmoothHistogram[data, bw],{bw,{"Silverman",Automatic}}]

Use different bandwidth specifications in each dimension:

data=GeoPosition[];

GeoSmoothHistogram[data, {1,{"Standardized",1}} ]

Specify any one of several kernel functions:

data=GeoPosition[];

Table[GeoSmoothHistogram[data,{Automatic,i},PlotLabel->i,FrameTicks->None],{i,{"Biweight","Cosine","Epanechnikov","Gaussian","Rectangular","SemiCircle","Triangular","Triweight"}}]

Define the kernel function as a pure function:

data=GeoPosition[];

Table[GeoSmoothHistogram[data,{Automatic, ker}],{ker,{"Gaussian",(1/(π (1+((#1)^2))))&}}]

OpenersExampleSubsection2(Spacer1)Presentation  (5)

Add labels:

data=GeoPosition[];

GeoSmoothHistogram[data,FrameLabel->{"x","y"},PlotLabel->"Geo Intensity Plot"]

Color the surface by height:

data=GeoPosition[];

GeoSmoothHistogram[data,FrameLabel->{"x","y"},ColorFunction->"SolarColors"]

Create an overlay mesh:

data=GeoPosition[];

GeoSmoothHistogram[data,FrameLabel->{"x","y"},Mesh->20]

Style the overlay mesh:

GeoSmoothHistogram[data,FrameLabel->{"x","y"},Mesh->20,MeshStyle->Dashed]

Show a legend matching the colors to their values:

data=GeoPosition[];

GeoSmoothHistogram[data,PlotLegends->Automatic]

Show the plot on a relief map:

data=GeoPosition[];

GeoSmoothHistogram[data,GeoBackground->"ReliefMap",ColorFunction->"Rainbow"]

Use a satellite map:

GeoSmoothHistogram[data,GeoBackground->"Satellite",ColorFunction->"SolarColors"]

OpenersExampleSection2(Spacer1)Options  (31)

OpenersExampleSubsection3(Spacer1)BoundaryStyle  (2)

Use a red boundary around the edges of the surface:

data=GeoPosition[];

GeoSmoothHistogram[data,BoundaryStyle->Red]

(RefLink[BoundaryStyle, paclet:ref/BoundaryStyle]) applies to regions cut by (RefLink[RegionFunction, paclet:ref/RegionFunction]):

data=GeoPosition[RandomVariate[BinormalDistribution[.5],20]]

GeoSmoothHistogram[data,BoundaryStyle->Red,RegionFunction->Function[{x,y,z},x^2+y^2≥1]]

data=GeoPosition[];

GeoSmoothHistogram[data, ClippingStyle->Automatic,PlotRange->{0,0.01}]

OpenersExampleSubsection4(Spacer1)ColorFunction  (4)

By default, regions with a lower density of points are colored lighter:

data=GeoPosition[];

GeoSmoothHistogram[data,PlotLegends->Automatic]

Specify the color function from a coloring scheme:

data=GeoPosition[];

GeoSmoothHistogram[data,ColorFunction->"SolarColors"]

Specify a specific color function:

GeoSmoothHistogram[data, ColorFunction->(Hue[2/5,2/3,1-2#/3]&)]

Use (RefLink[ColorFunctionScaling, paclet:ref/ColorFunctionScaling])->(RefLink[False, paclet:ref/False]) to get unscaled height values:

data=GeoPosition[];

GeoSmoothHistogram[data,ColorFunction->(Which[#>0.03,Red,#>0.02,Orange,#>0.01,Yellow,True,Blue]&),ColorFunctionScaling->False,PlotLegends->Automatic]

Use opacity to show relative densities:

data=GeoPosition[];

GeoSmoothHistogram[data,ColorFunction->(Opacity[#,Blue]&),PlotLegends->Automatic]

OpenersExampleSubsection5(Spacer1)ColorFunctionScaling  (1)

Use (RefLink[ColorFunctionScaling, paclet:ref/ColorFunctionScaling])->(RefLink[False, paclet:ref/False]) to get unscaled height values:

data=GeoPosition[];

GeoSmoothHistogram[data,ColorFunction->(Which[#>0.03,Red,#>0.02,Orange,#>0.01,Yellow,True,White]&),ColorFunctionScaling->False,PlotLegends->Automatic]

OpenersExampleSubsection6(Spacer1)GeoBackground  (3)

By default, geo intensity plots are shown on an unlabeled map:

data=GeoPosition[];

GeoSmoothHistogram[data]

Show the intensity plot on a labeled map:

data=GeoPosition[];

GeoSmoothHistogram[data,GeoBackground->"StreetMap"]

Show the plot on a satellite map:

data=GeoPosition[];

GeoSmoothHistogram[data,GeoBackground->"Satellite"]

OpenersExampleSubsection7(Spacer1)GeoCenter  (1)

Center the plot at specific entity coordinates:

data=GeoPosition[];

GeoSmoothHistogram[data, GeoCenter->LinguisticAssistant]

Center the plot at specific coordinates:

GeoSmoothHistogram[data, GeoCenter->GeoPosition[{40,20}]]

OpenersExampleSubsection8(Spacer1)GeoGridLines  (1)

Overlay a map with geo grid lines using the default styling:

data=GeoPosition[];

GeoSmoothHistogram[data,GeoGridLines->Automatic]

Draw geo grid lines at specific lines of latitude and longitude:

GeoSmoothHistogram[data,GeoGridLines->{Range[35,50,5],Range[5,20,5]}]

Draw geo grid lines at specific lines of latitude:

GeoSmoothHistogram[data,GeoGridLines->{Range[34,50,2],None}]

Draw geo grid lines at specific lines of longitude:

GeoSmoothHistogram[data,GeoGridLines->{None,Range[5,20,3]}]

Specify the target number of geo grid lines:

GeoSmoothHistogram[data,GeoGridLines->20]

Specify different numbers of latitude and longitude geo grid lines:

GeoSmoothHistogram[data,GeoGridLines->{6,20}]

Draw geo grid lines as multiples of a given angle:

GeoSmoothHistogram[data,GeoGridLines->Quantity[4,"AngularDegrees"]]

OpenersExampleSubsection9(Spacer1)GeoGridLinesStyle  (1)

Specify the overall geo grid line style:

data=GeoPosition[];

GeoSmoothHistogram[data,GeoProjection->"Albers",GeoGridLines->Automatic,GeoGridLinesStyle->Opacity[0.5,Blue]]

GeoSmoothHistogram[data,GeoProjection->"Albers",GeoGridLines->Automatic,GeoGridLinesStyle->Dotted]

OpenersExampleSubsection10(Spacer1)GeoModel  (2)

Use the default (ellipsoidal) model of the Earth:

data=GeoPosition[];

GeoSmoothHistogram[data]

Use the Moon as reference model:

data=MannedSpaceMissionData[EntityList[(EntityClass["Apollo manned mission", EntityClass["MannedSpaceMission","ApolloMannedMission"], "EntityClass[\"MannedSpaceMission\", \"ApolloMannedMission\"]", "manned space missions"])],"LandingPosition"];

GeoSmoothHistogram[data,GeoModel->LinguisticAssistant,GeoRange->"World"]

OpenersExampleSubsection11(Spacer1)GeoProjection  (1)

Use (RefLink[GeoProjection, paclet:ref/GeoProjection]) to change the map projection:

Table[GeoSmoothHistogram[CityData[{All,"Sweden"}],GeoProjection->g,PlotLabel->g],{g,{"Equirectangular","CylindricalEqualArea","Orthographic"}}]

OpenersExampleSubsection12(Spacer1)GeoRange  (1)

The geographic region to show is automatically determined:

data=GeoPosition[];

GeoSmoothHistogram[data]

Specify the region to show:

GeoSmoothHistogram[data,GeoRange->(Entity["Europe", Entity["GeographicRegion","Europe"], "Entity[\"GeographicRegion\", \"Europe\"]", "geographic region"])]

Specify the corners of the geo range:

GeoSmoothHistogram[data,GeoRange->{GeoPosition[{60,0}],GeoPosition[{35,30}]}]

OpenersExampleSubsection13(Spacer1)GeoRangePadding  (1)

Use (RefLink[GeoRangePadding, paclet:ref/GeoRangePadding])->(RefLink[None, paclet:ref/None]) to remove padding:

data=GeoPosition[];

GeoSmoothHistogram[data,GeoRangePadding->None]

Use 250 kilometers of padding on each side of the map:

GeoSmoothHistogram[data,GeoRangePadding->(QuantityUnit[250])]

Specify padding for latitude only:

GeoSmoothHistogram[data,GeoRangePadding->{(QuantityUnit[250]),None}]

Specify different padding on each side of the map:

GeoSmoothHistogram[data,GeoRangePadding->{{None,(QuantityUnit[250])},{(QuantityUnit[300]),(QuantityUnit[350])}}]

Pad inward on each side:

GeoSmoothHistogram[data,GeoRangePadding->(QuantityUnit[-100])]

OpenersExampleSubsection14(Spacer1)GeoScaleBar  (1)

Show the plot with a scale bar in metric units:

data=GeoPosition[];

GeoSmoothHistogram[data,GeoScaleBar->"Metric"]

Show the plot with a scale bar in metric and imperial units:

GeoSmoothHistogram[data,GeoScaleBar->Placed[{"Imperial","Metric"},{Right,Top}]]

Place the scale bar in the top-right corner:

GeoSmoothHistogram[data,GeoScaleBar->Placed["Metric",{Right,Top}]]

OpenersExampleSubsection15(Spacer1)GeoServer  (1)

Use the Wolfram geo server to download map tiles:

data=GeoPosition[];

GeoSmoothHistogram[data,GeoServer->Automatic]

Use an alternative geo server:

GeoSmoothHistogram[data,GeoServer->"http://a.tile.openstreetmap.org/`1`/`2`/`3`.png"]

Specify explicitly some of the parameters of the tile server:

GeoSmoothHistogram[data,GeoServer->{"https://basemap.nationalmap.gov/arcgis/rest/services/USGSHydroCached/MapServer/tile/`1`/`3`/`2`","Projection"->"Mercator","TileSize"->256,"ZoomRange"->{1,18}}]

OpenersExampleSubsection16(Spacer1)GeoZoomLevel  (1)

Explicitly specify (RefLink[GeoZoomLevel, paclet:ref/GeoZoomLevel]) to obtain a lower-resolution map rendering:

data=GeoPosition[];

GeoSmoothHistogram[data,GeoZoomLevel->1]

Explicitly specify (RefLink[GeoZoomLevel, paclet:ref/GeoZoomLevel]) to obtain a higher-resolution map rendering:

GeoSmoothHistogram[data,GeoZoomLevel->9]

OpenersExampleSubsection17(Spacer1)LightingAngle  (1)

By default, the simulated lighting is placed at ((3π)/4), or the top-left corner, with altitude (π/4):

data=GeoPosition[];

GeoSmoothHistogram[data]

Place the light source at 180 °, or the left of the map:

GeoSmoothHistogram[data,LightingAngle->180°]

Place the light source at 0, or the right side of the map, with (π/12) altitude:

GeoSmoothHistogram[data,LightingAngle->{0,Pi/12}]

OpenersExampleSubsection18(Spacer1)Mesh  (1)

(RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram]) does not show a mesh by default:

data=GeoPosition[];

GeoSmoothHistogram[data]

Use 5 mesh lines in the z direction:

GeoSmoothHistogram[data,Mesh->5]

Use 3 mesh lines in the x direction and 6 mesh lines in the y direction:

GeoSmoothHistogram[data,Mesh->{3,6},MeshFunctions->{#1&,#2&}]

Show the complete sampling mesh:

GeoSmoothHistogram[data,Mesh->All]

OpenersExampleSubsection19(Spacer1)MeshFunctions  (1)

Use the z value as the mesh function:

data=GeoPosition[]

GeoSmoothHistogram[data,MeshFunctions->{#3&},Mesh->5]

Use mesh lines in the x and y directions:

GeoSmoothHistogram[data,MeshFunctions->{#1&,#2&},Mesh->{5,5}]

Use mesh lines corresponding to fixed distances from the mean:

GeoSmoothHistogram[data,MeshFunctions->{Norm[{#1,#2}-Mean[First[data]]]&},Mesh->5,AspectRatio->Automatic]

OpenersExampleSubsection20(Spacer1)MeshStyle  (1)

Use red mesh lines:

data=GeoPosition[];

GeoSmoothHistogram[data,MeshStyle->Red,Mesh->3]

OpenersExampleSubsection21(Spacer1)OpacityFunction  (1)

The (RefLink[Automatic, paclet:ref/Automatic]) setting creates a custom transparency in the smooth histogram over the map:

data=GeoPosition[];

GeoSmoothHistogram[data,OpacityFunction->Automatic,PlotLegends->Automatic]

Use (RefLink[None, paclet:ref/None]) to get a fully opaque visualization:

GeoSmoothHistogram[data,OpacityFunction->None]

Set opacity as a function (f^2) of the scaled function value f:

GeoSmoothHistogram[data,OpacityFunction->Function[f,f^2]]

Show the opacity at the plot legends:

GeoSmoothHistogram[data,OpacityFunction->Function[f,f^2],PlotLegends->Automatic]

OpenersExampleSubsection22(Spacer1)PlotLegends  (1)

Show a legend matching the colors to their values:

data=GeoPosition[];

GeoSmoothHistogram[data,PlotLegends->Automatic]

Position the legend below the map:

GeoSmoothHistogram[data,PlotLegends->Placed[Automatic,Below]]

OpenersExampleSubsection23(Spacer1)PlotPoints  (1)

Use more initial points to get a smoother plot:

data=GeoPosition[];

Table[GeoSmoothHistogram[data,Mesh->All, MaxRecursion->0,PlotPoints->pp],{pp,{5,10,15,20}}]

OpenersExampleSubsection24(Spacer1)PlotTheme  (1)

Use a theme with simple ticks and grid lines in a bright color scheme:

data=GeoPosition[];

GeoSmoothHistogram[data,PlotTheme->"Detailed"]

Change the color scheme:

GeoSmoothHistogram[data,PlotTheme->"Detailed", ColorFunction->"TemperatureMap"]

OpenersExampleSubsection25(Spacer1)RegionFunction  (2)

Limit the histogram to a region corresponding to an entity:

GeoSmoothHistogram[RandomGeoPosition[LinguisticAssistant,100],RegionFunction->LinguisticAssistant]

Use a function to limit the histogram according to the latitude:

GeoSmoothHistogram[RandomGeoPosition[LinguisticAssistant,100],RegionFunction->Function[{lat,lon},35<lat<45],GeoRange->LinguisticAssistant]

OpenersExampleSection3(Spacer1)Applications  (4)

Generate an intensity plot of the heights of notable buildings in New York City:

buildings=LinguisticAssistant;

GeoSmoothHistogram[EntityValue[buildings,"FloorCount","EntityAssociation"],ColorFunction->"Rainbow",PlotLegends->Automatic]

Show the intensity of the distribution of breweries in the United States:

data=GeoPosition[];

GeoSmoothHistogram[data]

Map the distribution of trees in Champaign, IL:

trees=GeoPosition[];

GeoSmoothHistogram[trees,ColorFunction->(RGBColor[0,0.8#,0,0.8#]&)]

Map a smooth histogram of the last 1000 registered meteorite landings in the world:

data=Take[SortBy[ResourceData["Meteorite Landings"],"Year"][[All,"Coordinates"]],-1000]

GeoSmoothHistogram[data,ColorFunction->"TemperatureMap",PlotLegends->Automatic,OpacityFunction->0.5,GeoProjection->"WinkelTripel"]

OpenersExampleSection4(Spacer1)Properties & Relations  (3)

Use (RefLink[GeoHistogram, paclet:ref/GeoHistogram]) to generate a density histogram plot of the geographic locations:

data=GeoPosition[];

GeoHistogram[data]

Compare with (RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram]):

GeoSmoothHistogram[data]

Use (RefLink[SmoothDensityHistogram, paclet:ref/SmoothDensityHistogram]) to generate a smooth density histogram plot of the geographic locations:

data=GeoPosition[];

SmoothDensityHistogram[First[data]]

Compare with (RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram]):

GeoSmoothHistogram[data]

(RefLink[GeoSmoothHistogram, paclet:ref/GeoSmoothHistogram]) shows a smoothed intensity of locations:

data=GeoPosition[];

GeoSmoothHistogram[data]

Use (RefLink[GeoListPlot, paclet:ref/GeoListPlot]) to show the actual locations:

GeoListPlot[data]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GeoHistogram, paclet:ref/GeoHistogram])  ▪  (RefLink[GeoListPlot, paclet:ref/GeoListPlot])  ▪  (RefLink[SmoothDensityHistogram, paclet:ref/SmoothDensityHistogram])  ▪  (RefLink[GeoRegionValuePlot, paclet:ref/GeoRegionValuePlot])  ▪  (RefLink[GeoBubbleChart, paclet:ref/GeoBubbleChart])  ▪  (RefLink[SmoothKernelDistribution, paclet:ref/SmoothKernelDistribution])  ▪  (RefLink[DensityHistogram, paclet:ref/DensityHistogram])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Maps & Cartography, paclet:guide/MapsAndCartography])}, {▪(RefLinkPlain[Geographic Visualization, paclet:guide/GeoVisualization])}, {▪(RefLinkPlain[Geographic Data & Entities, paclet:guide/GeographicData])}, {▪(RefLinkPlain[Data Visualization, paclet:guide/DataVisualization])}})}})