World Bank Commodity Price Data (The Pink Sheet)

Data - WB

Info

LAST_DOWNLOAD

LAST_DOWNLOAD
2024-05-23

LAST_COMPILE

LAST_COMPILE
2024-06-20

Last

date Nobs
2024-04-01 67

variable

Natural Gas: Europe and US

Nominal prices

Linear

Code
CMO %>%
  filter(Variable %in% c("Natural gas, US", "Natural gas, Europe")) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Current $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.4, 0.8),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = seq(-20, 400, 10),
                     labels = dollar_format(a = 1))

Log

All

Code
CMO %>%
  filter(Variable %in% c("Natural gas, US", "Natural gas, Europe")) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Current $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.4, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = c(0.1, 0.2, 0.3, 0.5, 0.8, 1, 2, 3, 4, 5, 8, 10, 15, 20, 30, 40, 50),
                     labels = dollar_format(a = .1))

1990-

Code
CMO %>%
  filter(Variable %in% c("Natural gas, US", "Natural gas, Europe")) %>%
  filter(date >= as.Date("1990-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Current $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.4, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = c(0.1, 0.2, 0.3, 0.5, 0.8, 1, 2, 3, 4, 5, 8, 10, 15, 20, 30, 40, 50, 80, 100),
                     labels = dollar_format(a = 1))

2000-

Code
CMO %>%
  filter(Variable %in% c("Natural gas, US", "Natural gas, Europe")) %>%
  filter(date >= as.Date("2000-01-01")) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Current $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = scales::date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.4, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = c(0.1, 0.2, 0.3, 0.5, 0.8, 1, 2, 3, 4, 5, 8, 10, 15, 20, 30, 40, 50, 80, 100),
                     labels = dollar_format(a = 1))

Real prices

Linear

Code
CMO %>%
  filter(Variable %in% c("Natural gas, US", "Natural gas, Europe")) %>%
  left_join(CPIAUCSL, by = "date") %>%
  arrange(desc(date)) %>%
  mutate(value = value*CPIAUCSL[1]/CPIAUCSL) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Constant $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.2, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = seq(-20, 400, 5),
                     labels = dollar_format(a = 1))

Log

All

Code
CMO %>%
  filter(Variable %in% c("Natural gas, US", "Natural gas, Europe")) %>%
  left_join(CPIAUCSL, by = "date") %>%
  arrange(desc(date)) %>%
  mutate(value = value*CPIAUCSL[1]/CPIAUCSL) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Constant $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.2, 0.9),
        legend.title = element_blank()) +
  scale_y_log10(breaks = c(1, 2, 3, 4, 5, 8, 10, 15, 20, 30, 40, 50),
                     labels = dollar_format(a = 1))

1990-

Code
CMO %>%
  filter(Variable %in% c("Natural gas, US", "Natural gas, Europe")) %>%
  left_join(CPIAUCSL, by = "date") %>%
  arrange(desc(date)) %>%
  filter(date >= as.Date("1990-01-01")) %>%
  mutate(value = value*CPIAUCSL[1]/CPIAUCSL) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Constant $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 5) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.2, 0.9),
        legend.title = element_blank()) +
  scale_y_log10(breaks = c(1, 2, 3, 4, 5, 8, 10, 15, 20, 30, 40, 50),
                     labels = dollar_format(a = 1))

2000-

Code
CMO %>%
  filter(Variable %in% c("Natural gas, US", "Natural gas, Europe")) %>%
  left_join(CPIAUCSL, by = "date") %>%
  arrange(desc(date)) %>%
  filter(date >= as.Date("2000-01-01")) %>%
  mutate(value = value*CPIAUCSL[1]/CPIAUCSL) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Constant $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 2) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.2, 0.9),
        legend.title = element_blank()) +
  scale_y_log10(breaks = c(1, 2, 3, 4, 5, 8, 10, 15, 20, 30, 40, 50, 80),
                     labels = dollar_format(a = 1))

1999-

