Skip to content

Commit c234c8a

Browse files
steverenjeff-allen-mongo
authored andcommitted
DOCSP-4345: [Charts] As an author, I can create a geo heatmap (#140)
* DOCSP-4345: [Charts] As an author, I can create a geo heatmap
1 parent 4fedeef commit c234c8a

File tree

8 files changed

+8676
-5
lines changed

8 files changed

+8676
-5
lines changed

backups/charts-DOCSP-4581.json

Lines changed: 3502 additions & 0 deletions
Large diffs are not rendered by default.

backups/charts-v0.11.json

Lines changed: 5089 additions & 0 deletions
Large diffs are not rendered by default.

source/chart-type-reference/geo-spatial.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ Placeholder description for the Geospatial chart type.
1919
.. toctree::
2020
:titlesonly:
2121

22-
.. sub-pages toc goes here
22+
/chart-type-reference/geospatial-heatmap
2323

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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.

source/chart-type-reference/heatmap.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,7 @@ Heatmaps provide the following :ref:`encoding channels
3838
along the Y axis for each unique value in this field.
3939

4040
* - Intensity
41-
- An :guilabel:`aggregation` encoding channel that changes the
42-
shading of the matrix elements to reflect the aggregated value
43-
of this field. Darker colors in the visualization reflect
44-
greater aggregated values.
41+
- .. include:: /includes/intensity-definition.rst
4542

4643
.. note::
4744

source/chart-types.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,4 @@ Text Charts
8383
/chart-type-reference/grid-charts
8484
/chart-type-reference/donut-chart
8585
/chart-type-reference/text-charts
86+
/chart-type-reference/geo-spatial
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
An :guilabel:`aggregation` encoding channel that changes the
2+
shading of the colors in different chart regions to reflect the
3+
aggregated values of this field. More intense colors in the
4+
visualization reflect greater aggregated values.

0 commit comments

Comments
 (0)