Activity: Creating a Histogram and Explaining its Features

Steps for Completion:

  1. Use the template code Lesson1_student.R.
This is an empty code, wherein the libraries are already loaded. You will be writing your code here.
  1. Load the dataset temperature.csv from the directory data.
  2. Create the histogram for two cities (Vancouver and Miami) by using the command discussed previously.
  3. Once the histogram is ready, run the code.
  4. Analyze the two histograms by giving three points for each histogram, and two points of difference between the two.

Outcome:

Two histograms should be created and compared. The complete code is as follows:

df_t <- read.csv("data/historical-hourly-weather-data/temperature.csv")ggplot(df_t,aes(x=Vancouver))+geom_histogram() ...

Get Applied Data Visualization with R and ggplot2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.