wk 6
Wk6.R
2023-02-15
library(ggplot2)
fatl = read.csv("Fatalities.csv", stringsAsFactors = FALSE)
ggplot(fatl, aes(x = state, y = fatal, fill = year)) + geom_bar(stat = "identity")+theme(axis.text.x = element_text(angle = 90, hjust = 1))
#this bar plot shows the total
number of motor vehicle fatalities per state between 1982 and 1988. Few's and Yau's discussions on how to conduct basic visualization based on simple descriptive analysis emphasize the importance of selecting the appropriate chart type to best represent the data and the message that needs to be conveyed. They also stress the need to avoid clutter and to use color and labels effectively to enhance the chart's interpretability. This chart shows the states on the x axis and the fatalities on the y axis. The bars colored such that each bar will be split into shades of blue with represents the years. It is simple to understand that a single bar represents the total number of fatalities per state. It is also simple to deduce that as the years have increased, the number of fatalities have also increased. The only unclear bit is the x axis label not being able to show each of the states clearly. In conclusion, this chart fits most of Yau and Few's criteria for
Comments
Post a Comment