def read_wf(f): x = pd.read_csv(f).convert_dtypes() x['code'] = f.split("/")[-1].split(".")[0]return xwfiles = glob.glob("data/weather_data/*.csv")weather = pd.concat([read_wf(f) for f in wfiles])weather
Date
Time
Temperature_C
Dew_Point_C
Humidity_%
Wind
Speed_kmh
Gust_kmh
Pressure_hPa
Precip_Rate_mm
Precip_Accum_mm
UV
Solar_w/m2
code
0
2015/12/28
05:39 PM
5.61
5.28
98
SSW
0.0
0.0
1013.88
0.0
0.0
0
0.0
KOREUGEN74_2015
1
2015/12/28
05:42 PM
5.61
5.5
99
WSW
0.0
0.0
1013.88
0.0
0.0
0
0.0
KOREUGEN74_2015
2
2015/12/28
05:47 PM
5.72
5.61
99
West
3.22
11.91
1013.88
0.0
0.0
0
0.0
KOREUGEN74_2015
3
2015/12/28
05:52 PM
5.72
5.61
99
West
0.0
0.0
1013.88
0.0
0.0
0
0.0
KOREUGEN74_2015
4
2015/12/28
05:57 PM
5.72
5.61
99
SSE
0.0
0.0
1013.55
0.0
0.0
0
0.0
KOREUGEN74_2015
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
98536
2025/12/31
11:39 PM
2.0
1.78
99
NNW
0.0
0.0
1013.55
0.0
0.0
0
0.0
KOREUGEN127_2025
98537
2025/12/31
11:44 PM
2.0
1.78
99
NNW
0.32
0.48
1013.21
0.0
0.0
0
0.0
KOREUGEN127_2025
98538
2025/12/31
11:49 PM
2.0
1.78
99
NNW
0.0
0.0
1013.21
0.0
0.0
0
0.0
KOREUGEN127_2025
98539
2025/12/31
11:54 PM
2.11
1.89
99
NNW
0.0
0.0
1013.21
0.0
0.0
0
0.0
KOREUGEN127_2025
98540
2025/12/31
11:59 PM
2.22
2.0
99
WNW
0.16
0.32
1013.21
0.0
0.0
0
0.0
KOREUGEN127_2025
1357156 rows × 14 columns
Goals:
What we’d like to do is understand how well rainfall in one part of Eugene/Springfield predicts rainfall in another part. In particular, how well does rainfall at one point – the National Weather Service station – predict load for the municipal stormwater system?
So: let’s understand the data, with this goal in mind.