Forests in Transition: Visualizing Global Deforestation

INFO 526 - Project 1

Uncovering Global Deforestation and Soy Bean Consumption
Author
Affiliation

The Plotting Pandas - Megan, Shakir, Maria, Eshaan, Bharath

School of Information, University of Arizona

Abstract

This project delves into two crucial aspects of global environmental dynamics using the Global Deforestation dataset, a comprehensive resource published by Hannah Ritchie and Max Roser in the Our World in Data journal in 2021. The dataset encompasses a wide array of attributes related to global forest cover, deforestation rates, and associated factors. Two distinct questions guide our exploration.

With a focus on identifying the patterns in forest area conversion, the first question seeks to comprehend how the world’s forest cover has changed over the previous three decades. With the help of a choropleth map, we meticulously prepare, clean, and visualize the data in order to clearly depict net forest conversion across the globe. We use the strengths of ggplot and gganimate to build an interesting, dynamic map that sheds light on the dynamics of forests around the world.

The second question investigates the trajectory of soybean consumption in Brazil and its potential impact on afforestation and deforestation rates. Through data manipulation, we calculate total soybean consumption, revealing the crop’s evolution over time. Employing ggplot, we construct time series plots to showcase soybean consumption trends and assess their correlation of soybean consumption with afforestation and deforestation rates. The period from 1990 to 2013 becomes our focal point.

Introduction

The global environment is undergoing profound changes, driven by factors ranging from climate shifts to land use transformations. Within this complex web of interconnected challenges, the fate of the world’s forests and the dynamics of soybean consumption stand as two pivotal and interrelated aspects of environmental change. These subjects are the focus of our investigation, guided by the rich and detailed “Global Deforestation” dataset, a comprehensive resource provided by Hannah Ritchie and Max Roser in the “Our World in Data” journal in 2021.

The dataset offers an extensive repository of data, comprising variables such as net forest conversion, year, entity (providing country and continent information), and soybean consumption statistics. This dataset proves invaluable for analyzing the complex interplay between land use changes, soybean consumption, and broader conservation efforts. By leveraging advanced data analysis and visualization techniques, this project aims to provide critical insights into the ever-evolving dynamics of global forests and the influence of soybean consumption, contributing to a better understanding of essential environmental conservation and sustainable land management practices.

Question 2: How has the consumption of Soybean in Brazil changed over time, and how does it impact the afforestation or deforestation rates?

Introduction

The consumption of soybeans, a versatile and globally significant crop, is intricately linked with land use changes, often impacting regions far beyond agricultural fields. In the second question, we focus on the dynamic story of soybean consumption in Brazil. Our central question revolves around the historical evolution of soybean consumption and its potential implications for afforestation and deforestation rates in this vital agricultural region. This analysis aims to unveil the intricate relationship between soybean consumption and environmental changes in Brazil. The findings will contribute to a deeper understanding of how agricultural practices in this key region influence land use, afforestation, and deforestation. This knowledge is invaluable for making informed decisions regarding sustainable land management and conservation practices in this dynamic agricultural landscape.

For this visualization, we used soybean_use data which was sourced from Our World in Data and performed data manipulation to obtain a new column showing the total consumption of soybean. The soyabean_use data, comprises of the columns (variables) human_food ,animal_feed and processed.

Approach

Cleaning and processing of the dataset includes the following steps:

Soybean consumption in Brazil:

  1. Created a new column for calculating the total soybean consumption. Removing totals of countries whose total consumption is 0 using the subset function.
  2. Filtering for Brazil under the entity column, and year between 1990 and 2013.

Forest coverage in Brazil:

  1. Filtering for year between 1990 and 2013 in the forest_brazil dataset.
  2. There is a parameter ‘World’ which shows the overall forest coverage data. Filtering out entity as ‘World’ and year between 1990 and 2013, and grouping by year.
  3. Using left_join we merge the two tables based on the year column.
  4. Since we now have percentage data and total data per year, we can calculate the change in forest coverage for Brazil by doing forest_area.x * forest_area.y.
