The main factor affecting price is the carat. In this post we shall evaluate how the two factors fare.

**PRICE VS CARATS**

**OBSERVATION:** As the value of carat increases, the price goes up. The line of regression is quadratic. Thus, price is affected by carat including other factors as well.

OBSERVATION: Upon further scaling, we see that observation 1 is turning out to be true, for a given value of carat the price varies.

The graph below shows how it varies according to clarity.

**OBSERVATION:** We see that diamonds with higher clarity index from blue to purple, have higher prices in comparison to the diamonds with low clarity index. Hence, clarity index affects the value of price, at a given carat.

The graphs below show various of price VS carat, with variation in color, cut and clarity receptively.

### Like this:

Like Loading...

*Related*

Hello, what version of ggplot have you used ? I have some troubles reproducing these figures with the 0.6.8 version.

Also, could you provide the code to produce the last 3 pictures ?

Thanks in advance

LikeLike

Hello, here is the nbviewer link for this blog(with all codes and graphs. Be a little patient, it takes some time to render the complete code.

http://nbviewer.ipython.org/gist/sara-02/a5a58659126c4c516c02

LikeLike

I found the code to produce the last 3 pictures at

Ggplot in pythonfromAjay OhriLikeLike