# Hexbin (Maps example)

> WestCoast Charts 1.1.5, release, public Core release, on npm. HTML: https://westcoast-charts.com/gallery/maps/hexbin/ · Index for agents: https://westcoast-charts.com/llms.txt

6 000 sample sightings binned into screen hexagons; size and colour follow the count.

- Chart type: `map` (Map)
- Collection: Maps · Maps
- Raw configuration: https://westcoast-charts.com/gallery-src/maps/hexbin.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/premium/maps/hexbin.html

## Setup

```js
import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'
import premium from 'west-coast-charts/premium'
import 'west-coast-charts/maps/world' // registers the map shapes

WestCoastCharts.use(types).use(premium)
const WestCoastChartsPremium = premium
WestCoastCharts.setLicenseKey(LICENCE_KEY) // paid production licence; localhost evaluation needs no key
```

## Options

Shortened: the full configuration (147 kB, mostly data) is at https://westcoast-charts.com/gallery-src/maps/hexbin.js.

```js
const options = {
  chart: {
    height: 480,
    toolbar: {
      show: false
    },
    type: "map"
  },
  series: [
    {
      name: "Sightings",
      type: "hexbin",
      data: [
        [30.12, -21.32],
        [-78.67, 47.08],
        [148.61, 33.75],
        [-74.45, 37.5],
        [109.47, 7.7],
        [67.67, 30.97],
        [-114.26, 29.74],
        [-2.15, 55.1],
        [87.29, 16.46],
        [-8.02, 59.93],
        [-120.09, 37.72],
        [-117.66, 28.65],
        [113.05, 39.91],
        [7.99, 46.21],
        [152.32, -35.96],
        [24.29, -26.82],
        [-68.08, 40.67],
        [24.23, -35.91],
        [119.29, 24.44],
        [167.35, -36.07],
        [-84.8, 49.75],
        [-58.42, -31.04],
        [-91.49, 15.22],
        [-76.88, 37.65],
        [32.22, -35.73],
        [128.57, 30.47],
        [143.98, 40.2],
        [130.23, 30.39],
        [16.25, -2.8],
        [47.24, 26.7],
        [64.78, 18.94],
        [119.14, 26.57],
        [142.47, -25.76],
        [-11.2, 43.65],
        [-49.74, -34.87],
        [-78.26, 37.92],
        [-59.43, -40.81],
        [87.31, 28.01],
        [49.42, 29.18],
        [14.86, 10.13],
        [-86.33, 36.85],
        [-12.19, 41.34],
        [-108.93, 25.49],
        [-80.09, 43.62],
        [-58.13, -37.23],
        [95.51, 6.24],
        [-69.41, -26.32],
        [1.98, 43.87],
        [-7.61, 37.05],
        [-60.36, 40.08],
        [142.53, 38.06],
        [5.23, 54.72],
        [11.04, 53.88],
        [128.58, 42.43],
        [-80.6, 30.99],
        [-1.93, 46.43],
        [-3.46, 44.99],
        [-62.48, 44.84],
        [138.9, 52.43],
        [1.01, 46.57],
        [72.09, 13.8],
        [136.9, 39.74],
        [-97.15, 25.33],
        [138.24, 43.51],
        [144.48, 36.94],
        [117.98, 26.82],
        [-2, 41.2],
        [110.7, -3.58],
        [72.33, 21.32],
        [2.8, 53.68],
        [28.8, -28.45],
        [51.76, 23.18],
        [108.87, 0.58],
        [146.9, -23.58],
        [123.8, 36.04],
        [-2.48, 55.18],
        [-3.82, 43.15],
        [1.69, 52.42],
        [162.42, -41.44],
        [-10.59, 46.98],
        [68.31, 36.66],
        [78.43, 22.12],
        [25.36, 55.8],
        [66.2, 15.84],
        [-7.27, 4.81],
        [-1.84, 41.48],
        [-48.9, -23.44],
        [-56.29, -30.61],
        [83.21, 32.53],
        [3.61, 52.23],
        [105.95, -5.24],
        [87.45, 25.13],
        [71.61, 21.75],
        [0.3, 47.89],
        [61.08, 22.71],
        [-38.24, -26.87],
        [48.49, 24.66],
        [100.11, 1.44],
        [58.59, 21.96],
        [144.55, 35.15],
        [78.79, 36.44],
        [-77.44, 53.48],
        [-77.76, 41.9],
        [-44.82, -24.1],
        [22.28, -32.42],
        [13.33, 52.12],
        [66.61, 25.26],
        [-122.67, 33.37],
        [-103.44, 18.74],
        [2.18, 7.84],
        [6.67, 49.98],
        [63.53, 22.53],
        [73.29, 19.58],
        [0.8, 51.87],
        [-94.9, 22.44],
        [140.3, 36.8],
        [-42.54, -13.48],
        [70.85, 25.03],
        [-46.31, -23.84],
        [-122.36, 39.88],
        [-108.35, 38.88],
        [140.54, 46.5],
        [-94.52, 21.01],
        [-105.87, 16.21],
        [80.61, 23.34],
        [80.76, 14.77],
        [-5.19, 6.62],
        [11.4, 8.96],
        [-48.39, -19.58],
        [-50.19, -37.76],
        [151.05, -29.08],
        [5.42, 1.53],
        [150.89, -40.19],
        [136.06, 46.09],
        [-124.39, 28.51],
        [49.36, 20.18],
        [-7.61, 2.78],
        [-77.58, 45.52],
        [6.88, 51.61],
        [-83.43, 22.54],
        [-79.05, 43.28],
        [-104.85, 25.03],
        [-103.96, 20.23],
        [80.48, 28.03],
        [-100.42, 20.38],
        [55.99, 25.68],
        [64.51, 14.67],
        [5.74, 38.88],
        [-92.22, 19.22],
        [-101.59, 18.01],
        [-87.54, 22.54],
        [-49.79, -31.6],
        [8.12, 50.47],
        [-60.87, -33.25],
        [66.68, 25.57],
        [-101.05, 25.39],
        [-117.02, 32.98],
        [9.86, 49.05],
        [107.23, 3.54],
        [148.03, -30.47],
        [143.46, -35.36],
        [124.45, 37.96],
        [-122.03, 30.48],
        [60.21, 24.91],
        [-50.86, -38.87],
        [-6.13, 43.95],
        [-75.47, 34.54],
        [128.17, 31.1],
        [-81.51, 45.9],
        [-2.04, -0.03],
        [-119.85, 28.19],
        [143.54, 40.55],
        [-83.25, 47.52],
        [-91.1, 37.06],
        [2.49, 51.85],
        [-59.99, -36.21],
        [62.49, 28.16],
        [132.16, 33.86],
        [51.15, 17.24],
        [132.37, 36.67],
        [27.18, -33.08],
        [-1.77, 37.44],
        [11.91, 44.19],
        [2.9, 56.79],
        [-65.71, -32.45],
        [4.56, 42.26],
        [-50, -23.49],
        [3.88, -25.66],
        [-71.24, 37.47],
        [-8.85, 50.21],
        [-36.93, -28.18],
        [64.02, 28],
        [71.71, 21.64],
        [-119.36, 39.93],
        [59.63, 19.85],
        [1.95, 51],
        [128.09, 42.16],
        [132.53, 30.93],
        [26.77, 52.29],
        [-116.65, 35.3],
        [-63.47, 35.24],
        [75.84, 30],
        [74.92, 20.46],
        [43.71, 21.61],
        [131.6, 34.23],
        [7.56, 46.46],
        [-66.79, -32.23],
        [131.62, 36.5],
        [-45.16, -24.56],
        [130.09, 29.63],
        [-78.56, 40.73],
        [-57.04, -34.32],
        [-34.97, -23.09],
        [-70.37, 34.48],
        [-65.38, 47.99],
        [6.13, 49.32],
        [-51.83, -30.81],
        [141.72, 40.6],
        [-56.81, -32.94],
        [74.13, 33.8],
        [76.39, 26.91],
        [150.31, -29.63],
        [20.82, 50.32],
        [14.77, 54.73],
        [-57.39, -25.86],
        [-58.15, -41.73],
        [14.23, 42.88],
        [97.78, -3.43],
        [66.55, 25.66],
        [134.41, 32.01],
        [65.52, 19.09],
        [-94.64, 40.77],
        [5.03, 38.73],
        [78.85, 22.87],
        [103.13, -0.63],
        [-2.01, 55.97],
        [77.44, 25.48],
        [36.21, -26.4],
        [-18.44, 55.55],
        [-1.71, 18.4],
        [126.23, 38.79],
        [-85.5, 37.65],
        [68.14, 14.09],
        [78.19, 21.1],
        [29.53, -30.33],
        [12.59, 50.42],
        [-83.42, 35.78],
        [78.86, 31.76],
        [3.47, 6.66],
        [-73.85, 30.39],
        [-40.04, -22.04],
        [0.3, 40.26],
        [100.58, 6.01],
        [4.15, 45.49],
        [64.99, 27],
        [13.34, 52.32],
        [-103.94, 17.7],
        [11.61, -20.37],
        [132.59, 41.72],
        [-92.72, 19.37],
        [-76.68, 35.11],
        [30.94, -22.37],
        [131.49, 34.96],
        [-79.84, 48.55],
        [-105.68, 15.39],
        [75.22, 16.06],
        [68.4, 25.55],
        [-75.43, 43.57],
        [118.42, 27.01],
        [-80.02, 31.86],
        [42.3, 24.74],
        [-67.27, -32.96],
        [-121.32, 27.84],
        [0.3, 49.75],
        [-54.13, -28.23],
        [72.97, 21.39],
        [-53.9, -31.1],
        [67.89, 25.86],
        [-78.93, 32],
        [113.59, -3.85],
        [51.7, 16.76],
        [-115.33, 37.56],
        [71.34, 37.16],
        [-75.25, 42.92],
        [28.74, -24.23],
        [127.93, 32.25],
        [-40.55, -26.89],
        [69.96, 23.64],
        [-82.42, 49.72],
        [111.85, 11.32],
        [-39.7, -24.79],
        [-2.84, 54.29],
        [132.65, 35.32],
        [157.24, -37.06],
        [62.39, 13.05],
        [-10.58, 36.74],
        [134.75, 28.84],
        [-82.55, 42.32],
        [114.27, 27.21],
        [58.71, 22.88],
        [69.3, 15.6],
        [54.15, 12.11],
        [-110.45, 22.28],
        [80.7, 18.16],
        [-49.39, -23.44],
        [-103.43, 20.12],
        [-60.16, -27.78],
        [138.47, 36.22],
        [8.49, 52.34],
        [-11.58, 3.02],
        [4.72, 47.05],
        [47.55, 20.49],
        [111.22, 32.57],
        [64.05, 31.98],
        [58.51, 24.71],
        [68.29, 27.61],
        [-48.84, -20.18],
        [0.76, 45.05],
        [4.89, 46.97],
        [7.85, 50.25],
        [-76.63, 39.11],
        [123.23, 31.66],
        [116.36, 31.87],
        [-62.87, -42.06],
        [73.35, 16.55],
        [9.55, 57.1],
        [-68.58, -39.19],
        [0.86, -0.96],
        [109.37, 37.06],
        [-70.98, -39.75],
        [9.44, 56.97],
        [0.25, 53.95],
        [-96.27, 17.83],
        [-97.93, 8.95],
        [71.56, 32.57],
        [128.7, 39.88],
        [-70.68, -34.2],
        [34.38, -21.29],
        [74.7, 28.87],
        [7.62, 11.75],
        [163.98, -36.1],
        [-7.51, 38.16],
        [-122.55, 33.4],
        [-0.81, 35.81],
        [59.15, 27.81],
        [87.02, 34.92],
        [-60.94, -33.08],
        [-107.4, 30.38],
        [-73.4, 43.81],
        [27.37, -27.79],
        [96.96, -5.96],
        [18.04, 50.52],
        [143.76, 32.13],
        [-100.58, 27.2],
        [-109.66, 34.68],
        [122.26, 33.7],
        [-115.84, 37.61],
        [21.03, -23.5],
        [-0.66, 10.29],
        [11.05, 47.55],
        [73.58, 18.23],
        [55.73, 24.47],
        [74.08, 7.48],
        [8.66, 57.68],
        [21.3, -26.75],
        [-102.89, 14.68],
        [-111.37, 19.24],
        [54.55, 25.31],
        [65.6, 25.81],
        [80.19, 28.49],
        [-43.53, -31.73],
        [-76.34, 44.22],
        [-53.49, -24.41],
        [114.84, 40.23],
        [-80.56, 47.96],
        [-49.95, -23.84],
        [-91.72, 42.18],
        [121.43, 39.02],
        [-5.76, 52.22],
        [-15.17, 51.49],
        [116.45, 7.16],
        [-80.34, 47],
        [-55.44, -23.22],
        [-57.01, -18.69],
        [0.83, 43.59],
        [150.06, -31.14],
        [-70.78, 38.1],
        [9.85, 50.15],
        [28.04, -24.88],
        [137.4, 25.34],
        [9.84, 44.87],
        [-12.27, 52.91],
        [52.48, 23.68],
        [72.64, 28.03],
        [11.86, 47.81],
        [125.51, 27.87],
        [19.79, 47],
        [127.84, 27.43],
        [170.29, -31.4],
        [-2.14, 10.11],
        [-5.26, 10.37],
        [159.17, -43.27],
        [12.56, 55.66],
        [-77.12, 43.81],
        [-43.61, -20.07],
        [-98.03, 45.62],
        [49.72, 32.05],
        [120.19, 34.08],
        [12.9, 57.81],
        [74.66, 27.54],
        [18.28, 54.83],
        [62.15, 25.11],
        [-57.31, 39.58],
        [113.54, 0.77],
        [76.62, 26.64],
        [-51.49, -40.02],
        [-82.5, 37.49],
        [132.32, 31.46],
        [-73.93, -33.36],
        [-109.88, 30.09],
        [-75.95, 38.66],
        [-97.48, 9.2],
        [-73.08, 42.94],
        [-1.93, 44.93],
        [68.18, 20.26],
        [-80.14, 44.97],
        [126.36, 43.55],
        [-79.51, 41.04],
        [61.32, 21.16],
        [-4.15, 49.24],
        [34.43, -29.27],
        [79.08, 20.93],
        [110.45, 27.5],
        [-11.56, 55.6],
        [-10.25, 50.29],
        [-42.48, -18.29],
        [4.1, 19.14],
        [-77.32, 50.46],
        [31.68, -30.07],
        [125.35, 46.51],
        [-125.55, 28.33],
        [145.46, -29.03],
        [-120.89, 35.44],
        [124.39, 34.58],
        [-50.42, -47.54],
        [58.86, 31.93],
        [78.23, 38.24],
        [104.36, 10.51],
        [3.86, -1.18],
        [-116.47, 34.77],
        [126.63, 31.4],
        [123.13, 30.54],
        [82.24, 34.92],
        [5.73, 43.64],
        [14.43, 46.79],
        [-104.61, 21.41],
        [3.69, 1.58],
        [127.43, 32.64],
        [80.76, 31.28],
        [24.84, 51.18],
        [-120.32, 28.99],
        [10.48, 57.63],
        [-78.99, 29.41],
        [-78.32, 42.92],
        [149.36, -24.83],
        [75.51, 18.3],
        [-3.46, 52.95],
        [67.27, 22.47],
        [36.35, -21.41],
        [81.15, 27.5],
        [-69.55, 37.03],
        [31.21, -23.52],
        [-85.53, 35.44],
        [28.01, -23.93],
        [2.53, 41.55],
        [-103.66, 14.2],
        [4, 56.17],
        [11.06, 54.47],
        [151.16, -28.03],
        [-9.79, 45.81],
        [154.08, -23.9],
        [143.59, 32.41],
        [165.64, -33.72],
        [139.58, 40.56],
        [-106.4, 12.14],
        [113.18, 34.1],
        [127.53, 34.99],
        [-1.51, 37.89],
        [9.6, 50.2],
        [-1.35, 33.83],
        [-99.84, 17.7],
        [-55.86, -29.47],
        [151.46, -32.49],
        [10.77, 48.65],
        [-71.53, 40.45],
        [8.16, 52.43],
        [146.21, -34.01],
        [124.43, 35.83],
        [56.32, 17.08],
        [-3.89, 41.29],
        [-73.41, 43.37],
        [54.96, 27.24],
        [-6.78, 42.87],
        [116.7, 32.11],
        [7.34, 46.46],
        [1.12, 54.54],
        [5.11, 46.54],
        [4.36, 50.2],
        [120.29, 34.83],
        [-73.48, 47.92],
        [-57.58, -32.31],
        [64.11, 22.85],
        [-68.54, 33.57],
        [150.28, 42.72],
        [116.92, 25.27],
        [133.2, 33.57],
        [-1.85, 55.6],
        [103.31, -3.75],
        [-1.82, 50.04],
        [27.63, -33.49],
        [77.59, 29.95],
        [107.39, 7.03],
        [117.63, 32.23],
        [-1.33, 49.54],
        [139.42, 32.51],
        [-5.88, 48.55],
        [126.92, 30.02],
        [-74.94, 39.69],
        [1.62, 13.65],
        [-73.01, 37.91],
        [-125.38, 24.88],
        [-5.17, 41.5],
        [141.49, 26.87],
        [104.21, 5.78],
        [-122.01, 35.07],
        [-109.89, 24.87],
        [17.28, -23.98],
        [-50.39, -24.04],
        [150.23, -32.53],
        [70.24, 28.11],
        [7.69, 42.28],
        [0.52, 35.4],
        [-114.31, 30.78],
        [121.73, 31.74],
        [107.58, 2.43],
        [14.61, 55.84],
        [0.61, 8.69],
        [-59.4, -27.83],
        [-11.23, 53.99],
        [41.54, 29.67],
        [142.63, -40.17],
        [-0.38, 54.98],
        [-97.68, 17.24],
        [124.99, 33.42],
        [23.11, -23.28],
        [4.82, 42.2],
        [9, 43.69],
        [17.03, 50.79],
        [70.48, 41.37],
        [120.8, 40.67],
        [-50.39, -39.89],
        [-4.36, 2.78],
        [106.5, -5.44],
        [1.32, 47.17],
        [151.47, -21.02],
        [9.6, 54.65],
  // ... truncated, use Copy or open the full config

const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render()
```

## Verify

- Text check (Library 1.1.5): load `west-coast-charts/agent/describe` and call `chart.describe({ format: "json" })` for the actual drawn state. The live reader is on this example’s HTML page.
- Command line (Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm, https://westcoast-charts.com/docs/cli/index.md): `wcc chart export maps-hexbin.json --out maps-hexbin.svg --with-table` (save the options above as JSON first)
