# Volume trends
# ##@## plots of European demand by product: line
for (c in unique(data_exports$cmdcode)) {
cmdcode_label = unique(data_exports$cmddesc[data_exports$cmdcode == c])
p <- data_imports %>%
dplyr::filter(
cmdcode == c,
!reporterdesc %in% c("Italy","Spain"),
motdesc %in% c("TOTAL MOT"),
partnerdesc %in% c("World")) %>%
ggplot(aes(x=refyear, y=qty_tn, group=reporterdesc, color=reporterdesc)) +
geom_line() +
facet_wrap(vars(cmddesc)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(title = paste0("European volume demand overtime; selected countries:\n",cmdcode_label),
x = "Year",
y = "Quantity (Tons)",
color = "Importing Country")
# Print the plot to the device
print(p)
}Market analysis
Bruma Cacao: Market Analysis
This document provides an overview of the cocoa-derived product market in a selected set of European countries.
German international demand relative to other countries.
The plots below shows the international demand in volume terms for selected European countries, including Germany.
The plots below shows the price changes overtime for cocoa-derived products for selected European countries, including Germany.
# Price trends: current
# ##@## plots of European demand by product: line
# Loop through each unique cmdcode
for (c in unique(data_exports$cmdcode)) {
cmdcode_label = unique(data_exports$cmddesc[data_exports$cmdcode == c])
p <- data_imports %>%
dplyr::filter(
cmdcode == c,
!reporterdesc %in% c("Italy","Spain"),
motdesc %in% c("TOTAL MOT"),
partnerdesc %in% c("World")) %>%
ggplot(aes(x=refyear, y=price_kg, group=reporterdesc, color=reporterdesc)) +
geom_line() +
facet_wrap(vars(cmddesc)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(title = paste0("European price trends (current USD), selected countries:\n",cmdcode_label),
x = "Year",
y = "USD per Kg",
color = "Importing Country")
# Print the plot to the device
print(p)
}Colombia as cocoa-derived products relative to other countries.
The plots below shows export profiles of selected LatAm countries, including Colombia.
data_exports_avg %>%
dplyr::filter(
# cmdcode != 1806
#,reporterdesc %in% c("Germany")
motdesc %in% c("TOTAL MOT"),
partnerdesc %in% c("World")
) %>%
ggplot( aes(fill=cmddesc, y=qty_tn_avg, x=reporterdesc)) +
geom_bar(position="fill", stat="identity") +
#facet_wrap(vars(cmddesc)) +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(title = paste0("Export composition of selected LatAm countries,\ndestined to the World"),
x = "Year",
y = "Quantity (Tons)",
color = "Country of Origin")# Loop through each unique cmdcode
for (c in unique(data_exports$cmdcode)) {
cmdcode_label = unique(data_exports$cmddesc[data_exports$cmdcode == c])
# Create the plot
p <- data_exports %>%
dplyr::filter(
cmdcode == c,
reporterdesc %in% c("Ecuador", "Colombia", "Peru"),
motdesc == "TOTAL MOT",
partnerdesc == "World"
) %>%
ggplot(aes(x = refyear, y = qty_tn, group = reporterdesc, color = reporterdesc)) +
geom_line() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(title = paste0("Evolution of selected South American exports to the World:\n",cmdcode_label),
x = "Year",
y = "Quantity (Tons)",
color = "Country of Origin")
# Print the plot to the device
print(p)
}Colombia-German trade analysis
# Colombia - Germany
# ##@## Evolution of LatAm exports to World: line
# Loop through each unique cmdcode
for (c in unique(data_exports$cmdcode)) {
cmdcode_label = unique(data_exports$cmddesc[data_exports$cmdcode == c])
# Create the plot
p <- data_exports %>%
dplyr::filter(
cmdcode == c,
reporterdesc %in% c("Ecuador", "Colombia", "Peru"),
motdesc == "TOTAL MOT",
partnerdesc == "Germany"
) %>%
ggplot(aes(x = refyear, y = qty_tn, group = reporterdesc, color = reporterdesc)) +
geom_line() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(title = paste0("Evolution of selected South American exports to the Germany:\n",cmdcode_label),
x = "Year",
y = "Quantity (Tons)",
color = "Country of Origin")
# Print the plot to the device
print(p)
}