1. Plot the summer streamflows (DJF) for the Burdekin river (y) against year (x).
# burdekin_streamflow <- read.csv(file.choose())
burdekin  <- read.csv("burdekin streamflow.csv")

burdekin$DJF <- burdekin$Dec + burdekin$Jan[-1] + burdekin$Feb[-1]

burdekin$DJF[53] = NA
# print(burdekin)

plot(DJF~Year, data=burdekin, type = "b", lty = 2, pch = 16, col = "blue", xlab = "Year", ylab = "DJF streamfloww (ml)", main = "Burdekin Summer Streamflow")

  1. Is there evidence of a trend? Why or why not?

There is no trend, as there is no overall increase or decrease over time, and there is large variation between years, as seen by the two large peaks being many orders of magnitude above the lows of the graph.

  1. Compute the median DJF streamflow
summary(burdekin$DJF)
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max.     NA's 
##   121130   855907  2921023  5559435  6649214 47290102        1
  1. Create a column in the R dataframe which contains the value “above” if DJF streamflow for that year is greater than the median, and “below” if DJF streamflow is less than or equal to the median.
burdekin$anomaly <- ifelse(burdekin$DJF > 2921023, "Above", "Below")
  1. Produce a mosaic plot which displays the percentages of “above” and “below” DJF streamflows for each JFM ONI phase in the NOAA_ONI_1950_to_2010.csv.
NOAA_ONI  <- read.csv("NOAA_ONI_1950_to_2010.csv")

burdekin$SON.ONI <- NOAA_ONI$SON[2:54]
burdekin$phase <- ifelse(burdekin$SON.ONI < -0.5, "La Nina",
                         ifelse(burdekin$SON.ONI > 0.5, "El Nino", "Neutral"))
tabulation <- table(burdekin$anomaly, burdekin$phase)
tabulation
##        
##         El Nino La Nina Neutral
##   Above       4      11      11
##   Below      11       6       9
mosaicplot(t(tabulation), cex.axis = 1.1, xlab = "SOI phase", ylab = "Proportion of years", col = c("blue", "red"), main = "Effect of ONI on yield outcome/streamflow")

  1. The water authorities management for the Burdekin water supply scheme were hopeful that they could use the JFM ONI phase to plan water usage over the coming year. Their advice depends on the amount of streamflows in the next summer. Would it be wise for the authority to use the figure that you produced in part (e) of this assignment to guide this planning process? Explain your reasoning.

Using the mosaic plot, we can see that La Nina conditions tend to be favourable for yield outcome as streamflow is greater, so if La Nina (or neutral) is predicted to be in the next summer, it would be reasonable to be more liberal with water usage. However, we also see in the DJF streamflow over time graph from a. that there is no pattern to streamflow, due to a plethora of other potential climate/weather factors influencing it.

So, using the mosaic plot would be of use during the planning process, as long as it is used in conjunction with other predictive models for other factors influencing the hydrology of the Burdekin river. Planning based on a single model will always lead to unexpected results, and the only way to get a more holistic understanding of the streamflow is to use multiple models.