Pre-processing of soybean and forest data
#Function to pre-process the total_forest, soybean_use and forest_area datasets
#Input : total_forest- tibble
#        soybean_use- tibble
#        forest_area- tibble
#Output: soybean_brazil- tibble
#        forest_brazil- tibble


#Cleaning total_forest table
total_forest_cleaned <- clean_names(total_forest)

#Making a new column to calculate the total soybean consumption
soybean <- soybean_use |>
  mutate(total = human_food + animal_feed + processed)
#Some countries do not have consumption, and shows as 0. 
#Removing the rows if total=0
soybean <- subset(soybean, total != 0)

# Filter data for Brazil
soybean_brazil <- soybean |>
  filter(entity == "Brazil", year>= 1990&year<=2013)

# Filter data for Brazil forest: 
forest_brazil <- forest_area |>
  filter(entity == "Brazil",year>=1990&year<=2013)

#Finding total forest coverage per year
total_forest_world <- total_forest_cleaned |>
  filter(year >= 1990, year <= 2013, entity == "World") |>
  group_by(year)

# Left join to add total world forest coverage to the forest_brazil dataset
forest_brazil <- forest_brazil |>
  left_join(total_forest_world, by = "year")
 
#Finding actual total coverage for Brazil (percentage * total)
forest_brazil <- forest_brazil|>
  mutate(forest_area_brazil = forest_area.x * forest_area.y / 100)

Analysis

Plotting the soybean data

Plotting of soybean consumption in Brazil
#Code for creating the time series plot
#Used the soybean_brazil dataset created earlier as a data source
#using year and total as x and y axis for first layer
#Plotting points over line to increase visibility as second layer
#Manual fill to show trend as positive
#Input: year and total- numeric
#Output: plot_soybean_brazil- plot object


# Create a line plot for Brazil soybean consumption
plot_soybean_brazil <- ggplot(soybean_brazil, aes(x = year, y = total, color = "Brazil")) +
  geom_line(linewidth = 2) +    #Plotting line plot of series
  geom_point(color = "#6E8B3D") +  #Plotting points for clarity
  labs(x = "\nYear", 
       y = "Total (in lb)\n", 
       title = "Soybean consumption in Brazil\n", 
       caption = "Jon Harmon | TidyTuesday") +
  theme_minimal() +
  theme(legend.position = "none", plot.title = element_text(size = 15)) +
  scale_y_continuous(labels = scales::label_number(scale = 1e-06, suffix = "M")) + #Cleaning long numbers
  scale_color_manual(values = c("Brazil" = "#a6d96a")) +
  scale_x_continuous(limits = c(1990, 2013), breaks = seq(1990, 2013, by = 2))    #Defining year range

#Saving plot to location, and defining custom width
ggsave(plot_soybean_brazil, 
       filename = "images/q2/plot_soybean_brazil.jpg", 
       height   = 8, 
       width    = 15, 
       unit     = "in", 
       dpi      = 120)

plot_soybean_brazil

Animating the soybean graph to show the trends:

Animation of soybean usage
#Code to animate the plot using gganimate package

# Animate the plot
anim_plot_soybean <- plot_soybean_brazil + transition_reveal(year)

# Save as an animated GIF
anim_save("soybean_brazil_animation.gif", anim_plot_soybean, renderer = gifski_renderer())

# Load the animated GIF
brazil_soybean_animation <- image_read("soybean_brazil_animation.gif")

# Display the animation
brazil_soybean_animation |>
  image_animate(fps = 25)

Plotting the forest coverage in Brazil

Plotting of forest coverage in Brazil
#Code for creating the time series plot
#Used the forest_brazil dataset created earlier as a data source
#using year and total as x and y axis for first layer for line plot
#Plotting points over line to increase visibility as second layer
#Manual fill to show trend as negative
#Input: year and forest_area_brazil- numeric
#Output: plot_soybean_brazil- plot object


