Trends In Fuel Consumption Through The Years


Charts & Graphs, Lab Reports, Visualization

Introduction

Fuel consumption resonates with people in a variety of ways. People who are conscious about climate change may want to see how it has decreased or increased over the years and relate it to environmental conditions at the time, while people looking for a new car may want to know which make and model will reduce their fuel expenditure. The dataset that I chose to visualize for this lab contains information about changes in fuel consumption between 2000 and 2022 according to a variety of factors. To keep my visualizations relatable, I have chosen year, fuel consumption, make, model and vehicle class as the major factors for analysis.

Method

Dataset:

The dataset used for these visualizations, Fuel Consumption 2000-2022, was obtained from Kaggle, an online source for public datasets. This dataset contains information about different makes and models of cars, and their fuel consumption over a time period ranging from the year 2000 to the year 2022.

Software:

I used R, an open source programming software to refine and clean up the dataset a bit before visualizing it. I created my visualizations using Tableau, a free open source software that helps create many different types of data visualizations, including bar charts, pie charts, maps and more.

Process:

I downloaded the dataset as a CSV file and loaded it into R to examine the data and check for any problems. There were a few issues with capitalization of categories, which led to two values that were actually the same being considered as two distinct values. For example, Acura and ACURA are the same model, but due to the word being capitalized in some instances, it led to the data being recorded separately. There were also problems with punctuation conventions in the dataset, such as SUV-SMALL also being entered in as SUV:SMALL. I used R to clean up these issues and then created a new CSV file to use for Tableau.

I then loaded the cleaned dataset file into Tableau Public. This was my first time using Tableau Public, and the interface made it very easy to choose different forms of visualizations according to the objects I was choosing to represent. I experimented quite a bit with different visualizations, which allowed me to figure out which ones were readable enough and conveyed the information they were supposed to while also being aesthetic. While there were a lot of different options that I discovered along this process, I chose simple and basic visualization styles over complex ones and added color to them to make them more appealing. The visualizations can be viewed here.

I made different visualizations analyzing the data in varied contexts, and chose the most effective visualizations in each case. For example, in order to see which year had the most fuel consumption, I tried a packed bubble visualization, a heatmap and a simple line graph.

Heat map showing fuel consumption according to year

Packed bubble map showing fuel consumption according to year

In both cases, it was clear that the fuel consumption was almost the same for some years, making the bubbles or segments similar in size and shade. I felt that the low visual distinction made these options a less than ideal way to show this particular trend. However, a line graph showed the rise and fall in fuel consumption a bit more clearly.

Line graph showing fuel consumption through the years

I could tell from this graph that there was a steady and moderately steep increase in fuel consumption between 1999 and 2005, after which the fluctuation in consumption occurs every few years. 

I also made a few visualizations comparing vehicle class, make and model separately with fuel consumption. Heatmaps and packed bubbles were slightly more effective here, but I still didn’t feel that they were the best way to go.

Heatmap showing fuel consumption according to vehicle class

Packed bubbles showing fuel consumption according to class

In these cases, there is a little more variation than the visualizations relating fuel consumption and year, but not enough to give an accurate picture. They do, however, provide a broad idea about which vehicle classes consume a bit more fuel. I went with a simpler horizontal bar chart here, since I felt that it represented the difference accurately and visually at the same time.

Bar chart showing fuel consumption according to vehicle class

I made similar visualizations for make and model, and ended up settling for horizontal bar charts in both cases.

The final visualization that I created displays the relationship between fuel consumption, year and vehicle class. I felt that vehicle class would be the best category to use here since it is a relatively broad category. An area chart portrayed this information best, giving a clear visual idea of which vehicle classes consumed more fuel, along with the changes in their fuel consumption over time.

Area chart depicting fuel consumption of different vehicle classes over the years

An assumption that SUV data was recorded according to size after 2012 can be made from this chart, since SUV data stops around 2012 and SUV:SMALL and SUV: STANDARD start around then. All in all, SUVs in general have the highest fuel consumption as per this data. The fluctuations in consumption themselves don’t seem to display any drastic variations.

Reflection

A feedback session with my lab partner revealed a possible issue with the area chart relating year, fuel consumption and vehicle class, in that the areas covered may be misinterpreted as accurate measures of fuel consumption. We decided that a possible solution to this would be to clarify that the visualization is purely representative, in writing. In terms of the data itself, there was no major fluctuation I could see in fuel consumption over the years. I would, however, like to explore reasons for the steady increase from 1999 to 2003, and possibly visualize data pertaining to those reasons along with this dataset. While the color scheme provided by Tableau is functional, I would like to experiment a little with color combinations myself. This lab made me realize how visualizing data can create so many more paths for analysis, and I would like to explore this topic in relation to other areas – economic, environmental, situational and more.