Codecademy Logo

Visualizing Data

Print Cheatsheet

Pie Chart Pitfalls

Pie Charts have two common pitfalls:

  • It can be difficult for viewers to compare sector sizes within the chart.
  • If a pie chart contains too many sectors, it is difficult for a viewer to decipher any useful information.

If you ever run into this issue, a bar chart may be the best solution. The picture comparing pie charts and bar charts shows why.

With each pie chart, it is almost impossible to compare separate sectors. However, the bar chart makes the comparisons much easier to decipher.

A picture that shows pie charts and bar charts displaying the same data. In the pie charts, the sectors are almost impossible to compare, while in the bar charts, it is easy to compare categories.

Visualizing Categorical Data

Bar Charts and Pie Charts are used to visualize categorical data. Both types of graphs contain variations as displayed in the visual.

This image shows different variants of bar charts and pie charts.

Line charts and sparklines

A line chart or sparkline is useful for analyzing trends in data over time.

A line chart of the total number of vehicles produced for five vehicle types.


A scatterplot visually represents connections between two numeric variables.

A scatterplot of household income versus housing price, showing that as income increases, so too in general does housing price.

Visualizing data in Excel

Excel can create column (or bar) charts, histograms, scatterplots, line charts, and pie charts from a table of data.

Cell Rules in Excel

Excel can color tables using one color for data within an acceptable range and another for data outside an acceptable range.

Color Scales in Excel

Excel can color tables of numeric data using darker shades for larger numbers and lighter shades for smaller numbers (a heatmap or color scale).

A table of average miles-per-gallon with the smaller values red and larger values green.