# Create a line plot for Brazil with points
plot_forest_brazil <- ggplot(forest_brazil, aes(x = year, y = forest_area_brazil, color = "Brazil")) +
  geom_line(linewidth = 2) +      #Plotting line plot of series
  geom_point(color="#fdae61") +   #Plotting points for clarity
  labs(x = "\nYear", 
       y = "Forest coverage (in hectares)\n", 
       title = "Forest coverage in Brazil\n", 
       caption= "Jon Harmon | TidyTuesday") +
  theme_minimal() +
  theme(legend.position = "none", plot.title = element_text(size = 15)) +
  scale_color_manual(values = c("Brazil" = "#fee08b"))+
  scale_x_continuous(limits = c(1990, 2013), breaks = seq(1990, 2013, by = 2))+    #Defining year range
  scale_y_continuous(labels = scales::label_number(scale = 1e-6, suffix = "M"))    #Cleaning long numbers

ggsave(plot_forest_brazil, 
       filename = "images/q2/plot_forest_brazil.jpg", 
       height   = 8, 
       width    = 15, 
       unit     = "in", 
       dpi      = 120)

plot_forest_brazil

Animation of forest coverage
#Animation of plot using gganimate package

# Animate the plot
anim_plot_forest <- plot_forest_brazil + transition_reveal(year)

# Save as an animated GIF
anim_save("forest_brazil_animation.gif", anim_plot_forest, renderer = gifski_renderer())

# Load the animated GIF
brazil_forest_animation <- image_read("forest_brazil_animation.gif")

# Display the animation
brazil_forest_animation |>
  image_animate(fps = 25)

Discussion

The discussion on the relationship between soybean consumption and environmental changes in Brazil is of paramount importance, given the global significance of soybeans as a versatile crop (Pagano & Miransari). The intricate link between land use changes and soybean consumption highlights the need for a comprehensive understanding of the dynamics at play. By examining the historical evolution of soybean consumption in Brazil, this study sheds light on the potential implications for afforestation and deforestation rates in this key agricultural region. It becomes evident that this had a notable impact on land use in Brazil.

The utilization of time series visualization techniques, including geom_line and geom_point, has allowed for a comprehensive overview of the trends over time. These visualizations provide a clear depiction of the steady increase in soybean consumption in Brazil. The data shows a remarkable increase, from approximately 16.4 million pounds of soybeans in 1990 to a staggering 36.87 million pounds in 2013. This indicates a substantial growth over this period (Pagano & Miransari).

Moreover, the decrease in forest coverage during this period is stark. The forest coverage in Brazil dropped from 588 million hectares in 1990 to 507 million hectares in 2013, representing a significant loss of 81 million hectares of forest land during this time. This reduction in forest area is indicative of the environmental impact in Brazil (Song et al.).

The correlation between rising soybean consumption and decreasing forest coverage in Brazil underscores the need for sustainable agricultural practices and conservation efforts. As the global demand for soybeans continues to grow, this study’s findings, supported by the data, serve as a valuable resource for policymakers and stakeholders in the region (Valdez). It underscores the importance of considering the environmental consequences of agricultural expansion and the need for measures to mitigate deforestation. This research contributes to the broader understanding of the complex interplay between agriculture and environmental changes, making it a pivotal step towards more informed and sustainable land management practices in Brazil.

References

Hannah Ritchie (2021) - “Forest area”. Published online at OurWorldInData.org. Retrieved from: ’https://ourworldindata.org/forest-area’ [Online Resource]

Valdez, C. (2022). Brazil’s Momentum as a Global Agricultural Supplier Faces Headwinds. Published online at ers.usda.gov. Retrieved from: Economic Research Service

Pagano, M. & Miransari, M. (2016). “The importance of soybean production worldwide.” Retrieved from: Science Direct

Song et al., (2021). “Massive soybean expansion in South America since 2000 and implications for conservation.” Retrieved from: National Library of Medicine

Quarto, For documentation and presentation - Quarto

ggplot, For understanding of different plot - ggplot

Logo, The logo used in the webiste - Online