Mod 7 R

Daniel Tafmizi

Dr. Friedman

October 15, 2024

Lis 4317

Module 7

Github: daniel.R/Work.R/LIS4370Rprog/dataviz2.R at main · DanielDataGit/daniel.R (github.com)





I used two methods to analyze the distribution of the mtcars dataset.

First, I created a scaled heatmap to visualize how various attributes change across each car, ordered by mpg. Although this method doesn't provide a direct statistical analysis of the data's distribution, it offers valuable insights into how the attributes are spread out across different vehicles.

Second, I utilized a function called ggpairs, which was new to me and proved to be a powerful tool for distribution analysis. This function generates three types of visualizations: density plots, scatterplots, and correlation coefficients. These visualizations observe the distribution of data both within individual attributes and across multiple attributes, while also highlighting how these variables are correlated. My next goal with this function is to learn how to turn variables into factors. I could not see a way to do this in the ggpair arg's, thus it probably needs to be done before calling the dataframe into it. 

I think Few would not like the use of ggpair for distribution analysis. The right triangle is full of "junk", as it does not offer insight into the distribution of the attributes. However, the scatterplot and density plot are both recommended methods for visualizing distribution.

Comments

Popular posts from this blog

Network Analysis

Multivariate analysis

Final Project