Complete ALL of the essentials below correctly to earn an ‘S’ on the lab.
Complete the Depth portion successful to earn credit toward a depth boost (every 2 lab depth assignments completed earns a 1/3 letter grade boost to your final grade)
Render your document as a .pdf or .html and submit it to the google folder on Moodle for grading.
Write a paragraph explaining some tenants of good vs. bad graphics. Be specific!
The point of a graph is to convey data to an audience in a visual way. Therefore, a good graph doesn’t have too many elements in order to keep it simple yet informative. If you are trying to show too many different variables it can become difficult for the reader to understand. A good graph also shows the data (avoid bar graphs which generally obscure data) and contains a clear legend. The y-axis should start at 0 and both axes should be labelled with a clear scale. It probably should have a figure legend or title so that people know what they’re looking at. A good graph also has indicators of significance.
A bad graph is basically one that does not do the things listed above and thus is difficult to read and does not fulfill its purpose. A bad graph may have no color and/or grouping or that grouping is very difficult to see/distinguish.
These are all general aspects of what makes a good or bad graph, but I think it does vary slightly depending on the situation, what type of graph, and what information one is trying to convey. Also, as we saw in lab, you can have a very effective graph that is also not very good.
2.) Graphs
Make the following plots with the ferris wheel data: histogram, boxplot, bar graph, line graph, scatterplot
Histogram
wheels3 <-filter(wheels, country =="Japan"| country =="China"| country =="USA")#Playing around with trying to get head() in a prettier tablekable(head(wheels3)) %>%kable_styling(bootstrap_options =c("striped", "hover"))
Using the wheels data, group data, calculate an average, and plot data with error bars! Ask for help if you need it. We may not have learned all of this in class just yet.
wheels5 <- wheels3 %>%group_by(country) %>%drop_na(height) %>%summarize(meanheight =mean(height), sd =sd(height), n =n(), se = sd/sqrt(n))wheels5
# A tibble: 3 × 5
country meanheight sd n se
<chr> <dbl> <dbl> <int> <dbl>
1 China 432. 110. 9 36.6
2 Japan 317. 74.1 12 21.4
3 USA 282. 184. 19 42.1
#Plot the dataggplot(wheels5, aes(x = country, y = meanheight, color = country)) +geom_point()+geom_errorbar(data = wheels5, aes(x = country, ymin = meanheight-se, ymax = meanheight+se), width =0.2) +scale_color_lancet()
3.) Labels
Using theme() and labs() add custom labels to your X and Y axis. Add a title. Change the size of the text on both axes. This may be beyond our tutorial in class, so ask Justin and/or use google or resources linked above. Theme() is extremely powerful and will always be useful for us!