import snowday
prediction = snowday.predict('12345', 0, snowday.SchoolType.PUBLIC)
print(f'There is a {prediction.chance_tmrw()}% chance of a snow day tomorrow.')
Returns a Prediction
object
-
Prediction.chance(day: datetime.datetime)
Return the % chance of a snow day on the specified day represented as a
datetime
object orNone
if no prediction was listed for that day -
Prediction.chance_today()
Returns the chance of a snow day for today, or
None
if not found -
Prediction.chance_tmrw()
Returns the chance of a snow day for tomorrow, or
None
if not found
Constants describing the type of school
SchoolType.PUBLIC
SchoolType.URBAN_PUBLIC
SchoolType.RURAL_PUBLIC
SchoolType.PRIVATE
SchoolType.BOARDING
Great work on this Snow Day Calculator API! It's always inspiring to see how simple tools can offer meaningful, real-time results.
I'm working on something similar but in a different context — a lightweight Arabic tool to help people with حساب فرق العمر age difference calculation) instantly using both Hijri and Gregorian calendars.
Feel free to check it out and let me know what you think.