Menu

Creating a Rainfall Trend Chart

Creating a Rainfall Trend Chart

Rainfall patterns are important for understanding weather behavior.

Code

plt.figure(figsize=(12,5))

plt.plot(

df['date'],

df['precipitation']

)

plt.title("Daily Rainfall Trend")

plt.xlabel("Date")

plt.ylabel("Rainfall")

plt.show()

Explanation

The chart shows how rainfall varies across the observation period.

Insight

This helps identify:

  • Heavy rainfall events
  • Dry periods
  • Seasonal rainfall patterns

Rainfall visualizations are particularly useful in agricultural and environmental studies.