AI Skill Report Card
Analyzing Solar Panel Catalog
Solar Panel Catalog Analysis
Quick Start
Extract key product data from HTML/text containing solar panel listings:
Pythonimport re from dataclasses import dataclass @dataclass class SolarPanel: brand: str model: str wattage: int price: float availability: str = "In Stock" def parse_solar_panel(product_text): # Extract brand (first word before "PANEL SOLAR") brand_match = re.search(r'(\w+)\s+PANEL SOLAR', product_text) brand = brand_match.group(1) if brand_match else "Unknown" # Extract wattage (number followed by W) wattage_match = re.search(r'(\d+)W', product_text) wattage = int(wattage_match.group(1)) if wattage_match else 0 # Extract price ($ followed by number with decimals) price_match = re.search(r'\$(\d+\.?\d*)', product_text) price = float(price_match.group(1)) if price_match else 0.0 # Extract model (alphanumeric code after brand) model_match = re.search(rf'{brand}\s+(.+?)\s+\$', product_text) model = model_match.group(1).strip() if model_match else "Unknown" return SolarPanel(brand, model, wattage, price)
Recommendation▾
Add more concrete input/output examples showing different catalog formats (HTML tables, CSV, JSON) and edge cases like missing data
Workflow
-
Parse Product Listings
- Extract individual product blocks from HTML/text
- Identify product boundaries using images or separators
-
Extract Core Data
- Brand name (JA SOLAR, LONGI, etc.)
- Model number (JAM54D41, LR8-66HGD-610W, etc.)
- Wattage rating (455W, 610W, etc.)
- Price in USD
-
Calculate Efficiency Metrics
- Price per watt ($/W)
- Power density comparisons
- Brand performance ratios
-
Generate Summary Report
- Product count by brand
- Price range analysis
- Wattage distribution
Progress:
- Parse raw product data
- Extract specifications
- Calculate metrics
- Generate comparison table
- Create summary statistics
Recommendation▾
Include a complete analysis template or framework that shows how to structure the final comparison report with actual data tables
Examples
Example 1: Input: "JA SOLAR PANEL SOLAR JA SOLAR JAM54D41 LB 455W $86.00" Output:
Brand: JA SOLAR
Model: JAM54D41 LB 455W
Wattage: 455W
Price: $86.00
Price/Watt: $0.189
Example 2: Input: "LONGI PANEL SOLAR LONGI HIMO 7 LR8-66HGD-610W $92.50" Output:
Brand: LONGI
Model: HIMO 7 LR8-66HGD-610W
Wattage: 610W
Price: $92.50
Price/Watt: $0.152
Recommendation▾
Expand the workflow to include data validation steps and error handling for malformed product listings
Best Practices
- Always calculate price per watt for meaningful comparisons
- Group products by brand for easier analysis
- Flag unusual pricing (too high/low price per watt ratios)
- Extract model numbers completely - they contain important technical info
- Convert all prices to same currency if mixed
- Validate wattage extraction (should be 100-1000W range for typical panels)
Common Pitfalls
- Don't confuse voltage ratings (12V, 24V) with wattage
- Don't extract random numbers as wattage - verify "W" suffix
- Don't ignore product variants (M, LB, HIMO suffixes matter)
- Don't assume price format - some use commas, different currencies
- Don't merge different product lines from same brand