Real estate is a vital part of the American economy, accounting for a sizable portion of the nations wealth. As a result, understanding the dynamics of the real estate market is critical for policymakers, investors, and anyone interested in the country’s economic health. This report presents an analysis for the a public US real estate market using publicly available data from Zenrows (https://www.zenrows.com/), a popular dataset provider website.
A dataset that contains historical home sales and rental prices for thousands of cities and neighborhoods across the United States from 2001 to 2020 is used. The market trends over time are investigated to identify the different factors playing role on the housing price. These various factors such as location, home size, and age affect home prices.
| price | addressCity | addressState | addressZipcode | beds | baths | latitude | longitude |
|---|---|---|---|---|---|---|---|
| 474900000 | Windsor | WI | 53598 | 4 | 3 | 43.21028 | -89.32647 |
| 65750000 | New York | NY | 10019 | 5 | 5 | 40.76620 | -73.98100 |
| 45000000 | Boston | MA | 2110 | 8 | 12 | 42.35632 | -71.05956 |
| 40000000 | New York | NY | 10007 | 5 | 7 | 40.71520 | -74.01250 |
| 37000000 | Aspen | CO | 81611 | 7 | 9 | 39.21248 | -106.85021 |
| 35000000 | Newport | RI | 2840 | 7 | 9 | 41.45831 | -71.34237 |
A correlation matrix is plotted to find a correlation between different variables.
The following figure shows that the house price is correlated with number of bathrooms (by 41%) which means that as the number of the bathrooms are higher price would be higher. Similarly, number of the bedrooms are correlated with price by 23%. Higher number of beds lead to higher price of the real estate. A strong relationship between bedrooms and bathrooms is observed meaning that real estates with hugher number of bedrooms have more bathrooms as well.
The following figure depicts that houses with higher number of bathrooms cost more and houses with less bathrooms are cheaper.
The following figure enables checking prices on the US map. The data density in the east side of US is more than west side.
Hawaii and New York are the most expensive states to afford a house. The top 20 most expensive states for buying houses are shown in the figure below. The average of house prices in each state is used in the plots.
## note: only 1 unique complexity parameters in default grid. Truncating the grid to 1 .
Which features play the most important role on the price of a house? Results of the machine learning models are used to analyze the importance of the features on housing price. Following figures show that all models predict that number of bathrooms is more importance feature than number of beds for prediction of price of houses. In other words, number of the bathroooms play more important role on housing price.
This study has investigated the effect of different factors such as number of beds and bathrooms on the price of a real estate. Positive correlation of 41% was observed between house price and number of bathrooms. Similarly, number of the bedrooms and the price of the house are correlated by 23%.
A general trend is observed that houses with more bedrooms and bathrooms are more expensive.
The average price of houses in Top 20 states are investigated and results showed that average cost of real estate in Hawaii and New York were the highest.
Different machine learning models are used to predict housing price in US and “glm” model had the lowest RSME and best performance.
Different machine learning models were used to intreprete the feature importance on the housing price. All models concluded that number of bathrooms had significantly higher effect on housing price in comparison the number of beds.