A 2018 study done by the Food and Agriculture Organization of the United Nations (FAO) collected food consumption and CO2 emission data for 130 countries around the world. The purpose was to determine how much carbon dioxide each country emits based on their diets. A secondary purpose was to illustrate the differences between the carbon dioxide emissions of animal products and non-animal products. I attempt to visualize this second goal.
The original data is from the 2018 Food Carbon Footprint Index study done by the Food and Agriculture Organization of the United Nations (FAO). This original data and description of the study can be found here.
The data was stored in a poorly designed survey on the webpage and webscraped by Kasia Kulma. Her process can be found here.
I found the data through Thomas Mock’s Tidy Tuesday project, which submits a new data set of interest every Tuesday to explore. The particular dataset for my data is here.
I was particularly inspired by Chapter 10 of Claus Wilke’s textbook, in which he explains best practice for visualizing proportions. I found that showing the food categories as individual bars allowed for the best comparison between the categories, whereas a pie chart or stacked bar chart would not have made it as easy. For the total consumption and emission graphs, I chose to make horizontal stacked bars. This is since only having two categories allows for easy comparison and does not obscure the actual length of each group based on where it is on the stacked bar. I also tried to follow as many of his Part 2 principles as possible, such as following the principle of proportional ink (having the actual data be what is most darkly colored), avoiding line drawing by filling in all the bars, and not overdoing labels and titles (I did not label the legend, since it was relatively self-explanatory). Finally, I worked hard to tell a story through this visualization. I attempted to introduce the data with the upper-left visualization, then develop the issue through the upper-right hand visual. The bottom stacked bars really drive it home and complement the upper visuals nicely.
Technically, I experienced a very large learning curve with plotly. I had a hard time finding any documentation or help online to answer a lot of the aesthetic questions I had about my visualization. I had to undergo many hours of trial and error to fix even one small aspect of my visual, and there are still things I am not satisfied with about my visual. For example, I was not able to figure out how to customize the tooltips. I also would have liked to include value labels in all the bars and the stacked bars to allow for easier data analysis. However, I could not figure out these processes as hard as I tried. My overall opinion is that plotly is not worth the hassle.