# Load the packages

library(readr)
library(lubridate)
library(ggplot2)
library(dplyr)

# Import the data

coffee_prices <- read_csv("coffee prices.csv") %>%
  mutate(date = mdy(date)) %>%
  select(date, price = value)

Why Coffee?

Coffee is a brewed drink prepared from roasted coffee beans, the seeds of berries from certain Coffea species. Coffee has become an essential part of many peoples daily lives, commonly used to provide energy in the morning and throughout the day.

Below is a small snapshot of data from 1973 regarding the prices of coffee:

knitr::kable(head(coffee_prices))
date price
1973-08-20 0.6735
1973-08-21 0.6710
1973-08-22 0.6580
1973-08-23 0.6675
1973-08-24 0.6660
1973-08-27 0.6590

Here is a visual representation of all the data. The following data ranges from 8/20/1973 to 11/9/2021. The dark green line is a representation of when coffee prices spiked as a result of the shortage in Brazil due to bad weather (economic event one). The dark red vertical line is a representation of when coffee prices were at their lowest as a result of the coffee crisis (economic event two). The dark blue line is a representation of current day coffee prices spiking as a result of bottleneck shipping (economic event three).

ggplot(data = coffee_prices) +
  geom_line(mapping = aes(x = date, y = price)) +
  geom_vline(xintercept = as.Date("1992/8/17"), linetype = "dotdash", color = "darkred") +
  geom_vline(xintercept = as.Date("2021/10/18"), linetype = "dotdash", color = "darkblue") + 
  geom_vline(xintercept = as.Date("1977/4/11"), linetype = "dotdash", color = "darkgreen") +
  theme_classic() +
  labs(x = NULL, y = "Price (USD)", title = "Historical International Prices of Coffee", subtitle = "From 1973 to 2021", captions = "Source: Macrotrends.net/2535/coffee-prices-historical-chart-data")

Weather Impacts on Crop Supply

Surges in coffee prices can often be attributed to differing weather patterns and freezes in coffee-growing regions. In 1977, coffee prices reached an all-time high, soaring to inflation-adjusted prices of $3.55 per pound after frost destroyed Brazil’s coffee bean crops. The frost destroyed roughly 75% of Brazil’s 1975 coffee crops, leading to a massive shortage in supply. Brazil has been known to be the largest producer of coffee for a long time, so the overall effect of this was quite significant on the international price of coffee. The price slowly began to decrease towards the later months of 1977.

Source: https://www.washingtonpost.com/archive/business/1986/01/15/big-rise-predicted-in-coffee-prices/7c3a6c6c-755a-4afc-86e0-80a93953444a/

knitr::include_graphics("event_1.png")

The Coffee Crisis

Prior to 1989, coffee prices were controlled by a cartel, much like OPEC for oil. The International Coffee Agreement (ICA) imposed quotas and controlled prices between major coffee producing and consuming countries. In 1989, the ICA collapsed when it was not renewed. As a result of this, the amount of coffee that was being imported and exported heavily increased since there were no restrictions on trade. Under the free market, prices plummeted, down to $0.49 per pound in 1992. The small farmers got an even shorter end of the stick, most of them losing roughly 70% of their income.

Source: https://www.coffeehabitat.com/2006/02/the_coffee_cris/

knitr::include_graphics("event_2.png")

COVID Bottleneck

COVID has caused major issues for many products worldwide, including coffee. Disruptions to transportation of coffee around the world, caused by container shortages and port congestion, will likely keep coffee prices high for a longer time since they make it more difficult for the market to equally distribute it. Arabica coffee prices in New York were near the highest in seven years in October of 2021. Not only is COVID slowing down the process of timely shipping coffee where it needs to be, it’s also massively increasing the price due to shortages. As economy has taught us many times, the bigger the shortage the higher the price will skyrocket.

Source: https://www.reuters.com/world/americas/shipping-disruptions-keep-coffee-prices-high-longer-say-experts-2021-10-15/

knitr::include_graphics("event_3.png")