Dapanyuntu data → light-color heatmap PNG. Tracking changes in first-level industry MA20 above rate.
Rules
- Data source:
https://sckd.dapanyuntu.com/, updated daily at 16:00 - Output format: 3:4 ratio (690×920px) light-color PNG image
- Industry hierarchy: 86 second-level industries → aggregated into 26 first-level industry categories (take the mean)
- Color scale: 0-100, light-color gradient (light purple → light blue → light green → light yellow → light orange)
- Time range: defaults to the most recent 31 trading days (about 6 weeks)
- Data aggregation: filter out 0 values (no data), take the arithmetic mean of valid values
- Screenshot engine: Playwright Chromium (capture.js from ljg-card)
- Quality control standards:
- All 26 first-level industries displayed
- All 31 date columns aligned
- Colors correspond accurately to values
- Bottom statistics correct (strongest/weakest industries, whole-market average)
- PNG file clear, no truncation, no rendering artifacts
Workflow
Step 1: Fetch raw data
Read <skill-base>/references/data-fetch.md, and follow its steps to fetch API data.
Data structure:
{
"data": [[date_idx, industry_idx, value], ...],
"dates": ["2026-02-24", ...],
"industries": ["专业服务", "专用设备", ...],
"page": 0,
"start_date": "2026-02-23",
"end_date": "2026-04-09"
}
Step 2: Aggregate by first-level industry
Read <skill-base>/references/industry-mapping.mdto map the 86 second-level industries to the 26 first-level industry categories.
Aggregation logic:
- For each
(category, date)combination, collect the valid values (>0) of all sub-industries - Calculate the arithmetic mean, keep 1 decimal place
- Sort industries in descending order by the value of the latest date
Execute:
cd "<skill-base>" && python3 scripts/generate.py --mode aggregate --input <raw_data.json> --output aggregated_data.json
Step 3: Generate light-color heatmap HTML
Use <skill-base>/assets/heatmap_template.html as the template, and inject the aggregated data.
Template features:
- Light background:
#ffffff - Light-color scale:
#e0e7ff→#bae6fd→#bbf7d0→#fef08a→#fdba74 - 3:4 ratio: 690×920px
- Responsive layout: flexbox + gap
Execute:
cd "<skill-base>" && python3 scripts/generate.py --mode render --input aggregated_data.json --template assets/heatmap_template.html --output heatmap.html
Step 4: HTML → PNG screenshot
Use Playwright to render the HTML into a PNG image.
Screenshot tool:<skill-base>/assets/capture.js(from ljg-card)
cd "<skill-base>" && python3 scripts/generate.py --mode capture --input heatmap.html --output market_breadth_heatmap.png
Dependency installation (first use):
cd "<skill-base>" && npm install && npx playwright install chromium
Step 5: Quality control check
Verify the PNG output:
- Open the PNG file and check:
- All 26 industry labels visible
- All 31 date columns aligned
- Color gradient smooth, values correspond to colors
- Bottom statistics correct
- Image clear, no truncation
- Check file size: about 50-200 KB
- Confirm 3:4 ratio: 690×920px
Step 6: Delivery
Report the file path:
[查看热力图](computer:///workspace/market_breadth_heatmap.png)
Output format
The final deliverable is a single PNG image file (690×920px), rendered and generated through an intermediate HTML artifact.
File naming:market_breadth_heatmap.png
Dependencies
- Python 3 (data fetching + aggregation)
- Node.js + Playwright Chromium (HTML → PNG screenshot)
- Dependency declarations:
<skill-base>/package.json