"""
# Hello, Starlight

In this Notebook, I'm going to be analyzing *diamonds* using the dataset provided by [Shivam Argwal ](https://www.kaggle.com/shivam2503)

Just for fun, I'll **teach** you about diamonds while I anlyze this  dataset. I'm not sure what all we'll learn, but I'm excited to find out.  Let's go!

`This first bit of code is just to get things up and running. Pay it no mind.`



"""
import pandas as pd
pd.plotting.register_matplotlib_converters()
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
print("Setup Complete")
#just gotta import my code oop
diamond_filepath = "../input/diamonds/diamonds.csv"

#and now i'll read it in
diamond_data = pd.read_csv(diamond_filepath, index_col="carat")

#just to test that that worked...
diamond_data.head()
"""
Oh, how handy!  Now we can see what sort of data we'll be looking at.  Looks like we can see the `carat`, `cut`, `color`, and `price` of these diamonds, as well as some information about their size.

I'm using the `carat` column to organize all of my data, so let's talk a bit about that.


"""
"""
 # 💎 Carat, Karat, Carrot 🥕

All three are very important words that mean very different things.

> **Carat** is used to measure the weight of stones.  1 carat is equal to 200 miligrams.  So, the first stone in my list up above, weighing 0.23 carat, weighs 46mg.

> **Karat** is used to measure the purity of gold. Gold can be mixed with other metals, making it less pure. The purest gold is 24 karat, and most 24k jewelry will have this stamped into the design somewhere.

> A **carrot** is used to provide energy to humans and animals. They're chock full of carotenoids, which are broken down into key vitamins in the body. They're also quite tasty!
"""
"""
Now that that's out of the way...let's try comparing `carat` to `price` with a **scatterplot**.
"""
sns.set(font_scale=1.4)
sns.set_style("white")
plt.figure(figsize = (15,8))
p = sns.scatterplot(data = diamond_data, x=diamond_data.index, y=diamond_data['price'])
plt.xlabel("Carat", labelpad=16)
plt.ylabel("Price", labelpad=16)
plt.title("Diamond Carat by Price", y=1.02);
"""
As we can see, we have a LOT of diamond data to look through! Actually, we have data on **53,940** diamonds!  No wonder our scatterplot looks so busy.  We'll clean that up later, but for now, let's look at what this chart tells us.

* Most diamonds in our dataset are between 0 and 3 carats
* The diamonds' prices range from 300 to 18,000 dollars 
* 2 carat diamonds seem to sell for the highest amount

Let's use some other charts to identify what makes diamonds sell for the most amount of money.
"""
diamond_data['cut'].value_counts().plot(kind='bar', figsize=(7, 6), rot=0)
plt.xlabel("Cut", labelpad=16)
plt.ylabel("Count", labelpad=16)
plt.title("Count of Diamonds by Cut", y=1.02);
"""
That's it for this page.  I don't feel like playing with the diamonds anymore, lolololol.
"""