import renderer
import kiosk_secrets as secrets
-logger = logging.getLogger(__file__)
+logger = logging.getLogger(__name__)
class weather_renderer(renderer.abstaining_renderer):
aggregate_daily_precip = 0.0
for r, s in zip(rain[date], snow[date]):
hourly_aggregate = r + s
+
+ # The weather report is always way wrong about Stevens.
+ if self.file_prefix == "stevens":
+ hourly_aggregate *= 3.5
aggregate_daily_precip += hourly_aggregate
precip[date].append(hourly_aggregate)
logger.debug(
- f"Aggregate precip on {date} was {aggregate_daily_precip} cm"
+ f"Aggregate precip on {date} was {aggregate_daily_precip} mm"
)
if first_day:
while len(precip[date]) < 8:
"""
)
- # Total aggregate_precip in inches
- aggregate_daily_precip /= 2.54
- if aggregate_daily_precip > 0.025:
+ # Total aggregate_precip in inches (from mm)
+ aggregate_daily_precip /= 25.4
+ if aggregate_daily_precip > 0.001:
f.write(
f"""
<td width=33%>