|
| 1 | +================== |
| 2 | +Geospatial Heatmap |
| 3 | +================== |
| 4 | + |
| 5 | +.. default-domain:: mongodb |
| 6 | + |
| 7 | +.. contents:: On this page |
| 8 | + :local: |
| 9 | + :backlinks: none |
| 10 | + :depth: 1 |
| 11 | + :class: singlecol |
| 12 | + |
| 13 | +Overview |
| 14 | +-------- |
| 15 | + |
| 16 | +Geospatial heatmap charts are useful for displaying how |
| 17 | +geographical areas of a map compare to one another based on a given |
| 18 | +criterion. |
| 19 | + |
| 20 | +.. note:: |
| 21 | + |
| 22 | + Heatmap charts can use a maximum of 10,000 documents. If you |
| 23 | + create a heatmap with a collection of more than 10,000 |
| 24 | + documents, turn on :ref:`Sample Mode <charts-sample-mode>` or use a |
| 25 | + :ref:`filter <charts-filter-documents>`. Otherwise, your chart may |
| 26 | + use incomplete or misleading data. |
| 27 | + |
| 28 | +To create a geospatial heatmap chart: |
| 29 | + |
| 30 | +1. On the chart editing screen, select :guilabel:`Geospatial` from |
| 31 | + the :guilabel:`Chart Type` dropdown menu. |
| 32 | + |
| 33 | +#. Select :guilabel:`Heatmap` from the three available geospatial |
| 34 | + chart types. |
| 35 | + |
| 36 | +Encoding Channels |
| 37 | +----------------- |
| 38 | + |
| 39 | +Coordinates |
| 40 | +~~~~~~~~~~~ |
| 41 | + |
| 42 | +A :guilabel:`geopoint` encoding channel which defines the map |
| 43 | +area of the chart. See the :ref:`Geopoint <geopoint>` reference page |
| 44 | +for more information about what types of data you can use in this |
| 45 | +channel. |
| 46 | + |
| 47 | +Intensity |
| 48 | +~~~~~~~~~ |
| 49 | + |
| 50 | +.. include:: /includes/intensity-definition.rst |
| 51 | + |
| 52 | +In geospatial heatmaps, values are aggregated within the radius |
| 53 | +specified in the :doc:`customization </customize-charts>` tab. |
| 54 | +Radius is measured in pixels, and defaults to ``30``. For example: |
| 55 | +if ten data points exist within the specified radius, the color |
| 56 | +displayed is based on the aggregated value of those ten data points. |
| 57 | + |
| 58 | +.. note:: |
| 59 | + |
| 60 | + Intensity shading is local to the map's current view. The most |
| 61 | + intense color is displayed for the most extreme aggregated values |
| 62 | + currently visible on the map, even if there are points outside the |
| 63 | + current view that are more extreme. |
| 64 | + |
| 65 | +Example |
| 66 | +------- |
| 67 | + |
| 68 | +The following chart is based on AirBnB data for the Seattle area. It |
| 69 | +shows rental rate hot spots in a geospatial heatmap. |
| 70 | + |
| 71 | +.. figure:: /images/charts/seattle-airbnb-geospatial-heatmap.png |
| 72 | + :figwidth: 760px |
| 73 | + :alt: Geospatial heatmap example |
| 74 | + |
| 75 | +The :guilabel:`Coordinates` channel uses the ``location`` database |
| 76 | +field, which contains arrays of latitude-longitude pairs. The |
| 77 | +:guilabel:`Intensity` field uses the ``monthly_price`` database field, |
| 78 | +which contains monthly rental rates for each property in the database. |
0 commit comments