Generate Heatmaps Automatically Using AI

Tested prompts for ai heatmap generator compared across 5 leading AI models.

BEST BY JUDGE SCORE GPT-5.4 8/10

The prompt we tested

You are an AI heatmap generator. Analyze the dataset or scenario provided and produce a clear, accurate heatmap representation with supporting insights.

Instructions: Output in this exact order: Parsed Data Table, ASCII Heatmap with legend, Key Insights (bulleted, 3-5 points), and Python Code block. Use a 5-level intensity scale (·░▒▓█) mapped to quintiles of the data, keep the visualization under 80 characters wide, and ensure the Python code is runnable with clearly defined variables.

Data / Scenario:
Weekly website traffic by hour and day for the past week. Monday-Sunday rows, hours 0-23 columns. Peak traffic around 9am and 2pm weekdays, very low traffic 1am-5am. Sample values: Mon 9am=1200, Mon 2pm=1450, Mon 3am=45, Sat 11am=890, Sun 8pm=670.

Generate the heatmap now, including: (1) a parsed data table, (2) an ASCII/Unicode heatmap visualization using color-intensity blocks (░▒▓█) or a gradient legend, (3) axis labels and a value-to-intensity legend, (4) 3-5 key insights highlighting hotspots, coldspots, and patterns, and (5) ready-to-use Python code (matplotlib/seaborn) that reproduces the heatmap from the data.

Model comparison

ModelQualityCostLatencyTokens
Claude Opus 4.7 6 $0.1608 23.5s 481 / 2048
Claude Haiku 4.5 7 $0.0106 13.7s 334 / 2048
GPT-5.4 8 $0.0315 25.4s 300 / 2048
Grok 4.1 Fast Reasoning 7 $0.0009 91.2s 441 / 1563

Outputs

Claude Opus 4.7 6/10
# Weekly Website Traffic Heatmap

## 1. Parsed Data Table

Synthesized hourly traffic (visits) anchored on given samples: Mon 9am=1200, Mon 2pm=1450, Mon 3am=45, Sat 11am=890, Sun 8pm=670.

| Day | 0  | 1  | 2  | 3  | 4  | 5  | 6   | 7   | 8    | 9    | 10   | 11   | 12   | 13   | 14   | 15   | 16   | 17   | 18  | 19  | 20  | 21  | 22  | 23  |
|-----|----|----|----|----|----|----|-----|-----|------|------|------|------|------|------|------|------|------|------|-----|-----|-----|-----|-----|-----|
| Mon | 80 | 55 | 48 | 45 | 50 | 90 | 300 | 650 | 1050 | 1200 | 1150 | 1050 | 980  | 1150 | 1450 | 1380 | 1200 | 950  | 720 | 560 | 480 | 360 | 240 | 140 |
| Tue | 85 | 58 | 50 | 46 | 52 | 95 | 310 | 660 | 1080 | 1220 | 1170 | 1080 | 1000 | 1170 | 1470 | 1400 | 1220 | 970  | 730 | 570 | 490 | 370 | 245 | 145 |
| Wed | 82 | 56 | 49 | 45 | 51 | 92 | 305 | 655 | 1060 | 1210 | 1160 | 1060 | 990  | 1160 | 1460 | 1390 | 1210 | 960  | 725 | 565 | 485 | 365 | 242 | 142 |
| Thu | 88 | 60 | 52 | 48 | 54 | 98 | 315 | 670 | 1090 | 1230 | 1180 | 1090 | 1010 | 1180 | 1480 | 1410 | 1230 | 980  | 740 | 580 | 500 | 380 | 250 | 150 |
| Fri | 90 | 62 | 54 | 50 | 56 |100 | 320 | 680 | 1100 | 1240 | 1190 | 1100 | 1020 | 1190 | 1490 | 1420 | 1240 | 990  | 760 | 610 | 540 | 420 | 280 | 170 |
| Sat |180 |120 | 80 | 60 | 55 | 70 | 150 | 350 | 600  | 820  | 870  | 890  | 860  | 830  | 800  | 780  | 760  | 720  | 680 | 640 | 600 | 540 | 420 | 260 |
| Sun |200 |130 | 85 | 62 | 58 | 72 | 140 | 320 | 560  | 780  | 830  | 850  | 820  | 790  | 760  | 740  | 720  | 690  | 680 | 675 | 670 | 580 | 450 | 280 |

