Skip to content

Commit 01cbbe5

Browse files
committed
DOCSP-2565: Scatter chart reference
1 parent bf0b2ac commit 01cbbe5

File tree

5 files changed

+132
-0
lines changed

5 files changed

+132
-0
lines changed
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
.. _scatter-chart-ref:
2+
3+
=======================
4+
Scatter Chart Reference
5+
=======================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
Overview
16+
--------
17+
18+
Scatter charts plot data with individual data points placed along the
19+
X and Y axes. Optionally, the data point representations may use shapes
20+
and colors to display additional data dimensions.
21+
22+
Scatter Chart Encoding Channels
23+
-------------------------------
24+
25+
Scatter charts provide the following :ref:`encoding channels
26+
<encoding-channels>`:
27+
28+
.. list-table::
29+
:header-rows: 1
30+
:widths: 20 80
31+
32+
* - Encoding Channel
33+
- Description
34+
35+
* - X / Y Axis
36+
- The X and Y axis encoding channels accept numerical and date
37+
fields and display the range of values from the field along the
38+
corresponding axis.
39+
40+
* - Size
41+
- *(Optional)* An :guilabel:`aggregation` encoding channel that
42+
changes the size of the data point markers, with larger sizes
43+
indicating larger aggregated values.
44+
45+
* - Color
46+
- *(Optional)* A :guilabel:`category` encoding channel that changes
47+
the color of the data point markers to indicate a corresponding
48+
data value. |charts| lists the colors used in a key to the right of
49+
the chart.
50+
51+
* - Shape
52+
- *(Optional)* A :guilabel:`category` encoding channel that changes
53+
the shape of the data point markers to indicate a corresponding
54+
data value. |charts| lists the shapes used in a key to the right of
55+
the chart.
56+
57+
Use Cases
58+
---------
59+
60+
Scatter charts are useful for representing numerical data and
61+
showing clearly how data points cluster together in certain areas.
62+
The :guilabel:`Size`, :guilabel:`Color`, and :guilabel:`Shape`
63+
encoding channels allow you to reveal
64+
additional trends for data dimensions with low cardinality.
65+
66+
.. tip::
67+
68+
A chart with many different colors or shapes may result in a
69+
cluttered visualization which is difficult to read. You can limit
70+
the number of categories in your chart by :ref:`binning
71+
<charts-bin-data>` or :ref:`limiting <charts-limit-data>` your data.
72+
73+
Scatter charts show an individual marker for each data point, so
74+
they work better with smaller result sets. Outliers and extreme data
75+
points are easy to identify.
76+
77+
Consider using a scatter chart to display:
78+
79+
- Temperature data for selected cities
80+
- Volume of sales data for selected retail outlets
81+
- Population density figures across several countries
82+
83+
Examples
84+
--------
85+
86+
AirBnB Rentals
87+
~~~~~~~~~~~~~~
88+
89+
The following scatter chart uses a database of information about
90+
AirBnB rental properties in Sydney, Australia. The X axis shows the
91+
review ratings given to individual properties, with the price per
92+
night displayed along the Y axis. The :ref:`query filter
93+
<charts-filter-documents>` restricts the result set to properties with
94+
at least 100 reviews.
95+
96+
The chart shows that lower-priced properties have a wider range of
97+
review scores, while higher-priced properties have a smaller score
98+
range with generally higher scores.
99+
100+
.. figure:: /images/charts/scatter-chart-airbnb.png
101+
:figwidth: 750px
102+
:alt: Scatter chart example
103+
104+
Movies with the Most Award Nominations
105+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106+
107+
The following more complex scatter chart uses a database with movie
108+
data compiled from IMDb and Rotten Tomatoes. The chart shows the
109+
TomatoMeter rating (ranging from 0 to 100) of movies with at least
110+
one award nomination. Each data point marker represents one movie.
111+
The X axis shows the movie's TomatoMeter rating and the Y axis shows
112+
the number of award nominations the movie received.
113+
114+
The :ref:`query filter <charts-filter-documents>` restricts the result
115+
set to exclude marginal data points.
116+
117+
The chart uses the :guilabel:`Color` and :guilabel:`Shape` encoding
118+
channels to shed further light on the types of movies which receive
119+
the most award nominations. The color of each data point shows the
120+
MPAA (Motion Picture Association of America) rating the movie received.
121+
The chart uses the Shape encoding channel to indicate the year in
122+
which the movie was released, and :ref:`bins <charts-bin-data>` the
123+
data to place each movie into a time range, with each bin covering
124+
25 years. Without the bins, there would be a different shape for every
125+
year, which would make the chart too noisy to read.
126+
127+
.. figure:: /images/charts/scatter-chart-movie-details.png
128+
:figwidth: 750px
129+
:alt: Scatter chart example

source/chart-types.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ Chart Types
1818
/chart-type-reference/column-bar-chart
1919
/chart-type-reference/line-area-chart
2020
/chart-type-reference/heatmap
21+
/chart-type-reference/scatter-chart
127 KB
Loading
Loading

source/includes/chart-type-ref-list.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ for each chart type in MongoDB Charts:
66
- :ref:`Line and Area Chart Reference <line-area-chart-ref>`
77

88
- :ref:`Heatmap Reference <heatmap-chart-ref>`
9+
10+
- :ref:`Scatter Chart Reference <scatter-chart-ref>`

0 commit comments

Comments
 (0)