Using color

Entendendo a visualização de dados

Richie Cotton

Data Evangelist at DataCamp

Colorspaces: Red-Green-Blue

shutterstock_1622648830.jpg

Entendendo a visualização de dados

Colorspaces: Cyan-Magenta-Yellow-blacK

shutterstock_505703968.jpg

Entendendo a visualização de dados

Choosing a plotting palette

Scatter plott of price vs area with a bad color palette

  • Usually, each color should stand out as much as other colors.
  • The perceptual distance from one color in the plot to the next should be constant.
Entendendo a visualização de dados

Colorspaces: Hue-Chroma-Luminance

Hue color swatch

Entendendo a visualização de dados

Colorspaces: Hue-Chroma-Luminance

Chrome and luminance color swatches

Entendendo a visualização de dados

Colorspaces: Hue-Chroma-Luminance

Hue, chrome, and luminance color swatches

Entendendo a visualização de dados

Three types of color scale: qualitative

Type Purpose What to vary
qualitative Distinguish unordered categories hue

Color swatch for qualitative data

Entendendo a visualização de dados

Qualitative palette example

A line plot of technology adoption by households in the United States. The x-axis runs from 1930 to 1970, and the y-axis runs from 0 to 100 percent. There are four lines representing adoption of automobiles, refrigerators, stoves, and vacuums.

Entendendo a visualização de dados

Three types of color scale: sequential

Type Purpose What to vary
sequential Show ordering chroma or luminance

Swatch for sequential color scale

Entendendo a visualização de dados

Sequential palette example

Bar plot of vegetable consumption by year

Entendendo a visualização de dados

Another sequential palette example

Scatter plot of length of schooling versus GNI and average life expectancy represented by color

1 Viridis color scale: https://bids.github.io/colormap
Entendendo a visualização de dados

Three types of color scale: diverging

Type Purpose What to vary
diverging Show above or below a midpoint chroma or luminance, with 2 hues

Color swatch for diverging data

Entendendo a visualização de dados

Green Tech in Malaysia survey dataset

question response n
Uses reliable and repairable Strongly Disagree 4
Uses reliable and repairable Disagree 8
Uses reliable and repairable Neutral 37
Uses reliable and repairable Agree 52
Uses reliable and repairable Strongly Agree 26
... ... ...
1 Islam et al. (2019) http://dx.doi.org/10.17632/wggvryfhsk.1
Entendendo a visualização de dados

Diverging palette example

Bar plot of likert survey

Entendendo a visualização de dados

Let's practice!

Entendendo a visualização de dados

Preparing Video For Download...