Executive Summary

Climate change is a real and serious problem the world is facing currently. The effects of warming are already driving people from their homes as sea rise, as well as killing trees and animal species which also directly affects the food production system. However,ironically the food production system is also a big contributor to climate change. According to a new study(https://www.nature.com/articles/s43016-021-00358-x), it is shown that the food system generates about 35% of the total global man-made greenhouse gas emissions. Therefore, it is critically important to keep track of greenhouse gas emissions from different food sectors and food-producing regions, and the relationship between these factors.

So with our research on the following database, we will be finding out which food type is the most consumed among 130 different countries, compare the CO2 emissions between these food types, and then based on the previous 2 researches, finally figure out the average amount of CO2 emissions of each country compared to the average food consumption.

Data Background

This data set is based on a study that has been published by the Food and Agriculture Organization of the United Nations(FAO), where they look at 130 countries around the world to determine the CO2 emission of each country based on their diet.

There are only 4 columns in this dataset, which are ‘country’, ‘food_category’, ‘consumption’, and ‘co2_emmission’. The ‘country’ column contains 130 different countries as mentioned, and in the ‘food_category’ column, there are different food types from animal products such as pork, poultry, beef, lamb & goat, fish, eggs, and milk(including cheese), to non-animal products such as wheat and wheat products, rice, soybeans, and nuts(including peanut butter). The ‘consumption’ column shows the amount of consumption calculated by how many kgs a person consumes in a year, and lastly the ‘co2_emmission’ column shows the amount of CO2 emission calculated by how much CO2 kgs a person emits in a year.

The big reason why we chose this dataset is because we thought the columns were simple yet essential, therefore could make use of all 4 columns for our research.

Data Cleaning

In order to visualize the data efficiently, the following data cleaning process would be necessary.

- Calculation and addition of a separate column of the sum of consumption of each food type for all 130 countries, and the percentage of each food type

- Calculation and addition of a separate column for CO2 emission per consumption

- Calculation and addition of a separate column for the means of the CO2 emission rate for each food type

Each paragraph has a different processing method, so we will not leave a unified data cleaning here.

Individual Figures

Figure 1. Percentage of Global Food Consumption by Type of Food (Spinogram)

For this sector, we figured out which food type in the food category is being consumed the most in a global scale. We thought the use of a spinogram(a.k.a. a stacked bar graph) would be suitable as the aesthetic in this case, since it’ll be easier to visualize and understand.

We first grouped the ‘food_consumption’ by the ‘food_category’ variable and summarised to a new variable to which we named ‘N’, this would be the sum value of consumption for each food category. Then added a new variable with the ‘mutate’ function called ‘pct’, which is the percentage of the ‘N’ value from each food categories rounded to zero decimal places(to avoid complication in numbers), and we chose this as the y-axis. Then finally plotted the spinogram by using ‘geom_bar(stat = “identity”)’, and adjusted the width of the bar for a better looking aesthetic.

q1g <- food_consumption %>%
  group_by(food_category) %>% 
  summarise(N = sum(consumption)) %>%
  mutate(pct = round((N/sum(N)*100),0)) %>%
  ggplot(aes(x = "",
             y = pct,
             fill = food_category)) +
  geom_bar(stat = "identity", width = 0.5) + 
  labs(x = "",
       y = "Percentage(%)",
       title = "Global Consumption on Different Food Categories",
       fill = "Food Category",
       caption = "Data: Food carbon footprint index By FAO, November 28th, 2019.") 

ggsave(here("images", "fig1.png"), plot = q1g)
## Saving 7 x 5 in image
q1g

Figure 2. CO2 Emissions Compared to Consumption by Food Type (Simple Bar Chart)

In this section, we checked the average carbon emission (kg/year) by food type. After obtaining emissions compared to consumption in all rows, we used the ‘group_by’ function as the food type. And we calculated the average value. After calculating the average carbon emission by food type, we visualized it as a bar graph. Different foods were given different colors, and foods with high average carbon emissions were organized in descending order to make them easier to see. The graph was aesthetically bad in terms of the y-axis due to the large number of some foods, and it was difficult to see the food name tag. So We improved readability by ‘code_flip’. We tried to narrow the gap between the numbers using the wave line to create a good-looking graph. However, We gave up because there was no function in the ggplot.

q2 <- food_consumption %>% 
  mutate(co2_per = co2_emmission/consumption) %>%
  select(food_category, co2_per) %>%
  group_by(food_category) %>%
  summarise(co2_per_mean = mean(co2_per, na.rm=TRUE))
  
q2c <- ggplot(data = q2, mapping = aes(x = reorder(food_category, co2_per_mean), y = co2_per_mean, fill = food_category))

q2g <- q2c + geom_col() + coord_flip() + guides(fill = FALSE) + 
       labs(x = "Food Type", y = "CO2 Emmissions(kg/year)",
       title = "CO2 Emissions Compared to Consumption by Food Type",
       subtitle = "Emissions per kilogram of food consumption in 1kg",
       caption = "Data: Food carbon footprint index By FAO, November 28th, 2019.")
## Warning: The `<scale>` argument of `guides()` cannot be `FALSE`. Use "none" instead as
## of ggplot2 3.3.4.
ggsave(here("images", "fig2.png"), plot = q2g)
## Saving 7 x 5 in image
q2g

Figure 3. Average Amount of CO2 Emissions Compared to Average Food Consumption by Country (Scatter Graph)

In this part, the average of food carbon emissions compared to the average of food consumption by country was calculated. The average consumption was calculated by adding all consumption by food type by country, and carbon emissions were also the same. Through this, it was possible to check how much carbon is emitted per kilogram of food by country regardless of the type of food. The results were also expressed in a scatter graph. By drawing the trend line, it was possible to confirm the average between countries. In particular, based on the trend line, the lower part was divided into low-emission countries with less emissions than average emissions, and the upper part was divided into high-emission countries with more emissions than average emissions. In addition, the lowest emission countries and the highest emission countries were also found and displayed using the annotate function. For each area, it was easy to see by coloring it with the annotate’s polygon function.

q3 <- food_consumption %>% 
  group_by(country) %>%
  mutate(average_consumption =mean(consumption, na.rm=TRUE)) %>% 
  mutate(average_co2_emmision= mean(co2_emmission, na.rm=TRUE)) %>% 
  count(average_consumption, average_co2_emmision)


q3c <- ggplot(data = q3, mapping = aes(x= average_consumption, y = average_co2_emmision))

q3g <- q3c + geom_point() + geom_smooth(method = "lm", se=FALSE) + 
  annotate("text", x=23.7, y=27, label="← India", size=4) + annotate("text", x=6, y=51, label="Niger →", size=4) + 
  annotate(geom = "polygon", x = c(0, 60, 60), y = c(-0, 0, 160), fill = "blue", alpha = 0.1 ) + 
  annotate(geom = "polygon", x = c(0, 0, 60, 60), y = c(-0, Inf, Inf, 160), fill = "red", alpha = 0.1 ) +        
  labs(x = "Average food consumption (kg/year)", y = "Average CO2 emissions from food (kg/year)",
       title = "Average Amount of CO2 Emissions 
       Compared to Average Food Consumption by Country",
       subtitle = "With the classification of countries above and below average",
       caption = "Data: Food carbon footprint index By FAO, November 28th, 2019.")

ggsave(here("images", "fig3.png"), plot = q3g)
## Saving 7 x 5 in image
## `geom_smooth()` using formula = 'y ~ x'
q3g
## `geom_smooth()` using formula = 'y ~ x'

Total Summary

First, in Figure 1, we looked at what kind of food humans consume the most. Dairy products accounted for the largest proportion, wheat was the second largest, and rice was the third largest. Considering that wheat, Western, and rice are Eastern staple foods, it makes sense that these two together make up a pretty large proportion.

However, as you can see in Figure 2, much of that consumption is independent of carbon emissions per kg. Both rice and wheat have very low levels of carbon emissions per kg. In other words, it can be seen that much of its consumption has no significant impact on global environmental degradation.

The part to pay attention to is meat. Meat doesn’t make up a large proportion as you can see in Figure 1. But its carbon emissions are very large compared to other foods. The percentage of meat carbon emissions on the graph makes other things look very small. Meat is an important food for human nutrition. However, as it produces and consumes a lot of carbon emissions, it is necessary to develop alternative meat and artificial meat.

In Figure 3, we looked at the carbon emissions from food consumption by country. Based on the trend line, you can see which countries emit more or less than average. The highest percentage is Niger and the lowest is India. Niger, which has the largest emissions compared to consumption, has a meat consumption ratio of about 14% of the total. India, which has the smallest emissions to consumption, has a meat consumption ratio of about 1.5% of the total.

This proves that meat has such a large carbon footprint. But we don’t want to cut meat consumption unconditionally or insist on veganism. Meat has long been loved as a great source of nutrition for mankind. Its consumption is almost essential. Therefore, rather than eliminating or blindly reducing this, efforts should be made to reduce environmental pollution arising from its production, as in many other areas. The development of alternative meat and artificial meat is also a part to pay attention to.