10/23/2019

Introduction

Coursera JHU Week 3 assignment requires to create a web page presentation using R Markdown that features a plot created with Plotly.

The dataset used comes from R4DS Online Learning Community called TidyTuesday. A weekly dataset is published in the site and invites R code enthusiasts to develop data exploration and visualization skills.

Dataset

For the assignment, I chose the Big mtcars dataset from the EPA. It’s essentially a much much larger and updated dataset covering mtcars, the dataset we all know a bit too well!

Ready, set, go!!

Read the data and display the first rows with head

From the dataset, subset the features needed to construct the plot.
make model displ highway08 cylinders co2TailpipeGpm
Chevrolet T10 (S10) Pickup 4WD 2.8 22 6 493.72
Nissan Sentra/200SX 1.6 33 4 329.15
Ford Transit Connect Wagon LWB FWD 2.5 27 4 404.00
Dodge Omni 2.2 31 4 355.48
Chevrolet Silverado 1500 AWD 6.0 15 8 683.62
Jaguar XF FFV 5.0 23 8 500.00

Scatterplot displ (engine displacement in liters) and highway08 (highway MPG for fuel type 1)