plots a density histogram of the geographic locations locs.


plots a density histogram with bins specified by bspec.


plots a density histogram with bin densities computed according to the specification hspec.

Details and Options

  • GeoHistogram[locs] by default plots a histogram with hexagonal bins having equal visual size.
  • The location locs has the following forms and interpretations:
  • GeoPosition[]array of geodetic positions
    {loc1,loc2,}list of locations
    <|loc1w1,|>locations with weights
    WeightedData[]locations with weights
    EntityClass[]entities with locations according to the property "Position"
    EntityClass[]propentities with locations according to the property prop
  • The locations loci have the following forms:
  • GeoPosition[]latitude and longitude
    Entity[]an entity with a location according to the property "Position"
    Entity[]propan entity with a location according to the property prop
  • The following bin specifications bspec can be given:
  • Automaticautomatically chosen bins
    napproximately n bins wide
    Quantity[diam,unit]bins with approximate diameter diam
    {Quantity[w,unit],Quantity[h,unit]}bins with approximate width w and height h
    Quantity[area,unit]bins with approximate area area
    "Hexagon","Rectangle","Triangle"automatic bins with a given tile shape
    {reg1,reg2,}geographic regions
    enttypeGeoIdentify entity type
    {tile,spec}tile shapes with specification spec
    fbapply fb to get an explicit bin specification
  • The bin specification {tile,spec} can use any of the named tile shapes combined with the following specifications spec:
  • nn tiles wide
    {m,n}m tiles wide by n tiles high
    {"Total",n}approximately n tiles in total
    Quantity[diam,unit]diameter of the tile is approximately diam
    {Quantity[w,unit],Quantity[h,unit]}tiles are approximately w wide and h tall
    Quantity[area,unit]area of the tile is approximately area
  • The regi can be Entity objects such as countries corresponding to extended geographic regions or geometric constructs with GeoPosition coordinates.
  • The function fb in GeoHistogram[locs,fb] is applied to a list of all {lati,loni} and should return an explicit list of bins {reg1,reg2,}.
  • Different forms of density histogram can be obtained by giving different bin density specifications hspec in GeoHistogram[locs,bspec,hspec]. The following forms can be used:
  • "Count"number of elements in each bin
    "Probability"fraction of values lying in each bin
    "Intensity"counts divided by bin area
    "PDF"probability density function
    fhheights obtained by applying fh to bins and counts
  • The function fh in GeoHistogram[data,bspec,fh] is applied to two arguments: a list of bins {reg1,reg2,} and the corresponding list of counts {c1,c2,}. The function should return a list of densities to be used for each of the cij.
  • Density specifications that divide by the area of the bin use GeoArea and not the area of the projected regions.
  • GeoHistogram has the same options as GeoGraphics with the following additions and changes:
  • ColorFunctionAutomatichow to color the plot
    ColorFunctionScalingTruewhether to scale the argument to ColorFunction
    LabelingFunctionAutomatichow to label bins
    LabelStyleAutomaticgraphics directives to determine style of labels
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    PlotLegendsNonehow the legend will appear
    PlotRangeClippingTruewhether to clip at the plot range
    PlotStyleAutomaticgraphics directives to determine style of the plot
    PlotTheme$PlotThemeoverall theme for the plot
  • ColorFunction is supplied with a single argument, given by default by the scaled density values.


open allclose all

Basic Examples  (3)

Generate a density histogram for a list of geographic points:

Click for copyable input
Click for copyable input

Use rectangular bins:

Click for copyable input

Use each country as a bin:

Click for copyable input

Color using the intensity rather than counts:

Click for copyable input

Scope  (23)

Options  (19)

Applications  (4)

Properties & Relations  (1)

See Also

GeoRegionValuePlot  GeoListPlot  GeoBubbleChart  GeoGraphics  DynamicGeoGraphics  DensityHistogram  GeoIdentify  GeoNearest  GeoArea

Introduced in 2016