GeoHistogram

GeoHistogram[locs]

plots a density histogram of the geographic locations locs.

GeoHistogram[locs,bspec]

plots a density histogram with bins specified by bspec.

GeoHistogram[locs,bspec,hspec]

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:
  • ColorFunction Automatichow to color the plot
    ColorFunctionScaling Truewhether to scale the argument to ColorFunction
    LabelingFunction Automatichow to label bins
    LabelStyleAutomaticgraphics directives to determine style of labels
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    PlotLegends Nonehow the legend will appear
    PlotRangeClippingTruewhether to clip at the plot range
    PlotStyle Automaticgraphics 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.

Examples

open allclose all

Basic Examples  (3)

Generate a density histogram for a list of geographic points:

Use rectangular bins:

Use each country as a bin:

Color using the intensity rather than counts:

Scope  (26)

Data  (6)

Use a GeoPosition representing a list of locations:

Use a list of GeoPosition locations:

Use entities to represent locations:

Create a histogram from the EntityClass containing skyscrapers around the world:

Use an Association with locations for keys and values for counts:

Use WeightedData:

Bins and Counts  (14)

The number of bins is calculated automatically:

Specify the number of bins to use in the direction:

Specify the total number of bins to use:

Use rectangular and triangular bins:

Use 8 rectangular bins in the x axis:

Use 50 total triangular bins:

Use different automatic binning methods:

Specify the diameter of each tile:

Specify the width and height:

Give the area of the tiles:

A list of entities with polygons can be used as bin tiling:

Use GeoIdentify entity types as bins:

Use a function to get an explicit bin specification:

Coloring bins by "Count" or "Probability" only uses the number of points in each bin:

"Intensity" and "PDF" show variation due to the bins having different areas on the globe:

Presentation  (6)

Change the shape of the bin tiles:

Add a legend to the map:

Specify the color function used to indicate the density of values:

Vary the opacity:

Use GeoProjection to change the map projection:

Use GeoCenter to center the map on a specific location:

Use a theme with a simple background map:

Use a theme with a high contrast color scheme and bright colors:

Options  (22)

ColorFunction  (4)

By default, regions with a higher density of points are colored darker:

Specify the color function from a coloring scheme:

Specify a specific color function:

Use ColorFunctionScaling->False to get unscaled height values:

Use opacity to show relative densities:

ColorFunctionScaling  (1)

Use ColorFunctionScaling->False to get unscaled height values:

GeoBackground  (3)

By default, geo histograms are shown on an unlabeled map:

Show the histogram on a labeled map:

Show the histogram on a relief map:

GeoProjection  (1)

Use GeoProjection to change the map projection:

GeoRange  (4)

The geographic region to show is automatically determined:

Specify the region to show:

Use specific latitude-longitude ranges:

Show the entire world:

GeoScaleBars  (1)

Show the histogram with a scale bar in metric units:

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

Place the scale bar in the top-right corner:

LabelingFunction  (2)

By default, bins have a tooltip with their value:

Omit the tooltips from the bins:

PlotLegends  (3)

Show a legend matching the colors to their values:

Position the legend below the map:

Increase the font size on the legend:

PlotStyle  (2)

Vary the opacity of the bins:

Use Directive to combine effects:

PlotTheme  (1)

Use a theme with bright colors:

Use a satellite map for the background:

Applications  (5)

Plot the frequency of earthquakes around the world over 10 years:

Show the distribution of breweries in the United States:

Generate a density histogram of notable buildings in New York City:

Show the distributions of pictures taken during a hike:

Map the density of trees in Champaign, IL:

Properties & Relations  (9)

Use GeoSmoothHistogram to generate smooth densities from locations:

Use GeoListPlot for individual locations:

Use GeoHistogram to aggregate locations into bins:

Use GeoBubbleChart to show values with scaled bubbles:

Use GeoRegionValuePlot to show values with colored regions:

Use GeoVectorPlot and GeoStreamPlot for vector fields:

Draw contours on a map with GeoContourPlot:

Smoothly shade a map using color with GeoDensityPlot:

Plot relationships between geographic locations on a map:

Wolfram Research (2016), GeoHistogram, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoHistogram.html.

Text

Wolfram Research (2016), GeoHistogram, Wolfram Language function, https://reference.wolfram.com/language/ref/GeoHistogram.html.

CMS

Wolfram Language. 2016. "GeoHistogram." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GeoHistogram.html.

APA

Wolfram Language. (2016). GeoHistogram. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GeoHistogram.html

BibTeX

@misc{reference.wolfram_2022_geohistogram, author="Wolfram Research", title="{GeoHistogram}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/GeoHistogram.html}", note=[Accessed: 05-June-2023 ]}

BibLaTeX

@online{reference.wolfram_2022_geohistogram, organization={Wolfram Research}, title={GeoHistogram}, year={2016}, url={https://reference.wolfram.com/language/ref/GeoHistogram.html}, note=[Accessed: 05-June-2023 ]}