LIS 4317 Final Project – Diamonds Analysis

Diamonds constitute one of the most extensively examined datasets in R due to their numerous quality attributes that affect valuation. For this undertaking, I employed the diamonds dataset from the ggplot2 package to investigate the relationship between carat (weight), cut quality, and clarity in relation to diamond prices. This dataset provided an opportunity to apply and demonstrate proficiency in distribution analysis, comparative evaluation, and multivariate visualization methods acquired during LIS 4317.

Overview of the Dataset

The diamonds dataset comprises 53,940 observations and ten variables, thereby satisfying the project's criterion of a minimum of fifty rows and five to twenty variables. Key variables encompass:

Cost – Price of diamond in United States dollars

Carat – the mass of the diamond

Reduce — reduction in quality levels (Fair, Good, Very Good, Premium, Ideal)

Color – the process of color grading

Clarity – Evaluation of transparency and lucidity

I selected this dataset due to its extensive assortment of numerical and categorical variables, rendering it suitable for various forms of visualization.

Problem Description

The primary research question I investigated is

What is the connection between carat, cut quality, clarity, and the price of diamonds? What patterns do these factors show when you look at them?


Related Work

I looked over ggplot2 tutorials and examples that people often use with the diamonds dataset. There were a lot of examples that showed distribution plots, the relationship between carat and price, and comparisons between quality categories. These examples gave me the idea for the visualizations I made.

Methodology

I used dplyr, ggplot2, and RStudio to do the analysis. My process included:

Getting the diamonds dataset ready

Using a histogram to show how prices are spread out

Using a boxplot to compare prices across different cut categories

Making a multivariate scatter plot to look at carat vs. price, with cut as the color

I was able to look into patterns of distribution, comparison, and correlation with these plots.


Visualization & Analysis

1. Distribution of Diamond Prices












Understanding

The histogram shows that diamond prices are very right-skewed, which means that most diamonds are in the lower price ranges and only a few are in the very high price ranges.  A big group of diamonds costs between $500 and $3,000, which is probably what most people would pay for them. Most people tend to buy smaller, less expensive diamonds.

As the price goes up, the number of times it happens goes down a lot.  But the tail goes a long way to the right, which shows that there are outliers and luxury stones that cost a lot of money.  It's important to know about this kind of skewed distribution because it means that averages can be wrong and that visualizations are important for figuring out how the data really works.


2. Boxplot of Price by Cut Quality





Understanding

Fair, Good, Very Good, Premium, and Ideal are the five cut classifications for which the boxplot displays the differences in diamond pricing. A few significant trends are evident:

Because premium and ideal cuts often have higher median pricing, consumers are ready to pay more for superior workmanship.

Fair and good cuts are often less expensive, most likely because to their poorer light reflection.

Higher-quality cuts come in a broader range of prices, indicating that there are more expensive stones in those groups.

The general tendency is evident despite the categories' overlap: a greater price is associated with a higher quality cut. A boxplot would more effectively display this connection than a summary table.


3. Scatter Plot: Carat vs Price (Colored by Cut)




Understanding

The scatter plot demonstrates a significant positive association between carat and price: the price climbs dramatically as diamond weight increases. Given that bigger diamonds are rarer and more costly, this makes sense. But an additional level of understanding is provided by the color mapping. It illustrates that:

Even diamonds of the same weight tend to be more expensive when they have better cutting (Ideal and Premium).

In the lower price range, lesser-quality cuts are concentrated more.

For stones weighing more than one carat, the correlation between carat and price is even more striking.

Size and quality are combined into a single graph in this multivariate visualization, which makes it evident that both parameters have a major impact on pricing.


Conclusions and Discussion

The visualizations gave us a lot of important information:

Most diamonds are priced in the lower range, but a few are much more expensive.

Cut quality is important because higher-quality cuts tend to have higher median prices and wider price ranges.

The price goes up faster as the carat goes up, and the relationship between the two is not linear.

When you combine variables (like carat and cut), you can see trends that single-variable plots can't show.

In general, this project showed how data visualization can help people understand complicated patterns.  The diamonds dataset was a great way to practice distribution, comparison, and multivariate analysis.


Reflections

This project let me use what I learned in LIS 4317 in a real-world setting and helped me grasp how visual analytics can convert raw data into useful information. We spent the whole semester learning how to choose the correct visualization for the right job, and working with the diamonds dataset offered me an opportunity to exercise that ability on purpose. I learned that each kind of plot has a particular purpose in conveying the narrative. For example, histograms show general distribution patterns, boxplots make it easy to compare categories, and scatter plots assist in finding deeper connections between various variables.

Using ggplot2 also made me feel more at ease making tidy, professional-looking visuals. At the start of the course, I wasn't sure how to layer geoms, change themes, or make a plot clear. I became better at using these tools because of this last project. I learned that tiny design decisions, like color, spacing, alpha transparency, and labeling, may make a big difference in how easy it is to comprehend what a visualization is trying to say.

Working with the diamonds dataset also helped me become better at understanding various kinds of statistical patterns. For instance, it was much simpler to see why summary data might be deceptive when you saw the very right-skewed price distribution. The boxplot let me see how the variance was different inside and across cut categories. The scatter plot highlighted how two continuous variables interact while also adding a third (cut) via color. I now feel a lot more at ease with this way of thinking about several things at once.

This final project put together design principles, statistical reasoning, and data storytelling in a manner that made sense and fit together. It made me realize how important it is to be clear, simple, and purposeful when visualizing data. It also taught me how useful visual analytics can be for spotting patterns and sharing results in a clear way. I feel much more confident in my ability to approach real-world datasets, choose appropriate visual techniques, and explain insights clearly skills that I look forward to using in future projects, courses, and professional work.



Comments

Popular posts from this blog

Visualizing Distributions in R

Module 5. Part-to-Whole and Ranking Analysis