Over the last three weeks, I’ve talked about a project I’m doing for my data visualization class where I try to answer the question if past coffee rust data affects production amounts and/or coffee futures prices. Today I’m going to continue the series by talking in much more detail about one of the key visualizations that reveals insights – the correlation matrix.
There were 337 observations of rainfall, temperature, rust percent, production amount and futures variables from 1989-2013 from Brasil, Colombia and Papua New Guinea. The original hypotheses were that 1) more rain meant more coffee rust, 2) higher temperatures meant more coffee rust, 3) more coffee rust equals less production, 4) more coffee rust equals lower futures prices and 5) more coffee production equals lower futures prices. The correlation matrix shows that rain and temperature are not correlated to each other. Rain is negatively correlated with production (-0.6), meaning that if the rain decreases, production increases. Therefore we fail to accept hypothesis 1.
Rain and rust are negatively correlated to each other in a very small amount of -0.1 (very light blue in the correlation plot). An increase in rain will decrease the amount of rust so this hypothesis that an increase in rain will increase the amount of rust is not accepted. Temperature is negatively correlated to rust (-0.2) so if temperature increases, rust decreases. Based on this visualization, this initial hypothesis that increasing temperatures increase rust amounts cannot be accepted.Temperature is positively correlated to production about 0.4, meaning that if temperature increases, production decreases which is the expected finding since increasing temperatures usually mean the coffee rust can grow more easily and reduce production. Recall from the summary statistics above that the range of temperatures in our data is 23.36 – 27.16 C. Since coffee rust thrives in temperatures from 10 – 30 C and our data falls within this range, it is logical that temperature would affect the amount of coffee rust. The initial hypothesis that increased temperature increases coffee rust is confirmed.
Production is highly correlated (0.8) with futures prices variable. If production increases, futures prices go down. Since one of the initial hypotheses was that futures would decrease if production increases, the initial hypothesis can be confirmed. Next week I’ll conclude the series by talking about how I used D3 to create a webpage with the project findings.