Monday, 6 July 2026

Visualizing Daily Trends with Calendar Heat Maps in Apache Superset

  

Understanding daily performance patterns becomes much easier when data is visualized in a calendar format. A calendar heat map is a powerful visualization that highlights trends, spikes, and anomalies over time using color intensity.

 

In tools like Apache Superset, you can build this visualization by combining SQL-based data aggregation with intuitive chart configuration.

 

In this example, we use a simple dataset:

date,total_sales
2026-05-04,3715
2026-05-03,20613
2026-05-02,20387
2026-05-01,22007
2026-04-30,19688
2026-04-29,18878

   

Here:

·      Each date is mapped to a calendar cell

·      Color intensity represents the total_sales value

·      Darker shades higher sales

·      Lighter shades lower sales

 

This makes it easy to:

 

·      Spot high-performing days instantly

·      Identify patterns across weeks or months

·      Detect anomalies (unexpected spikes or drops)

 

total_sales.csv

date,total_sales
2026-05-04,15176
2026-05-03,14037
2026-05-02,20609
2026-05-01,10597
2026-04-30,9332
2026-04-29,22553
2026-04-28,14708
2026-04-27,20538
2026-04-26,15299
2026-04-25,6256
2026-04-24,7590
2026-04-23,4508
2026-04-22,15210
2026-04-21,10017
2026-04-20,4094
2026-04-19,13284
2026-04-18,7504
2026-04-17,7181
2026-04-16,14577
2026-04-15,19681
2026-04-14,17298
2026-04-13,19448
2026-04-12,24847
2026-04-11,4667
2026-04-10,9923
2026-04-09,5017
2026-04-08,8748
2026-04-07,18582
2026-04-06,23967
2026-04-05,13623
2026-04-04,4047
2026-04-03,15825
2026-04-02,3506
2026-04-01,19134
2026-03-31,13207
2026-03-30,9345
2026-03-29,22934
2026-03-28,3318
2026-03-27,9002
2026-03-26,14859
2026-03-25,7395
2026-03-24,12257
2026-03-23,23930
2026-03-22,21616
2026-03-21,16477
2026-03-20,16357
2026-03-19,6127
2026-03-18,19478
2026-03-17,15645
2026-03-16,12582
2026-03-15,12312
2026-03-14,4660
2026-03-13,20074
2026-03-12,9805
2026-03-11,13394
2026-03-10,9282
2026-03-09,10339
2026-03-08,18367
2026-03-07,21616
2026-03-06,18267
2026-03-05,14756
2026-03-04,6905
2026-03-03,5144
2026-03-02,23502
2026-03-01,24504
2026-02-28,3951
2026-02-27,13680
2026-02-26,18539
2026-02-25,12767
2026-02-24,20307
2026-02-23,4962
2026-02-22,9851
2026-02-21,8105
2026-02-20,6604
2026-02-19,12420
2026-02-18,11080
2026-02-17,16121
2026-02-16,3539
2026-02-15,9854
2026-02-14,16080
2026-02-13,21291
2026-02-12,5323
2026-02-11,14721
2026-02-10,17404
2026-02-09,14862
2026-02-08,13984
2026-02-07,4946
2026-02-06,3101
2026-02-05,6319
2026-02-04,16671
2026-02-03,10039
2026-02-02,24969
2026-02-01,5024
2026-01-31,3847
2026-01-30,13375
2026-01-29,19680
2026-01-28,15713
2026-01-27,7576
2026-01-26,22144
2026-01-25,12967
2026-01-24,10584
2026-01-23,4341
2026-01-22,24664
2026-01-21,21675
2026-01-20,3501
2026-01-19,11417
2026-01-18,21005
2026-01-17,14897
2026-01-16,6546
2026-01-15,19124
2026-01-14,6848
2026-01-13,3328
2026-01-12,6234
2026-01-11,6587
2026-01-10,19786
2026-01-09,5333
2026-01-08,10527
2026-01-07,10196
2026-01-06,3380
2026-01-05,20118
2026-01-04,17817
2026-01-03,8396
2026-01-02,5270
2026-01-01,10166
2025-12-31,17075
2025-12-30,10556
2025-12-29,19915
2025-12-28,12871
2025-12-27,13864
2025-12-26,17713
2025-12-25,17830
2025-12-24,24051
2025-12-23,10241
2025-12-22,21301
2025-12-21,24802
2025-12-20,14629
2025-12-19,14311
2025-12-18,6886
2025-12-17,10192
2025-12-16,12472
2025-12-15,18832
2025-12-14,12568
2025-12-13,22583
2025-12-12,19393
2025-12-11,12100
2025-12-10,18799
2025-12-09,21902
2025-12-08,22519
2025-12-07,23015
2025-12-06,8854
2025-12-05,10991
2025-12-04,9335
2025-12-03,12594
2025-12-02,15771
2025-12-01,5898
2025-11-30,16325
2025-11-29,15905
2025-11-28,15318
2025-11-27,24109
2025-11-26,23444
2025-11-25,7105
2025-11-24,11532
2025-11-23,13622
2025-11-22,19457
2025-11-21,3982
2025-11-20,10999
2025-11-19,6779
2025-11-18,6507
2025-11-17,9222
2025-11-16,4591
2025-11-15,10487
2025-11-14,6299
2025-11-13,16057
2025-11-12,7134
2025-11-11,21569
2025-11-10,17345
2025-11-09,9932
2025-11-08,8347
2025-11-07,5524
2025-11-06,5130
2025-11-05,12200
2025-11-04,22907
2025-11-03,13561
2025-11-02,6659
2025-11-01,8359
2025-10-31,8574
2025-10-30,14179
2025-10-29,6748
2025-10-28,18212
2025-10-27,7469
2025-10-26,3185
2025-10-25,6297
2025-10-24,6290
2025-10-23,23251
2025-10-22,15195
2025-10-21,7871
2025-10-20,23527
2025-10-19,5811
2025-10-18,23881
2025-10-17,7753
2025-10-16,13395
2025-10-15,14700
2025-10-14,24643
2025-10-13,18079
2025-10-12,7317
2025-10-11,22579
2025-10-10,17406
2025-10-09,13088
2025-10-08,16051
2025-10-07,10224
2025-10-06,13669
2025-10-05,6088
2025-10-04,10679
2025-10-03,4727
2025-10-02,8466
2025-10-01,5008
2025-09-30,18693
2025-09-29,8010
2025-09-28,11101
2025-09-27,23237
2025-09-26,4168
2025-09-25,20539
2025-09-24,3895
2025-09-23,23254
2025-09-22,24337
2025-09-21,6050
2025-09-20,7744
2025-09-19,9032
2025-09-18,24341
2025-09-17,18262
2025-09-16,22982
2025-09-15,15188
2025-09-14,11058
2025-09-13,19548
2025-09-12,24160
2025-09-11,9669
2025-09-10,20719
2025-09-09,14172
2025-09-08,14922
2025-09-07,9792
2025-09-06,14180
2025-09-05,5623
2025-09-04,7094
2025-09-03,4183
2025-09-02,17626
2025-09-01,13831
2025-08-31,23503
2025-08-30,6023
2025-08-29,18802
2025-08-28,13143
2025-08-27,15973
2025-08-26,14279
2025-08-25,23333
2025-08-24,24380
2025-08-23,7860
2025-08-22,23095
2025-08-21,9179
2025-08-20,8007
2025-08-19,22794
2025-08-18,14845
2025-08-17,8903
2025-08-16,11301
2025-08-15,22432
2025-08-14,9348
2025-08-13,22301
2025-08-12,17309
2025-08-11,18981
2025-08-10,18905
2025-08-09,6860
2025-08-08,10833
2025-08-07,11282
2025-08-06,22708
2025-08-05,14105
2025-08-04,21520
2025-08-03,21070
2025-08-02,9100
2025-08-01,17156
2025-07-31,21817
2025-07-30,3186
2025-07-29,14879
2025-07-28,11034
2025-07-27,4559
2025-07-26,22896
2025-07-25,16606
2025-07-24,5406
2025-07-23,18479
2025-07-22,12222
2025-07-21,11919
2025-07-20,18080
2025-07-19,3616
2025-07-18,5667
2025-07-17,24047
2025-07-16,5487
2025-07-15,11684
2025-07-14,12792
2025-07-13,19805
2025-07-12,7536
2025-07-11,17329
2025-07-10,14748
2025-07-09,22054
2025-07-08,3884
2025-07-07,9638
2025-07-06,5254
2025-07-05,17842
2025-07-04,15967
2025-07-03,8316
2025-07-02,12613
2025-07-01,20922
2025-06-30,5676
2025-06-29,18235
2025-06-28,24299
2025-06-27,10686
2025-06-26,16043
2025-06-25,16636
2025-06-24,7600
2025-06-23,19964
2025-06-22,8960
2025-06-21,12337
2025-06-20,10574
2025-06-19,4439
2025-06-18,7567
2025-06-17,8201
2025-06-16,20760
2025-06-15,19859
2025-06-14,11917
2025-06-13,13072
2025-06-12,4105
2025-06-11,13838
2025-06-10,23985
2025-06-09,15346
2025-06-08,18547
2025-06-07,10276
2025-06-06,12161
2025-06-05,11301
2025-06-04,8094
2025-06-03,11943
2025-06-02,18827
2025-06-01,12618
2025-05-31,11039
2025-05-30,19041
2025-05-29,21782
2025-05-28,19949
2025-05-27,6922
2025-05-26,21304
2025-05-25,12954
2025-05-24,4736
2025-05-23,20587
2025-05-22,4023
2025-05-21,19094
2025-05-20,14209
2025-05-19,20956
2025-05-18,20470
2025-05-17,6719
2025-05-16,23956
2025-05-15,23894
2025-05-14,15551
2025-05-13,17161
2025-05-12,18414
2025-05-11,9063
2025-05-10,14572
2025-05-09,13209
2025-05-08,5751
2025-05-07,11927
2025-05-06,15636
2025-05-05,20031

   

