Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem Statement For this lab, you are the first Data Scientist to be hired at a new online home sales startup company. For your first
Problem Statement
For this lab, you are the first Data Scientist to be hired at a new online home sales startup company. For your first task, the CEO wants you to dig into the data to determine the most important factors that impact the price of a home.
Answer this question using data transformations and visualizations in a Jupyter Notebook. You can use any Python data visualization package.
Narrow down your search to factors. Write a introduction paragraph describing the rationale why you chose to explore those factors instead of any other options. At least must be categorical variables, and at least must numerical variables.
For each variable you chose to explore, you must have a single variable plot to show its distribution such as a histogram or bar plot. And a bivariate plot to show its relationship to house price. Write sentences about the findings for each variable.
Write a conclusion paragraph to summarize your findings from the data exploration and visualizations.
What factors have the biggest influence on house price?
How do you know that from the data?
Why do you think that is the case?
What would be your next steps if you were to continue exploring the data, what other variables or variable transformations would you include in your analysis?
Neighborhood: This variable represents different neighborhoods or areas where the homes are located. Each home can be categorized into a specific neighborhood.
Type of Home: This variable represents the different types or styles of homes, such as singlefamily homes, townhouses, condos, or apartments.
Number of Bedrooms: This variable represents the total number of bedrooms in a home. It is a numerical value that indicates the capacity of the home.
Square Footage: This variable represents the total area or size of a home in square feet. It is a numerical value that reflects the overall spaciousness of the house property.
Features and Amenities: Features and amenities, such as a pool, garage and fireplace can contribute to the value of a home.
Comparable Sales: The prices of similar homes in the area comparable sales can provide a benchmark for determining the price of a home.
Ichose these factors because they play a vital role in the impact price of a home.
import numpy as np
import pandas as pd
from scipy, stats import foneway
df pd readcsvtraincsv
dfcolumns
Index Id 'MSSubClass', 'MSZoning', 'LotFrontage', 'LotArea', 'Street',
'Alley', 'LotShape', 'LandContour', 'Utilities', 'LotConfig',
'LandSlope', 'Neighborhood', 'Condition 'Condition 'BldgType',
'Housestyle' 'Overallqual', 'OverallCond', 'YearBuilt', 'YearRemoddd
'RoofStyle', 'RoofMatl', 'Exteriorst 'Exteriornd 'MasVnrType',
'MasVnrArea', 'Exterqual', 'ExterCond', 'Foundation', 'BsmtQual',
'BsmtCond', 'BsmtExposure', 'BsmtFinType 'BsmtFinSF
'BsmtFinType 'BsmtFinsF 'BsmtUnfSF', 'TotalBsmtsF', 'Heating',
'HeatingQC', 'CentralAir', 'Electrical', stFlrSFndFlrSF
'LowQualfinSF', 'GrlivArea', 'BsmtFullBath', 'BsmtHalfBath', 'FullBath',
'HalfBath', 'BedroomAbvGr', 'KitchenAbvGr', 'KitchenQual',
'TotRmsAbvGrd', 'Functional', 'Fireplaces', 'FireplaceQu', 'GarageType',
'GarageYrBlt', 'GarageFinish', 'GarageCars', 'GarageArea', 'Garagequal',
'GarageCond', 'PavedDrive', 'WoodDeckSF', 'OpenPorchSF',
'EnclosedPorch', SsnPorch', 'ScreenPorch', 'PoolArea', 'PooloC',
'Fence', 'MiscFeature', 'MiscVal', 'MoSold', 'YrSold', 'SaleType',
'SaleCondition', 'SalePrice'
dtype 'object
I need the code in python please
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started