Preparing the Stacked Bar Chart

For this project, we're going to start working on a stacked bar chart that displays the population of each state.

The next project we are going to start drawing is a stacked bar chart. Bar charts are a popular type of visualization. They are not to be confused with histograms.

Histograms vs. bar charts

There is a difference between the two. Both charts use bars to represent data. They both have an x-axis and a y-axis.

Histograms show the frequency of data. We saw an example of a histogram when we drew different types of weather data. Each bar did not represent a single value. Instead, the bars represented the frequency of values within a given range.

Bar charts are different because each bar represents one value. By representing one value, we can compare data easily. Here is a great article that details the differences between the two types of visualizations:

https://keydifferences.com/difference-between-histogram-and-bar-graph.html

For this example, we are going to create a variation of a bar chart. We are going to draw a stacked bar chart. A stacked bar chart is when the bars are stacked over one another. They allow us to break down data further into multiple categories. Let’s look at what we will be drawing in this example.

Starter project

Here is the starter project we’ll be working with.

Get hands-on with 1400+ tech skills courses.