rainfall <- readr::read_csv(
"IDCJAC0009_086282_1800_Data.csv",
show_col_types = FALSE
)
rainfall_1971_2015 <- rainfall %>%
dplyr::filter(
Year >= 1971,
Year <= 2015,
Quality == "Y",
!is.na(`Rainfall amount (millimetres)`),
is.na(`Period over which rainfall was measured (days)`) |
`Period over which rainfall was measured (days)` == 1
)
dim(rainfall_1971_2015)
## [1] 16436 8
Rainfall at Melbourne Airport varies from year to year, between seasons and from one rainy day to the next, so examining how rainfall patterns change over time helps to show what is typical, what is unusual and how the record has varied. This report uses daily rainfall observations from 1971 to 2015 inclusive. The first visualisation examines how annual rainfall totals vary from year to year. The second compares average monthly rainfall between 1971–1993 and 1994–2015 to show whether the seasonal pattern differs between the two periods. The third compares rainfall amounts on wet days between the same two periods, and the fourth examines how the number of wet days varies across years. The fifth explores the relationship between annual rainfall totals and the number of wet days. Together, these visualisations investigate how rainfall totals, seasonal patterns, wet-day amounts and wet-day frequency varied at Melbourne Airport between 1971 and 2015, and how these patterns are related. These charts describe historical patterns and differences; on their own, they do not establish the causes of those patterns or show that extreme rainfall events have become more frequent.
The data for this analysis were obtained from the Australian Bureau
of Meteorology (BOM). The dataset,
IDCJAC0009_086282_1800_Data.csv, contains daily rainfall
observations for Melbourne Airport, station number 086282. The original
file contained 20,751 rows and eight columns, covering the years 1970 to
2026. The analysis focuses on the period from 1 January 1971 to 31
December 2015, inclusive. The BOM documentation was consulted to
understand the dataset’s data fields and rainfall measurement
conventions (Bureau of Meteorology, n.d.-a, n.d.-b).
The dataset was imported into R using the readr package
and processed using dplyr. The following steps were
applied:
Y were retained.The processed dataset was used to calculate annual rainfall totals, monthly rainfall summaries, the number of wet days per year, and rainfall amounts on wet days. A wet day was defined as a day with recorded rainfall greater than 0 mm. These derived variables supported the five visualisations examining annual variation, monthly patterns, wet-day rainfall amounts, wet-day frequency, and the relationship between annual rainfall and wet-day counts.
annual_variability <- annual_rainfall %>%
summarise(
Mean = mean(Annual_rainfall_mm),
SD = sd(Annual_rainfall_mm),
Minimum = min(Annual_rainfall_mm),
Maximum = max(Annual_rainfall_mm),
Range = Maximum - Minimum
)
annual_variability
plotly::plot_ly(
data = annual_rainfall,
x = ~Year,
y = ~Annual_rainfall_mm,
type = "scatter",
mode = "lines+markers",
text = ~paste0(
"Year: ", Year,
"<br>Annual rainfall: ",
round(Annual_rainfall_mm, 1), " mm"
),
hovertemplate = "%{text}<extra></extra>"
) %>%
plotly::layout(
title = list(
text = "Annual rainfall at Melbourne Airport (1971–2015)"
),
xaxis = list(title = "Year"),
yaxis = list(title = "Annual rainfall (mm)")
)
Source: Australian Bureau of Meteorology (BOM), daily rainfall observations for Melbourne Airport (station 086282), 1971–2015. Calculations and visualisation by the author.
What the annual totals reveal
Annual rainfall varied considerably at Melbourne Airport between 1971 and 2015. The average annual total was approximately 533.0 mm, but individual years differed substantially. The highest total occurred in 1978, at 820.8 mm, while the lowest occurred in 1997, at 310.2 mm. This contrast shows that the rainfall record includes both exceptionally wet and relatively dry years. The variation also highlights why a single annual average cannot fully describe rainfall conditions at the station.
# Calculate monthly rainfall totals for each year
monthly_by_year <- rainfall_1971_2015 %>%
mutate(Month_number = as.integer(Month)) %>%
group_by(Year, Month_number) %>%
summarise(
Monthly_rainfall_mm =
sum(`Rainfall amount (millimetres)`),
.groups = "drop"
)
# Divide the record into earlier and later periods
monthly_by_year <- monthly_by_year %>%
mutate(
Period = case_when(
Year >= 1971 & Year <= 1993 ~ "Earlier period (1971–1993)",
Year >= 1994 & Year <= 2015 ~ "Later period (1994–2015)"
)
)
# Calculate average monthly rainfall for each period
monthly_period_summary <- monthly_by_year %>%
group_by(Period, Month_number) %>%
summarise(
Mean_monthly_rainfall_mm =
mean(Monthly_rainfall_mm),
.groups = "drop"
)
# Interactive comparison chart
plotly::plot_ly(
data = monthly_period_summary,
x = ~Month_number,
y = ~Mean_monthly_rainfall_mm,
color = ~Period,
type = "scatter",
mode = "lines+markers",
text = ~paste0(
"Period: ", Period,
"<br>Month: ", month.abb[Month_number],
"<br>Average monthly rainfall: ",
round(Mean_monthly_rainfall_mm, 1), " mm"
),
hovertemplate = "%{text}<extra></extra>"
) %>%
plotly::layout(
xaxis = list(
title = "Month",
tickmode = "array",
tickvals = 1:12,
ticktext = month.abb
),
yaxis = list(
title = "Average monthly rainfall (mm)"
),
legend = list(title = list(text = "Period"))
)
Source: Australian Bureau of Meteorology (BOM), daily rainfall observations for Melbourne Airport (station 086282), 1971–2015. Calculations and visualisation by the author.
How the seasonal pattern compares
Comparing average monthly rainfall between 1971–1993 and 1994–2015 helps reveal whether the seasonal distribution of rainfall changed between the two periods. The monthly averages show how rainfall was distributed across the calendar year, while the comparison indicates which months experienced relatively higher or lower rainfall in each period. Differences between the two lines should be interpreted as historical differences between these periods, rather than proof of a long-term trend or its cause.
May showed the largest difference in average monthly rainfall between the two periods, decreasing from approximately 46.33 mm in 1971–1993 to 31.81 mm in 1994–2015, a reduction of about 14.53 mm.
daily_rainfall_period <- rainfall_1971_2015 %>%
filter(`Rainfall amount (millimetres)` > 0) %>%
mutate(
Period = case_when(
Year >= 1971 & Year <= 1993 ~ "Earlier period (1971–1993)",
Year >= 1994 & Year <= 2015 ~ "Later period (1994–2015)"
)
)
plotly::plot_ly(
data = daily_rainfall_period,
x = ~Period,
y = ~`Rainfall amount (millimetres)`,
color = ~Period,
type = "box",
boxpoints = "outliers",
hovertemplate = paste(
"Period: %{x}",
"<br>Wet-day rainfall: %{y:.1f} mm",
"<extra></extra>"
)
) %>%
plotly::layout(
title = list(
text = "Daily rainfall on wet days by period"
),
xaxis = list(title = "Time period"),
yaxis = list(title = "Rainfall on wet days (mm)"),
showlegend = FALSE
)
Source: Australian Bureau of Meteorology (BOM), daily rainfall observations for Melbourne Airport (station 086282), 1971–2015. Calculations and visualisation by the author.
Did rainfall amounts on wet days change?
The distribution of rainfall on wet days provides a different perspective from annual totals. The median wet-day rainfall was 1.4 mm in both periods, while the mean was 3.85 mm in 1971–1993 and 3.64 mm in 1994–2015. This indicates that the average rainfall amount on a wet day was slightly lower in the later period, while the typical wet-day amount, represented by the median, remained unchanged. The distributions and outliers also help show that rainfall amounts varied considerably between individual wet days.
annual_wet_days <- rainfall_1971_2015 %>%
group_by(Year) %>%
summarise(
Wet_days = sum(
`Rainfall amount (millimetres)` > 0
),
.groups = "drop"
)
# Create explicit intervals for the annual wet-day counts
wet_day_breaks <- pretty(
range(annual_wet_days$Wet_days),
n = 10
)
annual_wet_days_binned <- annual_wet_days %>%
mutate(
Wet_day_bin = cut(
Wet_days,
breaks = wet_day_breaks,
include.lowest = TRUE,
right = TRUE,
dig.lab = 5
)
) %>%
count(Wet_day_bin, name = "Number_of_years") %>%
mutate(
Wet_day_bin = as.character(Wet_day_bin)
)
plotly::plot_ly(
data = annual_wet_days_binned,
x = ~Wet_day_bin,
y = ~Number_of_years,
type = "bar",
text = ~paste0(
"Annual wet-day count interval: ", Wet_day_bin,
"<br>Number of years: ", Number_of_years
),
hovertemplate = "%{text}<extra></extra>"
) %>%
plotly::layout(
title = list(
text = "Distribution of annual wet-day counts (1971–2015)"
),
xaxis = list(
title = "Annual wet-day count interval",
tickangle = -45
),
yaxis = list(
title = "Number of years",
rangemode = "tozero"
),
bargap = 0.08
)
Source: Australian Bureau of Meteorology (BOM), daily rainfall observations for Melbourne Airport (station 086282), 1971–2015. Calculations and visualisation by the author.
How frequently did wet days occur?
The annual number of wet days varied across the 1971–2015 record. Examining these counts helps distinguish how frequently rain was recorded from how much rain fell in total. A year can have many wet days without having the highest annual rainfall, because the amount recorded on each wet day also matters. The distribution therefore provides useful context for understanding differences in rainfall across years.
The annual number of wet days ranged from 118 days in both 1982 and 2006 to 177 days in 1992, showing substantial variation in how frequently rainfall was recorded across the study period.
annual_rainfall_wetdays <- rainfall_1971_2015 %>%
group_by(Year) %>%
summarise(
Annual_rainfall_mm =
sum(`Rainfall amount (millimetres)`),
Wet_days = sum(
`Rainfall amount (millimetres)` > 0
),
.groups = "drop"
)
plotly::plot_ly(
data = annual_rainfall_wetdays,
x = ~Wet_days,
y = ~Annual_rainfall_mm,
type = "scatter",
mode = "markers",
text = ~paste0(
"Year: ", Year,
"<br>Wet days: ", Wet_days,
"<br>Annual rainfall: ",
Annual_rainfall_mm, " mm"
),
hovertemplate = "%{text}<extra></extra>"
) %>%
plotly::layout(
xaxis = list(
title = "Number of wet days per year"
),
yaxis = list(
title = "Annual rainfall (mm)"
)
)
Source: Australian Bureau of Meteorology (BOM), daily rainfall observations for Melbourne Airport (station 086282), 1971–2015. Calculations and visualisation by the author.
Does more frequent rain mean more annual rainfall?
Comparing annual rainfall totals with the number of wet days helps investigate whether wetter years also tended to have more days with recorded rain. The relationship provides a way to consider both rainfall frequency and total accumulation together. However, annual rainfall depends on both how often rain occurs and how much falls on those days. Any apparent relationship in this chart should be described as an association, not evidence that one variable causes the other.
Annual rainfall totals and wet-day counts showed a moderately positive relationship (correlation ≈ 0.56), indicating that years with more wet days generally tended to have higher annual rainfall, although the number of wet days alone did not fully determine the total.
The rainfall record at Melbourne Airport from 1971 to 2015 shows substantial variation in annual rainfall, alongside differences in wet-day frequency and rainfall amounts. The comparison between the earlier and later periods provides further insight into how rainfall patterns differed over time. In particular, the mean wet-day rainfall was slightly lower in the later period, although the median remained at 1.4 mm in both periods. Considering annual totals, monthly patterns and wet-day measures together provides a more complete picture than relying on annual rainfall alone. These findings describe the historical observations at one station and should not be interpreted as establishing the causes of rainfall variation or predicting future conditions.
This analysis has several limitations. The data come from a single weather station, Melbourne Airport (086282), so they do not represent every area of Melbourne. The conclusions apply only to 1971-2015, not to years outside that period. The period comparison uses 1971-1993 versus 1994-2015, so a different split could produce different results. Records were retained only if they had quality code Y and a recorded rainfall amount. Within the selected date range, these filters removed no additional rows, so the results rely on the quality-controlled observations being reliable. A further limitation concerns the measurement period. Of the 16,436 retained records, 9,438 have a missing measurement-period value. The code keeps these alongside records with a one-day period, so it cannot be confirmed that every retained value represents rainfall over exactly one day. The wet-day counts also depend on the definition used, a wet day being any day with rainfall greater than 0 mm. This includes days with very small recorded rainfall, so the counts would differ under a higher threshold. Finally, the analysis describes historical patterns in annual rainfall, monthly averages, wet-day rainfall and wet-day counts. It does not establish the causes of those patterns, and it does not test whether extreme rainfall events have become more frequent.
Bureau of Meteorology. (n.d.-a). About IDCJAC0009. Australian Government. https://www.bom.gov.au/climate/cdo/about/about-IDCJAC0009.shtml
Bureau of Meteorology. (n.d.-b). About rainfall data. Australian Government. https://www.bom.gov.au/climate/cdo/about/about-rain-data.shtml
Bureau of Meteorology. (n.d.-c). Climate Data Online. Australian Government. https://www.bom.gov.au/climate/data/
Anthropic. (n.d.). Claude [Large language model]. https://claude.ai/
OpenAI. (n.d.). ChatGPT [Large language model]. https://chatgpt.com/
Generative AI tools, including ChatGPT (OpenAI) and Claude (Anthropic), were used to assist with R coding and troubleshooting, and to review grammar, wording and consistency. Suggestions were reviewed, and the final decisions regarding data processing, analysis, interpretation and visualisations were made by the author.