So when I first looked at the dataset that I was going to work with this semester, I was unclear on what the x, y, and z columns are for until I read the documentation. The way they encode the data is pretty self-explanatory because xyz are dimensions of the diamonds. I think I could still have guessed what the columns are for but I definitely would’ve gotten the unit of measurement wrong because I’m not familiar with diamonds. By looking at the documentation, this clears up a lot of what I was unsure about before. By knowing what xyz are for, I could have some assumptions about the diamonds (bigger diamonds means bigger xyz numbers which could potentially have a relationship with the prices).
An unclear element that is unclear even after reading the documentation is how the measurement of clarity of the diamond is labeled. The documentation only says I1 is worst and IF is best but it doesn’t explain what I1, SI2, SI1, VS2, VS1, VVS2, VVS1, IF stand for and how meaningful they are. Another one that I was unsure about is the depth column and how they derived their equation to measure the depth of the diamond. The documentation didn’t explain how or why it is that equation.
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.0 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.1 ✔ tibble 3.1.8
## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0
## ✔ purrr 1.0.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the ]8;;http://conflicted.r-lib.org/conflicted package]8;; to force all conflicts to become errors
library(ggplot2)
diamonds |>
ggplot(aes(x= clarity, fill = clarity)) +
geom_bar() +
labs(title = 'Clarity of Diamonds', x = 'Clarity', y= 'Count') +
theme_minimal()
diamonds |>
ggplot(aes(y=depth))+
geom_boxplot(outlier.color = 'red', outlier.shape = 1)+
labs(title = 'Diamond Depth', y = 'Depth')+
theme_minimal()
I created visualizations for both clarity and depth. I’m not too sure what to do in order to get a better grasp of what the labels for the clarity of the diamonds without going out of my way and look them up on google or something. Similarly, the documentation explains the depth variable as “total depth percentage: which I’m not entirely sure what’s the context. Overall I don’t think the unclarity that I have for these two elements would have any significant risks so I don’t think there’s any negative consequence for not fully understand them for now. If these issues occur again in the future I might need to dive deeper into the characteristics of diamonds and how these data was collected.