We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63f4503 commit 1b9a40dCopy full SHA for 1b9a40d
chapter2/solutions/nyc_forecast_owm.py
@@ -26,17 +26,13 @@ def get_forecast(city):
26
utc_dt = datetime.utcfromtimestamp(w.get_reference_time()).replace(tzinfo=pytz.utc)
27
tz = pytz.timezone('America/New_York')
28
dt = utc_dt.astimezone(tz)
29
-
30
- # print it
31
date_time.append(dt.strftime('%Y-%m-%d %H:%M'))
32
temp.append(forecast_temp['temp'])
33
x = range(1, len(temp)+1)
34
plt.plot(x, temp, 'o-')
35
plt.xticks(x, date_time, rotation=45)
36
plt.show()
37
38
-if __name__ == '__main__':
39
- get_forecast('new york, us')
40
41
if __name__ == '__main__':
42
get_forecast('new york, us')
0 commit comments