## 2. ASCII Heatmap

Quintile thresholds (approx.): Q1≤95, Q2≤500, Q3≤780, Q4≤1110, Q5>1110

Legend:  `·` very low  `░` low  `▒` medium  `▓` high  `█` peak

```
       Hour: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
       -----------------------------------------------------------------
       Mon | · · · · · · ░ ▒ ▓ █ ▓  ▓  ▓  █  █  █  █  ▓  ▒  ▒  ░  ░  ░  ░
       Tue | · · · · · · ░ ▒ ▓ █ ▓  ▓  ▓  █  █  █  █  ▓  ▒  ▒  ░  ░  ░  ░
       Wed | · · · · · · ░ ▒ ▓ █ ▓  ▓  ▓  █  █  █  █  ▓  ▒  ▒  ░  ░  ░  ░
       Thu | · · · · · · ░ ▒ ▓ █ ▓  ▓  ▓  █  █  █  █  ▓  ▒  ▒  ▒  ░  ░  ░
       Fri | · · · · · █ ░ ▒ ▓ █ ▓  ▓  ▓  █  █  █  █  ▓  ▒  ▒  ▒  ░  ░  ░
       Sat | ░ ░ · · · · ░ ░ ▒ ▓ ▓  ▓  ▓  ▓  ▓  ▓  ▒  ▒  ▒  ▒  ▒  ▒  ░  ░
       Sun | ░ ░ · · · · ░ ░ ▒ ▓ ▓  ▓  ▓  ▓  ▓  ▒  ▒  ▒  ▒  ▒  ▒  ▒  ░  ░
```

## 3. Key Insights

- **Dual weekday peaks (█):** Sharp morning spike at 9am and a larger afternoon peak 1–4pm on Mon–Fri, with Fri 2pm being the single busiest hour (~1490).
- **Deep overnight coldspot (·):** 1am–5am on weekdays registers <100 visits — ideal window for deployments, maintenance, or batch jobs.
- **Weekend flattening:** Sat/Sun lack the sharp 9am/2pm peaks; traffic is smoother, plateaus 10am–1pm, and late evenings stay elevated (Sun 8pm≈670).
- **Night-owl weekend behavior:** Sat/Sun midnight–2am traffic is 2–3× higher than weekday equivalents, suggesting leisure browsing patterns.
- **Ramp-up window:** Traffic surges ~7× between 6am and 9am on weekdays — a critical auto-scaling trigger point.

## 4. Python Code

```python
import numpy as np
import
Judge notes: The Python code block is cut off mid-import, making the code non-runnable and violating a core requirement; additionally, the ASCII heatmap has a mapping error (Fri hour 5=100 is marked █ peak, which is incorrect) and the visualization exceeds 80 characters wide.
Claude Haiku 4.5 7/10
# Website Traffic Heatmap Analysis

## 1. Parsed Data Table

| Day | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
|-----|---|---|---|---|---|---|---|---|---|---|----|----|----|----|----|----|----|----|----|----|----|----|----|---|
| Mon | 85| 45| 52| 48| 62| 78|120|380|950|1200|980|720|680|890|1450|1100|920|850|720|620|580|480|320|180|
| Tue | 90| 50| 55| 50| 65| 80|130|400|960|1180|970|730|690|900|1420|1090|930|860|730|630|590|490|330|190|
| Wed | 88| 48| 53| 49| 63| 79|125|390|955|1190|975|725|685|895|1440|1095|925|855|725|625|585|485|325|185|
| Thu | 92| 52| 57| 51| 67| 82|135|410|970|1210|990|740|700|910|1460|1110|940|870|740|640|600|500|340|200|
| Fri | 95| 55| 60| 54| 70| 85|140|420|980|1220|1000|750|710|920|1470|1120|950|880|750|650|610|510|350|210|
| Sat | 70| 35| 42| 38| 50| 65|100|290|720|890|820|750|720|780|950|880|780|720|680|620|560|420|280|140|
| Sun | 65| 30| 38| 35| 45| 60| 95|280|710|850|800|740|700|760|920|850|750|670|620|580|520|380|250|120|

---

## 2. ASCII Heatmap Visualization

```
WEBSITE TRAFFIC HEATMAP (Visits/Hour)
Legend: · (0-240) ░ (241-480) ▒ (481-720) ▓ (721-960) █ (961-1470)

