Skip to content

Commit c48ee87

Browse files
committed
MNT: update / localize temperature examples
1 parent 56d1846 commit c48ee87

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

05-temperature/04-custom_plotting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import matplotlib.pyplot as plt
2-
from w_helpers import load_bwi_data, aggregate_by_month
2+
from w_helpers import load_data, aggregate_by_month
33
plt.ion()
44

5-
bwi = load_bwi_data()
6-
bwi_monthly = aggregate_by_month(bwi)
5+
temperature = load_data('central_park')
6+
temperature_monthly = aggregate_by_month(temperature)
77

88
fig, ax = plt.subplots()
99

@@ -25,7 +25,7 @@ def plot_aggregated_errorbar(ax, gb, label, picker=None, **kwargs):
2525
return eb, fill
2626

2727

28-
arts = plot_aggregated_errorbar(ax, bwi_monthly, 'bwi')
28+
arts = plot_aggregated_errorbar(ax, temperature_monthly, 'temperature')
2929

3030
# EXERCISE (10 minutes)
3131

05-temperature/05-interactive_temperature.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import matplotlib.pyplot as plt
22
from cycler import cycler
3-
from w_helpers import (load_ornl_data, aggregate_by_month, aggregate_by_day,
3+
from w_helpers import (load_data, aggregate_by_month, aggregate_by_day,
44
extract_day_of_hourly, extract_month_of_daily)
55

66

@@ -206,12 +206,13 @@ def remove(self):
206206
self.yearly_ax.figure.canvas.mpl_disconnect(self.cid)
207207

208208

209-
ornl = load_ornl_data()
209+
temperature = load_data('central_park')
210210
fig, (ax_by_month, ax_by_day, ax_by_hour) = setup_temperature_figure()
211-
ornl_at = AggregatedTimeTrace(ornl, 'ornl', ax_by_month, ax_by_day, ax_by_hour)
211+
temperature_at = AggregatedTimeTrace(temperature, 'temperature',
212+
ax_by_month, ax_by_day, ax_by_hour)
212213
fig.suptitle('Temperature')
213214
plt.show()
214215

215-
# EXERCISE
216-
# - plot 3 day windows
217-
# - plot percentile band as well as min/max
216+
# EXERCISE (15 minutes)
217+
# - plot 3 day windows centered on picked day
218+
# - cycle through min/max, std bands, and no bands on key stroke

0 commit comments

Comments
 (0)