Data description

The data set which is being analyzed within this R Markdown document will be the the “MPG” data set obtained from the “ggplot2” library. This data set consists of 234 rows and 11 columns. The data in each column consist of the car manufacturer, model, year, highway/city mpg, etc. Below is a table consisting of all of the variables and a desciption of the type of data contained under each column.

Summary Data Table:

Variable Description
manufacturer The company who is responsible for making the vehicle
model The model of the car
displ The displacement or engine size of the engine in the standard model of the vehicle (in liters)
year The model year of the vehicle
cyl The number of cylinders in the vehicle’s engine
trans The type of transmission inside of the vehicle (manual or automatic)
drv “drv” stands for “drivetrain” which is either forward, rear, or 4-wheel drive
cty The number of city miles per gallon that the car is able to achieve
hwy The number of highway miles per gallon that the car is able to achieve
fl The vehicle’s fuel type
class The “type” of the vehicle (ex: compact, subcompact, midsize, etc.)

Data Visualizations - Plot #1

Description and Interpretation of First Plot

The first plot (seen above) shows the combined average car MPG per manufacturer. That is, the average combined MPG across all car models per manufacturer were computed, and graphed depicted in the form of a bar chart. These variables were chosen to show a more general relationship between average combined MPG across all car models from the same manufacturer, summarized by manufacturer. It may be infered that Honda has the best fuel efficiency across all models, while Land Rover has some of the worst.

Data Visualizations - Plot #2

Description and Interpretation of Second Plot

The second plot (pictured above) illustrates every car’s combined MPG vs. its class; for example, Ford, Dodge, Chevrolet, etc. In addition, each dot, which represents a vehicle, is color coded to match the vehicle’s make. Such variables were chosen to depict the general trend that smaller cars generally gain higher fuel economies as opposed to larger cars. In general, it may be concluded that SUV’s have some of the worst fuel efficiency’s, while compact and subcompact cars rank as some of the best.