In this section, you've learned a lot about importing, cleaning up, analyzing (using descriptive statistics) and visualizing data. In this more free-form project, you'll get a chance to practice all of these skills with the Ames Housing dataset, which contains housing values in the suburbs of Ames.
You will be able to:
- Perform a full exploratory data analysis process to gain insight about a dataset
Use your data munging and visualization skills to conduct an exploratory analysis of the dataset below. At a minimum, this should include:
- Loading the data (which is stored in the file
ames_train.csv
) - Use built-in Python functions to explore measures of centrality and dispersion for at least 3 variables
- Create meaningful subsets of the data using selection operations like
.loc
,.iloc
, or related operations. Explain why you used the chosen subsets and do this for three possible 2-way splits. State how you think the two measures of centrality and/or dispersion might be different for each subset of the data. - Next, use histograms and scatter plots to see whether you observe differences for the subsets of the data. Make sure to use subplots so it is easy to compare the relationships.
Look in data_description.txt
for a full description of all variables.
A preview of some of the columns:
MSZoning: Identifies the general zoning classification of the sale.
A Agriculture
C Commercial
FV Floating Village Residential
I Industrial
RH Residential High Density
RL Residential Low Density
RP Residential Low Density Park
RM Residential Medium Density
OverallCond: Rates the overall condition of the house
10 Very Excellent
9 Excellent
8 Very Good
7 Good
6 Above Average
5 Average
4 Below Average
3 Fair
2 Poor
1 Very Poor
KitchenQual: Kitchen quality
Ex Excellent
Gd Good
TA Typical/Average
Fa Fair
Po Poor
YrSold: Year Sold (YYYY)
SalePrice: Sale price of the house in dollars
# Let's get started importing the necessary libraries
# Loading the data
# Investigate the Data
df.info()
# Investigating Distributions using scatter_matrix
# Create a plot that shows the SalePrice Distribution
# Create a plot that shows the LotArea Distribution
# Create a plot that shows the Distribution of the overall house condition
# Create a Box Plot for SalePrice
# Perform an Exploration of home values by age
Congratulations, you've completed your first "free form" exploratory data analysis of a popular dataset!