Data visualization, part 1. Code for Quiz 7.
Distill is a publication format for scientific and technical writing, native to the web.
Learn more about using Distill at https://rstudio.github.io/distill.
Replace all the ???s. These are answers on your moodle quiz.
Run all the individual code chunks to make sure the answers in this file correspond with your quiz answers
After you check all your code chunks run then you can knit. It won’t knit until the ??? are replaced.
The quiz assumes you have watched the videos had worked through the exercises in exercises_slides-1-49.Rmd
Pick one of your plots to save as your preview plot. Use the ggsave command at the end of the chunk of the plot that you want to preview.
Create a lot with the faithful dataset
add points with geom_point
assign the variable eruptions to the x-axis
assign the variable waiting to the y-axis
colour the points according to whether waiting is smaller or greater than 60
Create a plot with the faithful dataset
Add points with geom_point
Assign the variable eruptions to the x-axis
Assign the variable waiting to the y-axis
Assign the colour dodgerblue to all the points
Create a plot with the faithful dataset
Use geom_histogram() to plot the distribution of waiting time
*Create a plot with the faithful dataset
*add points with geom_point
*assign the variable eruptions to the x-axis
*assign the variable waiting to the y-axis
*set the shape of the points to plus
*set the point size to 1
*set the point transparency 0.4
Create a plot with the faithful dataset
Use geom_histogram() to plot the distribution of the eruptions (time)
Fill in the histogram based on whether eruptions are greater than or less than 3.2 minutes.
Create a plot with the mpg dataset
add geom_bar() to create a bar chart of the variable manufacturer
*Change code to plot bar chart of each manufacturer as a percent of total
*Use stat_summary() to add a dot at the median of each group
*color the dot orange
make the shape of the dot square
make the dot size 9