From 8220a808ec113c284b3175b61298750cee1cef71 Mon Sep 17 00:00:00 2001 From: simpleguyon Date: Wed, 2 Jan 2019 19:56:08 +0000 Subject: [PATCH 1/4] Done --- q01_plot/build.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/q01_plot/build.py b/q01_plot/build.py index 0425964..53a27e7 100644 --- a/q01_plot/build.py +++ b/q01_plot/build.py @@ -1,8 +1,18 @@ +# %load q01_plot/build.py +# Default imports import matplotlib.pyplot as plt import seaborn as sns import pandas as pd data = pd.read_csv('data/house_prices_multivariate.csv') -plt.switch_backend('agg') -# Write your code here : +# Write your code here: + +listie = [data.LotArea,data.GarageArea,data.OpenPorchSF, data.SalePrice] +def plot(num_cols): + sns.set() + ax = sns.displot(num_cols) +return ax + + + From 0ae54fb2672b8310a1e32078ee96bb817823896f Mon Sep 17 00:00:00 2001 From: simpleguyon Date: Wed, 2 Jan 2019 19:58:35 +0000 Subject: [PATCH 2/4] Done --- q02_plot/build.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/q02_plot/build.py b/q02_plot/build.py index 67b4924..215e37a 100644 --- a/q02_plot/build.py +++ b/q02_plot/build.py @@ -1,11 +1,18 @@ +# %load q02_plot/build.py # Default imports import pandas as pd import matplotlib.pyplot as plt import seaborn as sns data = pd.read_csv('data/house_prices_multivariate.csv') -plt.switch_backend('agg') # Write your code here: +listie = [data.LotArea, data.GarageArea, data.OpenPorchSF, data.SalePrice] +def plot(num_cols): + plt.rcParams['figure.figsize'] = (23,10) + bx = sns.boxplot(x = num_cols , y = 'SalePrice', data = data) + return bx + + From 4f8f88b4d59a07bea6cdaf2865c68f22ec669d09 Mon Sep 17 00:00:00 2001 From: simpleguyon Date: Wed, 2 Jan 2019 20:00:38 +0000 Subject: [PATCH 3/4] Done --- q03_regression_plot/build.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/q03_regression_plot/build.py b/q03_regression_plot/build.py index 2aaf8f6..0ce91f2 100644 --- a/q03_regression_plot/build.py +++ b/q03_regression_plot/build.py @@ -1,3 +1,4 @@ +# %load q03_regression_plot/build.py # Default imports import pandas as pd @@ -6,11 +7,21 @@ data = pd.read_csv('data/house_prices_multivariate.csv') -plt.switch_backend('agg') # Write your code here +X = data.GrLivArea +Y = data.SalePrice +def regression_plot(X, Y): + sns.set(color_codes=True) + tips = sns.load_dataset(data) + ax = sns.regplot(x=X, y=Y, data=tips) + return ax + + + + From 3e3bfb5feab7771e806c8b08cd473fb3454972b7 Mon Sep 17 00:00:00 2001 From: simpleguyon Date: Wed, 2 Jan 2019 20:02:08 +0000 Subject: [PATCH 4/4] Done --- q04_cor/build.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/q04_cor/build.py b/q04_cor/build.py index f3fae50..8b66ea2 100644 --- a/q04_cor/build.py +++ b/q04_cor/build.py @@ -1,10 +1,20 @@ +# %load q04_cor/build.py # Default imports import pandas as pd import matplotlib.pyplot as plt import seaborn as sns data = pd.read_csv('data/house_prices_multivariate.csv') -plt.switch_backend('agg') # Write your code here +def cor(data): + + corr = data.corr() + plot = sns.heatmap(corr, xticklabels=corr.columns.values, + yticklabels=corr.columns.values) + return plot + + + +