A histogram shows how quantitative values are distributed by grouping data points into bins and representing each bin with a frequency-scaled rectangle. section 6.0 section 6.2
Build a histogram by following this implementation sequence:
- Preprocess the dataset with d3.bin(), producing equal-width bins with lower and upper boundaries. section 6.0 section 6.6
- Create linear x and y scales: x positions rectangles between bin boundaries, while y maps frequencies from zero to the tallest bin. section 6.2
Salary distribution
A salary histogram uses each rectangle for a salary bracket. Rectangle width follows the bin boundaries, and rectangle height follows the number of respondents in that bracket, revealing concentrations and gaps. section 6.2
Updating filtered data
When a user selects All, Women, or Men, filter the dataset, regenerate its bins, and update each rectangle’s y and height attributes. section 7.2.3










