Understanding the Problem
Explore how to identify and address data formatting problems in histograms. Understand why raw data needs grouping into frequency bins, and discover how D3's bin function helps format data correctly for meaningful histogram visualization.
We'll cover the following...
In this lecture, we are going to talk about the issue with our chart. Presently, there are 365 bars in the chart.
Some of them overlap one another. That is not necessarily the problem. The problem is that each bar represents one value. Histograms are not charts that display a single value. The goal of a histogram is to show frequency within a dataset.
Let’s look at our dummy example to understand how a histogram works again.
[10, 10, 10, 10, 30, 50, 50, 80, 80, 100]
In this example, we have an array of ten numbers ranging from 10 to 100.
A histogram will show how many times a number appears within a range. The ranges are written on the x-axis. The first bar is for the ...