Hour: 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23

Mon:  ·  ·  ·  ·  ·  ·  ░  ░  ▓  █  ▓  ▒  ▒  ▓  █  ▓  ▓  ▓  ▒  ▒  ▒  ░  ░  ·
Tue:  ·  ·  ·  ·  ·  ·  ░  ░  ▓  █  ▓  ▒  ▒  ▓  █  ▓  ▓  ▓  ▒  ▒  ▒  ░  ░  ·
Wed:  ·  ·  ·  ·  ·  ·  ░  ░  ▓  █  ▓  ▒  ▒  ▓  █  ▓  ▓  ▓  ▒  ▒  ▒  ░  ░  ·
Thu:  ·  ·  ·  ·  ·  ·  ░  ░  ▓  █  ▓  ▒  ▒  ▓  █  ▓  ▓  ▓  ▒  ▒  ▒  ░  ░  ·
Fri:  ·  ·  ·  ·  ·  ·  ░  ░  ▓  █  ▓  ▒  ▒  ▓  █  ▓  ▓  ▓  ▒  ▒  ▒  ░  ░  ·
Sat:  ·  ·  ·  ·  ·  ·  ·  ░  ▒  ▓  ▓  ▒  ▒  ▒  ▓  ▓  ▒  ▒  ▒  ▒  ░  ░  ·  ·
Sun:  ·  ·  ·  ·  ·  ·  ·  ░  ▒  ▓  ▓  ▒  ▒  ▒  ▓  ▓  ▒  ▒  ▒  ▒  ░  ░  ·  ·
```

---

## 3. Key Insights

• **Dual Peak Pattern (Weekdays)**: Consistent traffic spikes at 9am (~1200 visits) and 2pm (~1450 visits) across Monday-Friday, indicating strong business hour usage during morning and post-lunch periods.

• **Weekend Traffic Drop**: Saturday and Sunday traffic is 25-35% lower during peak hours (890 vs 1200 at 9am), suggesting primarily weekday user engagement for this website.

• **Nocturnal Coldspot**: Hours 1am-5am consistently show minimal traffic (30-70 visits) across all days, representing an optimal maintenance and backup window with negligible user impact.

• **Gradual Decline Post-Peak**: Traffic declines steadily from 2pm onwards through evening (1450→620 by 7pm), with evening hours (8pm-11pm) stabilizing at moderate levels (380-620 visits).

• **Early Morning Ramp-Up**: Traffic begins climbing at 6am (80-140 visits) and accelerates sharply from 7am onwards, reaching first peak by 9am—reflecting commute-time browsing and work-start user sessions.

---

## 4. Python Code

```python
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

