Module # 9 assignment
For this assignment, I used the mtcars dataset, which includes data on various car models and their performance characteristics such as miles per gallon (mpg), horsepower (hp), weight (wt), and the number of cylinders (cyl). I chose this dataset because it provides a good mix of continuous and categorical variables, making it ideal for demonstrating relationships across multiple dimensions.
I created a scatter plot using ggplot2 in R, plotting horsepower (hp) on the x-axis and miles per gallon (mpg) on the y-axis. To incorporate additional variables, I used color to represent the number of cylinders (cyl), point size to indicate car weight (wt), and faceting to separate cars by the number of gears (gear). This design allows viewers to quickly see how fuel efficiency decreases as horsepower and weight increase, and how this relationship varies across cars with different numbers of gears and cylinders.
This multivariate visualization effectively highlights the trade-offs between performance and efficiency cars with higher horsepower and weight tend to have lower mpg, especially those with more cylinders. In designing the plot, I applied three key design principles: contrast, by using distinct colors to differentiate cylinder categories; alignment, by organizing the facets in a consistent grid for easy comparison; and balance, by ensuring the visual weight of each element is evenly distributed without overwhelming the viewer. Overall, the multivariate approach clearly reveals patterns that would not be as apparent in a univariate or bivariate chart.
Comments
Post a Comment