Follow below step-by-step procedure to build the Calendar Heat Map.

 

Step 1: Upload total_sales.csv file.

Data -> Upload CSV to database

 


·      Upload CSV file

·      Select Database, Schema name where you want to import this csv file

·      Give table name as sales_by_day

 

In columns sections, keep the datatypes as {"date": "datetime64[ns]", "total_sales": "int64"}

 


Click on Upload button.

 

Once data is uploaded successfully, navigate to Datasets listing page, you can see that the dataset ‘total_sales_by_day’ is listed there.

 


Step 2: Create chart

Navigate to Charts listing page.

 


Click on + Chart button to create new chart.

 


Select the dataset as ‘sales_by_day’, chart as ‘Calendar Heatmap’, click on Create new chart button.

 

You will be taken to the chart configuration page.

 


Drag and drop total_sales column to Metrics section.

 

Keep aggregate function as SUM.

 

Click on Save button.

 

Click on the 'Time Range' input box and choose some custom time range.

 


Click on APPLY button.

 

Click on ‘Create chart’ button. You can observe that the Calendar Heat Map rendered like below.

 


When you hover on any square box, you can see the labels associated with it.

 

But in light mode, tootip always shows empty, there is a open bug for this: https://github.com/apache/superset/issues/37991. Switch to dark mode and hover on any square box, you can see the day and corresponding sales data.

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment