Skip to content

Commit dd072fe

Browse files
committed
rename to reduce the number of changes
1 parent 04d9ea2 commit dd072fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/code/initial-version.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
df = pd.read_csv("weather_data.csv")
88
data = df[df['month'] == month].reset_index(drop=True) # Filter for January only and reindex
99
temperatures = data["air_temperature"]
10-
precipitations = data["precipitation"]
11-
num_measurements = len(precipitations)
10+
precipitation = data["precipitation"]
11+
num_measurements = len(precipitation)
1212

1313
# compute statistics
1414
temp_mean = sum(temperatures) / num_measurements
15-
precip_mean = sum(precipitations) / num_measurements
15+
precip_mean = sum(precipitation) / num_measurements
1616

1717
# plot temperature
1818
plt.figure()
@@ -24,7 +24,7 @@
2424

2525
# plot precipitation
2626
plt.figure()
27-
plt.plot(precipitations, "b-")
27+
plt.plot(precipitation, "b-")
2828
plt.axhline(y=precip_mean, color="b", linestyle="--")
2929
plt.savefig(f"month-{month}_precipitation.png")
3030
plt.show()

0 commit comments

Comments
 (0)