|
@@ -139,6 +139,8 @@ def collect_overview_from_page(wind: Dict[str, Any], months: List[str]) -> Dict[
|
|
|
avg_power = _f(row.get("avg_power") or row.get("active_power_avg") or 0)
|
|
avg_power = _f(row.get("avg_power") or row.get("active_power_avg") or 0)
|
|
|
avg_wind = _f(row.get("avg_wind") or row.get("WindSpeedAvr") or row.get("wind_velocity") or None)
|
|
avg_wind = _f(row.get("avg_wind") or row.get("WindSpeedAvr") or row.get("wind_velocity") or None)
|
|
|
points = int(_f(row.get("points") or row.get("record_count") or 0) or 0)
|
|
points = int(_f(row.get("points") or row.get("record_count") or 0) or 0)
|
|
|
|
|
+ if points <= 0 and avg_wind is not None:
|
|
|
|
|
+ points = 1
|
|
|
if not name and not month:
|
|
if not name and not month:
|
|
|
continue
|
|
continue
|
|
|
total_kwh += gen_kwh
|
|
total_kwh += gen_kwh
|
|
@@ -212,7 +214,8 @@ def collect_overview_from_page(wind: Dict[str, Any], months: List[str]) -> Dict[
|
|
|
"total_mwh": round(total_mwh, 2),
|
|
"total_mwh": round(total_mwh, 2),
|
|
|
"equivalent_hours": round(total_kwh / capacity, 1) if capacity else None,
|
|
"equivalent_hours": round(total_kwh / capacity, 1) if capacity else None,
|
|
|
"avg_wind": round(weighted_wind / total_points, 2) if total_points else None,
|
|
"avg_wind": round(weighted_wind / total_points, 2) if total_points else None,
|
|
|
- "capacity_factor": None,
|
|
|
|
|
|
|
+ "capacity_factor": round(total_mwh * 1000 / (capacity * 24 * 30.4 * len(months)) * 100, 2)
|
|
|
|
|
+ if capacity and months else None,
|
|
|
"completeness": round(comp_total_valid / comp_total_expected * 100, 2) if comp_total_expected else None,
|
|
"completeness": round(comp_total_valid / comp_total_expected * 100, 2) if comp_total_expected else None,
|
|
|
"integrity_files": integ_files,
|
|
"integrity_files": integ_files,
|
|
|
}
|
|
}
|