Step 1: Load the Data

We will use the airquality data set, which you should already have as part of your R installation.

Step 2: Clean the data

After you load the data, there will be some NAs in the data. You need to figure out what to do about those nasty NAs.

Step 3: Understand the data distribution

Create the following visualizations using ggplot:

Step 4: Explore how the data changes over time

First, make sure to create appropriate dates (this data was from 1973). Then create line charts for ozone, temp, wind and solar.R (one line chart for each, and then one chart with 4 lines, each having a different color). Create these visualizations using ggplot.

Note that for the chart with 4 lines, you need to think about how to effectively use the yaxis. Hint: you should explore melt()

Step 5: Look at all the data via a Heatmap

Create a heatmap, with each day along the x-axis and ozone, temp, wind and solar.r along the y-axis, and days as rows along the y-axis. Great the heatmap using geom_tile (this defines the ggplot geometry to be ‘tiles’ as opposed to ‘lines’ and the other geometry we have previously used).

Note that you need to figure out how to show the relative change equally across all the variables

Step 6: Look at all the data via a scatter chart

Create a scatter chart (using ggplot geom_point), with the x-axis representing the wind, the y-axis representing the temperature, the size of each dot representing the ozone and the color representing the solar.R

Step 7: Final Analysis

LS0tCnRpdGxlOiAiSG9tZXdvcmsgNjogVmlzdWFsaXphdGlvbnMiCmF1dGhvcjogCi0gQXV0aG9yMQpkYXRlOiAiYHIgU3lzLnRpbWUoKWAiCm91dHB1dDogaHRtbF9ub3RlYm9vawotLS0KCmBgYHtyIHNldHVwLCBpbmNsdWRlPUZBTFNFfQojIEluc3RhbGwgcGFja2FnZXMgaWYgbmVjZXNzYXJ5CgpgYGAKCgojIyMgU3RlcCAxOiBMb2FkIHRoZSBEYXRhCldlIHdpbGwgdXNlIHRoZSBhaXJxdWFsaXR5IGRhdGEgc2V0LCB3aGljaCB5b3Ugc2hvdWxkIGFscmVhZHkgaGF2ZSBhcyBwYXJ0IG9mIHlvdXIgUiBpbnN0YWxsYXRpb24uIAoKYGBge3J9CiAKYGBgCgojIyMgU3RlcCAyOiBDbGVhbiB0aGUgZGF0YQpBZnRlciB5b3UgbG9hZCB0aGUgZGF0YSwgdGhlcmUgd2lsbCBiZSBzb21lIE5BcyBpbiB0aGUgZGF0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