Skip to content

Commit 6360bb2

Browse files
chore(plotly): update quality score 88 and review feedback for heatmap-geographic
1 parent 267ddb9 commit 6360bb2

2 files changed

Lines changed: 232 additions & 10 deletions

File tree

plots/heatmap-geographic/implementations/python/plotly.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"""anyplot.ai
1+
""" anyplot.ai
22
heatmap-geographic: Geographic Heatmap for Spatial Density
3-
Library: plotly | Python 3.13
4-
Quality: 92/100 | Created: 2026-01-10
3+
Library: plotly 6.7.0 | Python 3.13.13
4+
Quality: 88/100 | Updated: 2026-05-18
55
"""
66

77
import os
Lines changed: 229 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# Per-library metadata for plotly implementation of heatmap-geographic
2-
# Auto-generated by impl-generate.yml
3-
41
library: plotly
52
language: python
63
specification_id: heatmap-geographic
74
created: '2026-01-10T08:16:18Z'
8-
updated: '2026-05-18T23:33:57Z'
5+
updated: '2026-05-18T23:40:45Z'
96
generated_by: claude-sonnet
107
workflow_run: 26066433362
118
issue: 3638
@@ -15,7 +12,232 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/heatmap-g
1512
preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/heatmap-geographic/python/plotly/plot-dark.png
1613
preview_html_light: https://storage.googleapis.com/anyplot-images/plots/heatmap-geographic/python/plotly/plot-light.html
1714
preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/heatmap-geographic/python/plotly/plot-dark.html
18-
quality_score: null
15+
quality_score: 88
1916
review:
20-
strengths: []
21-
weaknesses: []
17+
strengths:
18+
- Theme-adaptive basemap style switching (carto-positron vs carto-darkmatter) integrates
19+
seamlessly with the light/dark theme system
20+
- 'Perfect spec compliance: density heatmap, basemap, colorbar, transparency, interactivity
21+
all present and working'
22+
- Real SF Bay Area data with four geographically accurate hotspots creates an immediately
23+
interpretable visualization
24+
- Clean flat code with all theme tokens properly applied to colorbar elements
25+
- HTML export provides interactive output alongside PNG renders
26+
weaknesses:
27+
- YlOrRd colorscale is valid per spec but not the style guide default (viridis preferred);
28+
yellow-end has lower CVD safety compared to viridis — switch to colorscale=Viridis
29+
- 'Design sophistication (DE-01=5/8): no focal-point annotation on highest-density
30+
hotspot, no colorbar frame styling using ELEVATED_BG token'
31+
- Map tile text cannot be resized by implementation, slightly limiting VQ-01
32+
image_description: |-
33+
Light render (plot-light.png):
34+
Background: Warm off-white carto-positron basemap with paper_bgcolor ~#FAF8F1 border area; basemap itself is light grey/white tile style
35+
Chrome: Title "Activity Density · heatmap-geographic · python · plotly · anyplot.ai" at 28px in dark INK color — clearly readable; colorbar title "Intensity" at 20px, tick labels at 16px in INK_SOFT — all readable
36+
Data: YlOrRd colorscale with opacity=0.7; four hotspots visible (Downtown SF largest/most intense in red, Oakland, Berkeley, South SF); background scatter in yellow; color gradient clearly shows density variation
37+
Legibility verdict: PASS
38+
39+
Dark render (plot-dark.png):
40+
Background: Near-black carto-darkmatter basemap with paper_bgcolor ~#1A1A17 border area; basemap itself is dark tile style
41+
Chrome: Title text in light INK color (#F0EFE8) — clearly readable against dark background; colorbar title and ticks in INK_SOFT (#B8B7B0) — readable; map tile city labels appear in light/white text; NO dark-on-dark failures
42+
Data: YlOrRd colorscale colors are identical to light render (same yellow→red gradient hotspots); data colors unchanged, only chrome flipped; hotspots pop vividly against the near-black basemap
43+
Legibility verdict: PASS
44+
criteria_checklist:
45+
visual_quality:
46+
score: 27
47+
max: 30
48+
items:
49+
- id: VQ-01
50+
name: Text Legibility
51+
score: 7
52+
max: 8
53+
passed: true
54+
comment: Title 28px, colorbar title 20px, colorbar ticks 16px all explicitly
55+
set and readable; map tile labels from external service can't be controlled
56+
- id: VQ-02
57+
name: No Overlap
58+
score: 6
59+
max: 6
60+
passed: true
61+
comment: No text or element collisions in either render
62+
- id: VQ-03
63+
name: Element Visibility
64+
score: 6
65+
max: 6
66+
passed: true
67+
comment: Density hotspots distinct and well-contrasted; radius=15 appropriate
68+
for data density
69+
- id: VQ-04
70+
name: Color Accessibility
71+
score: 1
72+
max: 2
73+
passed: false
74+
comment: YlOrRd yellow-end has lower luminance contrast and some CVD concerns
75+
compared to viridis
76+
- id: VQ-05
77+
name: Layout & Canvas
78+
score: 4
79+
max: 4
80+
passed: true
81+
comment: Map fills canvas efficiently; explicit margins; colorbar well-positioned
82+
outside map
83+
- id: VQ-06
84+
name: Axis Labels & Title
85+
score: 2
86+
max: 2
87+
passed: true
88+
comment: Descriptive title in correct format; colorbar labeled Intensity
89+
- id: VQ-07
90+
name: Palette Compliance
91+
score: 1
92+
max: 2
93+
passed: false
94+
comment: Correct theme chrome (#FAF8F1/#1A1A17 backgrounds, INK tokens); YlOrRd
95+
is valid sequential but not default recommendation (viridis preferred)
96+
design_excellence:
97+
score: 13
98+
max: 20
99+
items:
100+
- id: DE-01
101+
name: Aesthetic Sophistication
102+
score: 5
103+
max: 8
104+
passed: true
105+
comment: Theme-adaptive basemap styles (carto-positron/carto-darkmatter) is
106+
above-default thinking; good but not strong design territory
107+
- id: DE-02
108+
name: Visual Refinement
109+
score: 4
110+
max: 6
111+
passed: true
112+
comment: Clean layout with explicit margins; good refinement for geographic
113+
map context; no traditional spines/grids to remove
114+
- id: DE-03
115+
name: Data Storytelling
116+
score: 4
117+
max: 6
118+
passed: true
119+
comment: SF Bay Area activity story immediately clear; color gradient focuses
120+
on hotspots; no focal-point annotations to highlight specific insights
121+
spec_compliance:
122+
score: 15
123+
max: 15
124+
items:
125+
- id: SC-01
126+
name: Plot Type
127+
score: 5
128+
max: 5
129+
passed: true
130+
comment: go.Densitymap is the correct geographic density heatmap type
131+
- id: SC-02
132+
name: Required Features
133+
score: 4
134+
max: 4
135+
passed: true
136+
comment: KDE density, sequential colormap, transparency, basemap, colorbar,
137+
interactivity, hover template all present
138+
- id: SC-03
139+
name: Data Mapping
140+
score: 3
141+
max: 3
142+
passed: true
143+
comment: Latitude, longitude, intensity (z) correctly mapped; all clusters
144+
visible
145+
- id: SC-04
146+
name: Title & Legend
147+
score: 3
148+
max: 3
149+
passed: true
150+
comment: Title Activity Density · heatmap-geographic · python · plotly · anyplot.ai
151+
matches required format
152+
data_quality:
153+
score: 15
154+
max: 15
155+
items:
156+
- id: DQ-01
157+
name: Feature Coverage
158+
score: 6
159+
max: 6
160+
passed: true
161+
comment: Multiple distinct hotspots at varying intensities, background scatter,
162+
clear density gradients — all aspects demonstrated
163+
- id: DQ-02
164+
name: Realistic Context
165+
score: 5
166+
max: 5
167+
passed: true
168+
comment: Real SF Bay Area geography with plausible urban activity density;
169+
neutral, non-controversial
170+
- id: DQ-03
171+
name: Appropriate Scale
172+
score: 4
173+
max: 4
174+
passed: true
175+
comment: Geographically accurate coordinates; 1500 points appropriate; intensity
176+
0.1-1.0 realistic for relative activity
177+
code_quality:
178+
score: 10
179+
max: 10
180+
items:
181+
- id: CQ-01
182+
name: KISS Structure
183+
score: 3
184+
max: 3
185+
passed: true
186+
comment: 'Flat structure: imports → theme tokens → data → plot → save; no
187+
functions or classes'
188+
- id: CQ-02
189+
name: Reproducibility
190+
score: 2
191+
max: 2
192+
passed: true
193+
comment: np.random.seed(42) set before all random calls
194+
- id: CQ-03
195+
name: Clean Imports
196+
score: 2
197+
max: 2
198+
passed: true
199+
comment: Only os, numpy, plotly.graph_objects — all used
200+
- id: CQ-04
201+
name: Code Elegance
202+
score: 2
203+
max: 2
204+
passed: true
205+
comment: Clean, idiomatic Python; appropriate complexity; no over-engineering
206+
- id: CQ-05
207+
name: Output & API
208+
score: 1
209+
max: 1
210+
passed: true
211+
comment: Saves plot-{THEME}.png and plot-{THEME}.html; uses current go.Densitymap
212+
API
213+
library_mastery:
214+
score: 8
215+
max: 10
216+
items:
217+
- id: LM-01
218+
name: Idiomatic Usage
219+
score: 4
220+
max: 5
221+
passed: true
222+
comment: Correct use of go.Densitymap; proper layout/map configuration with
223+
center/zoom; colorbar configured via trace dict
224+
- id: LM-02
225+
name: Distinctive Features
226+
score: 4
227+
max: 5
228+
passed: true
229+
comment: go.Densitymap is distinctly Plotly; CARTO tile integration with theme-adaptive
230+
styles; interactive HTML export with hover templates
231+
verdict: REJECTED
232+
impl_tags:
233+
dependencies: []
234+
techniques:
235+
- colorbar
236+
- hover-tooltips
237+
- html-export
238+
patterns:
239+
- data-generation
240+
dataprep: []
241+
styling:
242+
- custom-colormap
243+
- alpha-blending

0 commit comments

Comments
 (0)