Posts

Showing posts from November, 2025

Final Project LIS4317

Image
LIS4317 Final Project – Diamonds Dataset Analysis   Kyla Garcia Platform: Tableau Dataset: Diamonds (R built-in, 53,940 observations, 10 variables) Date: November 26, 2025   1. Introduction The prices of diamonds differ according to its Four Cs: Cut, Clarity, Color and Carat. This project discusses the impact of each factor on price and the predictors with the highest strengths. Research Question: To what extent do diamond characteristics predict and influence diamond price?   2. Dataset Overview Variable Description Carat Weight of the diamond Cut Cut quality (Fair, Good, Very Good, Premium, Ideal) Color D–J, from colorless to near-colorless Clarity I1 → IF (low to high clarity) Depth Total depth % Table Width ratio Price Price in USD x, y, z Dimens...

Assignment: Using ChatGPT to Generate and Share Visualizations

Image
 # Load required library library(ggplot2) # Create histogram of mpg from mtcars ggplot(mtcars, aes(x = mpg)) +   geom_histogram(binwidth = 2, fill = "steelblue", color = "black") +   labs(     title = "Distribution of Miles Per Gallon (mpg) in mtcars",     x = "Miles Per Gallon (mpg)",     y = "Count"   ) +   theme_minimal() To save the image:   r Copy code ggsave("mtcars_mpg_histogram.png", width = 6, height = 4) Reflection: For this assignment, I used ChatGPT to help me create a histogram of the mpg variable in the mtcars dataset using ggplot2 in R. I asked it for example code, and it generated a clean and workable starting point. I copied the code into RStudio, ran it, and the plot worked right away, which made the process smooth. I then made a few changes, like adjusting the bin width and theme, to make the chart easier to read. The only real challenge was deciding what visual adjustments looked best, but trying d...

Assignment #12

Image
  I completed my social network visualization using Python in Google Colab, which made the process pretty smooth. Colab was convenient because I didn’t need to install anything manually, everything ran in the browser, and the required libraries were already available. NetworkX worked well for generating the random graph and assigning labels to each node, and using the spring layout made the network easy to read. I did run into an issue when I tried to use Plotnine, because Colab threw import errors related to the underlying packages. Since Plotnine wouldn’t load, I switched to Matplotlib instead. After making that change, the graph displayed without any problems. This actually made the assignment easier, because Matplotlib produced the visualization in a simple and reliable way. Overall, the method was effective, and I would use it again. Even though my original plan was to follow the Plotnine example, using Matplotlib still met the requirements and helped me better understand ho...

Module 11 assignment

Image
  # Step 1: Install packages install.packages(c(   "CarletonStats", "devtools", "epanetReader", "fmsb", "ggplot2",    "ggthemes", "latticeExtra", "MASS", "PerformanceAnalytics",    "psych", "plyr", "prettyR", "plotrix", "proto",    "RCurl", "reshape", "reshape2" )) # Step 2: Load packages library(ggplot2) library(ggthemes) library(latticeExtra) library(MASS) library(PerformanceAnalytics) library(psych) library(plyr) install.packages("ggExtra") library(ggExtra) # Create a sample dataset set.seed(123) df <- data.frame(   x = rnorm(200, mean = 5, sd = 1.5),   y = rnorm(200, mean = 5, sd = 1) ) # Base scatter plot p <- ggplot(df, aes(x = x, y = y)) +   geom_point(color = "steelblue", alpha = 0.7) +   theme_minimal() +   labs(     title = "Marginal Histogram Scatter Plot",     x = "V...

Module 10 assignment

Nathan’s Hot Dog Eating Contest # Load data hotdogs <- read_csv ( "http://datasets.flowingdata.com/hot-dog-contest-winners.csv" ) head ( hotdogs ) # Load ggplot2 library ( ggplot2 ) # Create color scheme for new records colors <- ifelse ( hotdogs $ New.record == 1 , "darkred" , "grey" ) # Base R plot barplot ( hotdogs $ Dogs.eaten , names.arg = hotdogs $ Year , col = colors , border = NA , main = "Nathan's Hot Dog Eating Contest Results, 1980-2010" , xlab = "Year" , ylab = "Hot dogs and buns (HDBs) eaten" ) A base R bar chart showing the number of hot dogs eaten each year with new records in dark red. ggplot2 for the same data: ggplot ( hotdogs ) + geom_bar ( aes ( x = Year , y = Dogs.eaten , fill = factor ( New.record ) ) , stat = "identity" ) + labs ( title = "Nathan's Hot Dog Eating Contest...