"""
Climate starter analysis from an EPW file.
Use in Grasshopper with a GhPython component.
Input:  path (Text), full path to an .epw file
Output: report (Text)
"""
from ladybug.epw import EPW

epw = EPW(path)
temps = epw.dry_bulb_temperature.values
hot = sum(1 for t in temps if t > 32)
mean = sum(temps) / len(temps)
report = "\n".join([
    "Location: %s" % epw.location.city,
    "Mean dry bulb: %.1f C" % mean,
    "Max dry bulb: %.1f C" % max(temps),
    "Hours above 32 C: %d" % hot,
])
