Posts

Showing posts from October, 2025

Module # 9 assignment

Image
  I used the default mtcars visualization because it has many continuous and categorical car performance variables. It also is a familiar dataset that lets you find relationships between horsepower, engine displacement, fuel efficiency and other performance numbers. It contains both numeric and factor variables, so it's good to test whether multivariate design techniques in ggplot2 reveal something more than two-variable plots. It plots engine displacement (disp) versus quarter-mile time (qsec), with horsepower (hp) coded in color, weight (wt) via point size and number of cylinders (cyl) via shape. The plot is also broken down by transmission type for automatic versus manual cars. This layout reveals a few things - larger engines and more horsepower get the quarter-mile done faster than heavier cars. It also shows that manual transmissions generally give better acceleration with the same displacement. A multivariate visualization worked well here because I could see how engine powe...

Module # 8 Correlation Analysis and ggplot2

Image
  The visualizations I created with ggplot2 shows the relationships of miles per gallon mpg to ten predictors from the mtcars-style dataset. The scatterplots revealed strong negative associations with wt, disp, cyl and hp variables, so heavier cars with larger engines and higher horsepower have generally poorer fuel economy. Positive relationships meanwhile appeared for drat, gear, vs, and am - manual transmission, higher rear-axle ratios and certain engine configurations correspond to better mpg. Regression lines for each facet confirmed these trends and described how steep or mild each relationship was. A grid with facets enabled better interpretation. Displaying each predictor as a small plot with the mpg axes consistent allowed me to compare the direction and the strength of each correlation very quickly. It turned analysis into a visual "dashboard" of relationships instead of forcing me between several charts. The consistent theme, light gridlines & limited colour pa...

Module #7 Assignment: Visualizing Distributions in R

Image
  Dataset Used: This visualization uses the classic mtcars dataset that was also the class dataset for Module # 7. This includes mpg, cylinder count, horsepower and weight data for 32 car models. In this visualization we plotted fuel economy by cylinder count (4, 6, and 8). Patterns Revealed: The histogram showed different fuel efficiency curves by cylinder count. And the 4 cylinder cars had the best mpg figures - roughly 22 to 34 mpg. 6-cylinder cars scored moderate fuel efficiency at 17 to 21 mpg. But the 8-cylinder cars got between 10 and 19 mpg -- the most fuel -- instead. The obvious difference in distributions reveals that larger engines are better but less efficient. Alignment with Few & Yau's Recommendations: This design follows Stephen Few and Nathan Yau's advice for honest data visualization. Aligned x-axes with constant bin width across the three cylinder groups allow direct visual comparison of their distributions. Grey with dashed median lines and no non-data i...

Module # 6 Visual Differences & Deviation Analysis via R programming

Image
  For this exercise, I created a bar chart in R using the supplied mtcars dataset. The chart compared average miles per gallon for cars with different cylinder numbers (4, 6, and 8). I plotted the differences with barplot () function, along with color coding & axis labels. Visualization showed clear differences between groups - cars with 4 cylinders got much better fuel efficiency than 6 or 8 cylinders. This allowed me to quickly see how engine size relates to MPG which is not so obvious from the raw data table. The chart was not meant to represent deviation from a benchmark but implied that it showed how 8-cylinder cars lag behind the overall average MPG, which is a negative deviation from the norm. Regarding Stephen Few's ideas from Chapter 9 in Now You See It, my chart is in line with his ideas about deviation and comparison analysis. Few points out that effective visuals should show patterns, differences and exceptions without being overly decorated. The simplicity of a bar...