Linear
Code
plot_linear <- CMO %>%
  filter(Variable %in% c("Natural gas, US", "Natural gas, Europe")) %>%
  arrange(desc(date)) %>%
  filter(date >= as.Date("1999-01-01")) %>%
  filter(date <= as.Date("2024-01-01")) %>%
  mutate(country = case_when(Variable == "Natural gas, US" ~ "États-Unis",
                             Variable == "Natural gas, Europe" ~ "Europe",
                             T ~ NA))  %>%
  ggplot + geom_line(aes(x = date, y = value, color = country)) +
  labs(x = "", y = "") + theme_minimal() +
  scale_x_date(breaks = c(seq(1999, 2100, 5), seq(1997, 2100, 5)) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = c("#B22234", "#003399")) +
  theme(legend.position = c(0.2, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = seq(0, 100, 5),
                     labels = dollar_format(a = 1)) +
  labs(caption = "Source: Banque Mondiale, Commodity Markets Outlook")
  

plot <- plot_linear
plot_linear

Code
save(plot, file = "CMO_files/figure-html/natural-gas-real-linear-1999-1.RData")
Log
Code
plot_log <- plot_linear +
  scale_y_log10(breaks = c(1, 2, 3, 4, 5, 8, 10, 15, 20, 30, 40, 50, 80),
                     labels = dollar_format(a = 1))

plot <- plot_log
save(plot, file = "CMO_files/figure-html/natural-gas-real-log-1999-1.RData")
plot

Both
Code
plot_both <- ggpubr::ggarrange(plot_linear, plot_log)

plot <- plot_both
save(plot, file = "CMO_files/figure-html/natural-gas-real-both-1999-1.RData")
plot

Wheat Prices

Nominal prices

Linear

Code
CMO %>%
  filter(Variable %in% c("Wheat, US HRW", "Wheat, US SRW")) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of wheat (Current $/mt)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.4, 0.8),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = seq(0, 2000, 50),
                     labels = dollar_format(a = 1))

Log

Code
CMO %>%
  filter(Variable %in% c("Wheat, US HRW", "Wheat, US SRW")) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of wheat (Current $/mt)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.4, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = 100*c(0.1, 0.2, 0.3, 0.5, 0.8, 1, 1.5, 2, 3, 4, 5, 7, 8, 10, 12, 14, 20, 30, 40, 50, 80),
                     labels = dollar_format(a = 1))

Real prices

Linear

Code
CMO %>%
  filter(Variable %in% c("Wheat, US HRW", "Wheat, US SRW")) %>%
  left_join(CPIAUCSL, by = "date") %>%
  arrange(desc(date)) %>%
  mutate(value = value*CPIAUCSL[1]/CPIAUCSL) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of wheat (Current $/mt)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.8, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = seq(0, 2000, 50),
                     labels = dollar_format(a = 1))

Log

Code
CMO %>%
  filter(Variable %in% c("Wheat, US HRW", "Wheat, US SRW")) %>%
  left_join(CPIAUCSL, by = "date") %>%
  arrange(desc(date)) %>%
  mutate(value = value*CPIAUCSL[1]/CPIAUCSL) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of wheat (Current $/mt)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.8, 0.9),
        legend.title = element_blank()) +
  scale_y_log10(breaks = 100*c(0.1, 0.2, 0.3, 0.5, 0.8, 1, 1.5, 2, 3, 4, 5,  8, 10, 12, 14, 20, 30, 40, 50),
                     labels = dollar_format(a = 1))

Oil

Nominal prices

Linear

Code
CMO %>%
  filter(Variable %in% c("Crude oil, Dubai", "Crude oil, WTI")) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of oil (Current $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.4, 0.8),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = seq(-20, 400, 10),
                     labels = dollar_format(a = 1))

Log

Code
CMO %>%
  filter(Variable %in% c("Crude oil, Dubai", "Crude oil, WTI")) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Current $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.4, 0.8),
        legend.title = element_blank()) +
  scale_y_log10(breaks = c(1, 2, 3, 4, 5, 8, 10, 15, 20, 30, 40, 50, 80, 100, 200, 300, 500),
                     labels = dollar_format(a = 1))

Real prices

Linear

Code
CMO %>%
  filter(Variable %in% c("Crude oil, Dubai", "Crude oil, WTI")) %>%
  left_join(CPIAUCSL, by = "date") %>%
  arrange(desc(date)) %>%
  mutate(value = value*CPIAUCSL[1]/CPIAUCSL) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Constant $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.2, 0.9),
        legend.title = element_blank()) +
  scale_y_continuous(breaks = seq(-20, 400, 5),
                     labels = dollar_format(a = 1))

Log

Code
CMO %>%
  filter(Variable %in% c("Crude oil, Dubai", "Crude oil, WTI")) %>%
  left_join(CPIAUCSL, by = "date") %>%
  arrange(desc(date)) %>%
  mutate(value = value*CPIAUCSL[1]/CPIAUCSL) %>%
  ggplot + geom_line(aes(x = date, y = value, color = Variable)) +
  labs(x = "", y = "Price of natural gas (Constant $/mmbtu)") + theme_minimal() +
  scale_x_date(breaks = seq(1920, 2025, 10) %>% paste0("-01-01") %>% as.Date,
               labels = date_format("%Y")) +
  scale_color_manual(values = viridis(3)[1:2]) +
  theme(legend.position = c(0.2, 0.9),
        legend.title = element_blank()) +
  scale_y_log10(breaks = c(1, 2, 3, 4, 5, 8, 10, 15, 20, 30, 40, 50, 100, 200, 300, 500),
                     labels = dollar_format(a = 1))