Tuesday, 7 July 2026

Creating Histogram Charts in Apache Superset for Distribution Analysis

  

A histogram is a type of chart used to show the distribution of numerical data. Instead of displaying individual values, a histogram groups data into ranges called bins and shows how many values fall into each range.

 

For example, if you have product prices: 10, 15, 18, 22, 25, 27, 35 and 42. A histogram might group them like below.

 

Price Range (Bin)

Number of Products

0-10

1

11-20

2

21-30

3

31-40

1

41-50

1

 

The chart then displays vertical bars for each range.

 

Unlike a bar chart:

·      Bar charts compare categories.

·      Histograms show how continuous numerical values are distributed.

 

Histograms are excellent for identifying:

·      Most common value ranges: Most products priced between $20–$30.

·      Data concentration: Where values are clustered.

·      Spread of data: Whether values are widely distributed or tightly grouped.

·      Skewness: Whether values lean toward higher or lower ranges.

·      Outliers: Extremely high or low values.

·      Distribution shape: Normal distribution, uniform distribution, bimodal patterns, etc.

 

product_prices.csv

product_id,category,price
1,Electronics,45
2,Electronics,55
3,Electronics,60
4,Electronics,62
5,Electronics,68
6,Electronics,72
7,Electronics,75
8,Electronics,80
9,Electronics,85
10,Electronics,90
11,Electronics,95
12,Electronics,100
13,Electronics,105
14,Electronics,110
15,Electronics,120
16,Electronics,130
17,Electronics,140
18,Electronics,150
19,Electronics,160
20,Electronics,170
21,Furniture,35
22,Furniture,40
23,Furniture,42
24,Furniture,48
25,Furniture,52
26,Furniture,58
27,Furniture,63
28,Furniture,66
29,Furniture,70
30,Furniture,74
31,Furniture,79
32,Furniture,82
33,Furniture,88
34,Furniture,92
35,Furniture,97
36,Furniture,102
37,Furniture,108
38,Furniture,115
39,Furniture,125
40,Furniture,135
41,Clothing,15
42,Clothing,18
43,Clothing,20
44,Clothing,22
45,Clothing,25
46,Clothing,28
47,Clothing,30
48,Clothing,32
49,Clothing,35
50,Clothing,38
51,Clothing,40
52,Clothing,42
53,Clothing,45
54,Clothing,48
55,Clothing,50
56,Clothing,52
57,Clothing,55
58,Clothing,58
59,Clothing,60
60,Clothing,65
61,Grocery,5
62,Grocery,6
63,Grocery,7
64,Grocery,8
65,Grocery,9
66,Grocery,10
67,Grocery,11
68,Grocery,12
69,Grocery,13
70,Grocery,14
71,Grocery,15
72,Grocery,16
73,Grocery,17
74,Grocery,18
75,Grocery,19
76,Grocery,20
77,Grocery,21
78,Grocery,22
79,Grocery,23
80,Grocery,24
81,Toys,12
82,Toys,14
83,Toys,16
84,Toys,18
85,Toys,20
86,Toys,22
87,Toys,24
88,Toys,26
89,Toys,28
90,Toys,30
91,Toys,32
92,Toys,34
93,Toys,36
94,Toys,38
95,Toys,40
96,Toys,42
97,Toys,44
98,Toys,46
99,Toys,48
100,Toys,50
101,Sports,55
102,Sports,60
103,Sports,65
104,Sports,70
105,Sports,75
106,Sports,80
107,Sports,85
108,Sports,90
109,Sports,95
110,Sports,100
111,Sports,110
112,Sports,120
113,Sports,130
114,Sports,140
115,Sports,150
116,Sports,160
117,Sports,170
118,Sports,180
119,Sports,190
120,Sports,200

   

Follow below step-by-step procedure to build Histogram.

 

Step 1: Create product_prices dataset.

 

Data -> Upload CSV to database

 


Upload the csv file

Choose the database and schema where you want to upload the file

Give table name as product_prices

 


Click on Upload button.

 

Navigate to Datasets listing page, you can able to see product_prices dataset.

 


Step 2: Create Histogram chart.

 

Click on product_prices dataset, you will be take to chart overview page.

 


Click on View all charts link.

 


Select Histogram.

 

Drag and drop the price column to Query -> Column.

 


Click on Create chart button, you can able to see Histogram like below.

 


You can customize the number of bins. For example, when I set the number of bins to 15, the chart is updated like below.

 

Navigate to Customize tab -> set X-Axis and Y-axis titles.

 


That’s it, you're good to go.

 

 

  

Previous                                                    Next                                                    Home

No comments:

Post a Comment