# Define traffic data (7 days × 24 hours)
traffic_data = np.array([
    [85, 45, 52, 48, 62, 78, 120, 380, 950, 1200, 980, 720, 680, 890, 1450, 1100, 920, 850, 720, 620, 580, 480, 320, 180],  # Mon
    [90, 50, 55, 50, 65, 80, 130, 400, 960, 1180, 970, 730, 690, 900, 1420, 1090, 930, 860, 730, 630, 590, 490, 330, 190],  # Tue
    [88, 48, 53, 49, 63, 79, 125, 390, 955, 1190, 975, 725, 685, 895, 1440, 1095, 925, 855, 725, 625, 585, 485, 325, 185],  # Wed
    [92, 52, 57, 51, 67, 82, 135, 410, 970, 1210, 990, 740, 700, 910, 1460, 1110, 940, 870, 740, 640, 600, 500, 340, 200],  # Thu
    [95, 55, 60, 54, 70, 85, 140, 420, 980, 1220, 1000, 750, 710, 920, 1470, 1120, 950, 880, 750, 650, 610, 510, 350, 210],  # Fri
    [70, 35, 42, 38, 50,
Judge notes: The output is functionally solid and follows instructions well, but the Python code block is cut off mid-array (Sat row truncated), which is a real production-blocking defect.
GPT-5.4 8/10
Parsed Data Table

Assumed hourly traffic matrix for the past week, constructed to match the scenario:
- Weekdays peak around 9am and 2pm
- Very low traffic from 1am-5am
- Includes required sample values:
  - Mon 9am = 1200
  - Mon 2pm = 1450
  - Mon 3am = 45
  - Sat 11am = 890
  - Sun 8pm = 670

| Day | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|
| Mon | 120 | 70 | 55 | 45 | 50 | 80 | 180 | 420 | 850 | 1200 | 980 | 1020 | 1100 | 1180 | 1450 | 1250 | 980 | 760 | 620 | 540 | 460 | 340 | 240 | 160 |
| Tue | 130 | 75 | 60 | 50 | 55 | 85 | 190 | 440 | 880 | 1260 | 1010 | 1050 | 1130 | 1210 | 1490 | 1280 | 1000 | 780 | 640 | 560 | 470 | 350 | 250 | 170 |
| Wed | 125 | 72 | 58 | 48 | 52 | 82 | 185 | 430 | 870 | 1240 | 995 | 1035 | 1115 | 1195 | 1475 | 1270 | 995 | 775 | 635 | 555 | 465 | 345 | 245 | 165 |
| Thu | 128 | 74 | 59 | 49 | 53 | 83 | 188 | 435 | 875 | 1250 | 1005 | 1045 | 1125 | 1205 | 1485 | 1275 | 998 | 778 | 638 | 558 | 468 | 348 | 248 | 168 |
| Fri | 140 | 80 | 65 | 55 | 60 | 90 | 210 | 470 | 920 | 1320 | 1080 | 1120 | 1180 | 1260 | 1520 | 1340 | 1080 | 860 | 740 | 690 | 620 | 500 | 360 | 220 |
| Sat | 160 | 95 | 80 | 65 | 70 | 95 | 150 | 260 | 420 | 620 | 780 | 890 | 860 | 840 | 820 | 760 | 690 | 610 | 560 | 540 | 500 | 430 | 320 | 220 |
| Sun | 150 | 90 | 75 | 60 | 65 | 90 | 140 | 240 | 390 | 560 | 690 | 760 | 740 | 720 | 700 | 660 | 620 | 600 | 610 | 640 | 670 | 520 | 360 | 240 |

ASCII Heatmap with legend

Quintile-based 5-level scale:
- · = Q1 (lowest)
- ░ = Q2
- ▒ = Q3
- ▓ = Q4
- █ = Q5 (highest)

Approximate quintile cutoffs from the dataset:
- · : 45-139
- ░ : 140-349
- ▒ : 350-669
- ▓ : 670-1019
- █ : 1020-1520

Hours →  00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23
Mon      · · · · · · ░ ▒ ▓ █ ▓ █ █ █ █ █ ▓ ▓ ▒ ▒ ▒ ░ ░ ░
Tue      · · · · · · ░ ▒ ▓ █ ▓ █ █ █ █ █ ▓ ▓ ▒ ▒ ▒ ░ ░ ░
Wed      · · · · · · ░ ▒ ▓ █ ▓ █ █ █ █ █ ▓ ▓ ▒ ▒ ▒ ░ ░ ░
Thu      · · · · · · ░ ▒ ▓ █ ▓ █ █ █ █ █ ▓ ▓ ▒ ▒ ▒ ░ ░ ░
Fri      ░ · · · · · ░ ▒ ▓ █ █ █ █ █ █ █ █ ▓ ▓ ▓ ▒ ▒ ▒ ░
Sat      ░ · · · · · ░ ░ ▒ ▒ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▒ ▒ ▒ ▒ ▒ ░ ░
Sun      ░ · · · · · ░ ░ ▒ ▒ ▓ ▓ ▓ ▓ ▓ ▒ ▒ ▒ ▒ ▒ ▓ ▒ ▒ ░

Legend:
· lowest traffic   ░ low   ▒ moderate   ▓ high   █ peak

Key Insights

- Weekday hotspots are concentrated at 9am and especially 2pm, with Friday 2pm
  the weekly maximum at 1520.
- The coldest period is consistently 1am-5am across all days, with the weekly low
  at Monday 3am = 45.
- Weekdays show a strong business-hours pattern: traffic rises sharply after 7am,
  stays elevated through mid-afternoon, then declines steadily into the evening.
- Saturday has a later, softer midday peak centered around 10am-3pm; Sunday is
  flatter overall, with a noticeable evening bump at 8pm = 670.
- Friday remains elevated longer into the evening than other weekdays, suggesting
  stronger end-of-week engagement.

```python
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

# Hourly website traffic by day (Monday-Sunday) and hour (0-23)
data = {
    "Mon": [120, 70, 55, 45, 50, 80, 180, 420, 850, 1200, 980, 1020, 1100, 1180, 1450, 1250, 980, 760, 620, 540, 460, 340, 240, 160],
    "Tue": [130, 75, 60, 50, 55, 85, 190, 440, 880, 1260, 1010, 1050, 1130, 1210, 1490, 1280, 1000, 780, 640, 560, 470, 350, 250, 170],
    "Wed": [125, 72, 58, 48, 52, 82, 185, 430, 870, 1240, 995, 1035, 1115, 1195, 1475, 1270, 995, 775, 635, 555, 465, 345, 245, 165],
    "Thu": [128, 74, 59, 49, 53, 83, 188, 435, 875, 1250, 1005, 1045, 1125, 1205, 1485, 1275, 998, 778, 638, 558, 468, 348, 248, 168],
    "Fri": [140, 80, 65, 55, 60, 90, 210, 470, 920, 1320, 1080, 1120, 1180, 1260, 1520, 1340, 1080, 860, 740, 690, 620, 500, 360, 220],
    "Sat": [160, 95, 80, 65, 70, 95, 150, 260, 420, 620, 780, 890, 860, 840, 820, 760, 690, 610, 560, 540, 500, 430, 320, 220],
    "Sun": [150, 90, 75, 60, 65, 90, 140, 240, 390, 560, 690, 760, 740, 720, 700, 660, 620, 600, 610, 640, 670, 520, 360, 
Judge notes: The Python code block is truncated (cut off mid-array on the last line), which is a real production defect that would require manual fixing before use.
Grok 4.1 Fast Reasoning 7/10
### Parsed Data Table
Generated 7x24 traffic matrix based on scenario (rows: Mon-Sun, columns: hours 0-23; values in visits):

```
Mon: 45 42 38 45 48 55 260 520 780 1200 1180 1280 1220 1380 1450 1320 1170 1220 1080 920 720 580 380 160
Tue: 40 38 35 42 45 52 240 480 720 1250 1150 1260 1200 1350 1480 1300 1150 1200 1050 900 700 550 350 150
Wed: 42 40 36 43 46 53 250 500 740 1220 1160 1270 1210 1360 1460 1310 1160 1210 1060 910 710 560 360 155
Thu: 41 39 37 44 47 54 255 510 760 1230 1170 1280 1220 1370 1470 1320 1170 1220 1070 920 720 570 370 160
Fri: 43 41 39 46 49 56 270 530 800 1240 1190 1290 1230 1390 1490 1330 1180 1230 1090 930 730 590 390 170
Sat: 32 30 28 30 32 35 130 220 330 500 720 890 820 720 650 580 520 480 520 580 620 550 380 220
Sun: 28 26 25 27 29 32 100 170 270 420 560 620 580 540 500 460 420 460 510 580 650 670 560 320
```

### ASCII Heatmap with legend
Hours:01234567891011121314151617181920212223  
Mon:····░░▒▓████████████▓▓▓▒  
Tue:·····░▒▓▓███████████▓▓▒▒  
Wed:····░░▒▓████████████▓▓▓▒  
Thu:····░░▒▓████████████▓▓▓▒  
Fri:···░░░▒▓████████████▓▓▓▒  
Sat:······░▒▒▓▓██▓▓▓▓▓▓▓▓▓▒  
Sun:······░▒▒▓▓▓▓▓▓▓▓▓▓▓▓▒  

**Legend** (5-level scale by data quintiles):  
· ≤45 (lowest 20%)  
░ 46-130  
▒ 131-350  
▓ 351-750  
█ >750 (highest 20%)  

### Key Insights
- **Weekday hotspots**: Intense █ traffic (751+ visits) from ~8am-8pm Mon-Fri, peaking at ~1450-1490 around 9am/2pm (e.g., Mon 2pm=1450).
- **Overnight coldspots**: Consistent · (≤45 visits) from 12am-5am all days, confirming very low 1am-5am traffic.
- **Weekend patterns**: Reduced peaks (Sat 11am=890 █; Sun 8pm=670 ▓), with broader ▓ mid-day but no extended █ periods like weekdays.
- **Diurnal rhythm**: Traffic ramps ▒/▓ from 6am, sustains high through afternoons weekdays, drops sharply post-8pm to ░/▒.
- **Overall volume**: Weekdays drive ~80% of high-intensity (█/▓) cells, ideal for scheduling maintenance overnight/weekends.

```python
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

# Data matrix (7 days x 24 hours)
data = np.array([
    [45, 42, 38, 45, 48, 55, 260, 520, 780, 1200, 1180, 1280, 1220, 1380, 1450, 1320, 1170, 1220, 1080, 920, 720, 580, 380, 160],  # Mon
    [40, 38, 35, 42, 45, 52, 240, 480, 720, 1250, 1150, 1260, 1200, 1350, 1480, 1300, 1150, 1200, 1050, 900, 700, 550, 350, 150],  # Tue
    [42, 40, 36, 43, 46, 53, 250, 500, 740, 1220, 1160, 1270, 1210, 1360, 1460, 1310, 1160, 1210, 1060, 910, 710, 560, 360, 155],  # Wed
    [41, 39, 37, 44, 47, 54, 255, 510, 760, 1230, 1170, 1280, 1220, 1370, 1470, 1320, 1170, 1220, 1070, 920, 720, 570, 370, 160],  # Thu
    [43, 41, 39, 46, 49, 56, 270, 530, 800, 1240, 1190, 1290, 1230, 1390, 1490, 1330, 1180, 1230, 1090, 930, 730, 590, 390, 170],  # Fri
    [32, 30, 28, 30, 32, 35, 130, 220, 330, 500, 720, 890, 820, 720, 650, 580, 520, 480, 520, 580, 620, 550, 380, 220],      # Sat
    [28, 26, 25, 27, 29, 32, 100, 170, 270, 420, 560, 620, 580, 540, 500, 460, 420, 460, 510, 580, 650, 670, 560, 320]       # Sun
])

days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
hours = [str(h) for h in range(24)]

plt.figure(figsize=(12, 4))
sns.heatmap(data, cmap='YlOrRd', xticklabels=hours, yticklabels=days, cbar_kws={'label': 'Traffic (visits)'}, annot=False)
plt.title('Weekly Website Traffic Heatmap (Past Week)')
plt.xlabel('Hour of Day (0-23)')
plt.ylabel('Day of Week')
plt.tight_layout()
plt.show()
```
Judge notes: The ASCII heatmap axis labels are misaligned and cramped (hours run together without spacing), making the visualization hard to read at a glance, which is the core deliverable.

Related queries