In this analysis, we are examining the trend in the production 3 major crops over the years to understand significant growth periods and their implications for global food production and food security.
The data were downloaded from FAOSTAT: https://www.fao.org/faostat/en/#data/QCL
Weβll use the ggplot2 library to generate a chart with an aesthetic visual Hereβs the code used to create the visual:
# Load necessary libraries
library(rio)
library(dplyr)
library(ggplot2)
library(ggthemr)
library(mediocrethemes)
df=import('https://raw.githubusercontent.com/datalake101/dataLakes/refs/heads/master/FAOcropData.csv')
ggthemr('dust') # An adorable theme!
df %>%
ggplot(aes(x = Year, y = Value / 1e9, color = Item)) +
geom_line() +
geom_point() +
annotate("rect", xmin = 2007, xmax = 2009, ymin = -Inf, ymax = Inf,
alpha = 0.2, fill = "lightblue") +
annotate("rect", xmin = 2017, xmax = 2019, ymin = -Inf, ymax = Inf,
alpha = 0.2, fill = "lightgreen") +
labs(title = "Value Across Years by Items", x = "Year",
y = "Value (Billions)") +
theme_minimal() +
theme(legend.title = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.background = element_blank(),
plot.background = element_blank()) +
theme_mediocre()
In the graph, we see significant increases in rice production during two main periods: 2007-2009 and 2017-2019. The first spike likely relates to the global food crisis, where higher food prices and increased demand pushed for more production.
Advances in farming techniques and technologies also contributed to this rise. The second peak from 2017-2019 corresponds to growing global demand, particularly in countries with rising populations. These periods highlight the importance of responsive agricultural practices to ensure stable food supply and security in a changing world. πΎπ