Data Study on Housing and Rent Price

Posted on May 14, 2016
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
Contributed by Frank Wang. He  is currently in the NYC Data Science Academy 12 week full time Data Science Bootcamp program taking place between April 11th to July 1st, 2016. This post is based on his second class project - R Shiny, due on the 4th week of the program.

Everyone need a home, either buy or rent. I developed this app to look-up the data on housing/rent price in every zip code of US. Home buyers can use it to calculate the monthly mortgage payment, total cost and saving including property tax, financial cost and tax benefit for owning a home. While real estate investors or yourself can also use it to find good location for buying to rent option.

The Data of Housing Price and Rent Cost

The data is downloaded from Zillow website. The housing price and rent at each zip code can be found. The plot show the state average median housing price for March 2016. Home type includes condo, one bed single family, two bed single family and three bed single family.

The housing price largely depends on the location especially school. Therefore, it is important to look at the data for the particular zip code which you are interested. This can be found using the zip code selection option in Fig.2. Both housing and rent data are available.

FIG.1 US State Median Housing Price (March 2016)

FIG.1 US State Median Housing Price (March 2016)

FIG.2 City and zip code Housing data hook-up

FIG.2 City and zip code Housing data hook-up

The app

The Parameters Selection Bar

FIG.3 shows the parameters selection bar. All the rate are annually. The home appreciation rate is important for long term. The investment return rate is used to benchmark the housing investment, which is net return (after tax). The tax rate (total of Federal and State) is used to calculate tax deduction for home owner, including property tax and mortgage interesting. Years of own-home means how many years you want to keep the home before you sell it. If you rent it out, then there is no selling cost.

Explore Data on Mortgage and Comparison of Buying and Rent   

From the Explore option, you can check the detail results for the calculation. FIG.4 shows the calculated yearly payment example.  Note that you pay interest mostly at early years. FIG.5 shows the comparison of buying and rent options. The top plot show the case without the home selling cost (for long term) and the bottom is the case with selling cost included, which is important for short term ownership. When selling cost is included, buying become more expensive, especially for short term. This is the good reason not to buy home for short term.

The Summary section tells the total cost of both buying and rent options. A recommendation is given based on the calculation. For this example:

  • Monthly Payment for owning home is $ 954.83
  • Total interest you will pay is $ 143739
  • Monthly Rent is $ 888
  • Total cost for 5 years for owning home is $ 72018
  • Total cost for 5 years for renting home is $ 56011
  • If you will stay longer than 16 years, then it's better to buy


FIG.4 Yearly Mortgage payment example

FIG.4 Yearly Mortgage payment example

FIG. 5: Comparison of buying and rent home

FIG. 5: Comparison of buying and rent home

Where to Invest Real Estate?

Home buying has large variety. It strongly depends on the location, job opportunity, school and other factors. You can play with this app for your own options.

While you enjoy your new home, you may be also interested to invest real estate by buying to rent in the long run. I will extend this app for that purpose to search good location for real estate investment.

About Author

Frank Wang

Frank (Lanfa) Wang have worked in several research laboratories as a physicist. He has over a decade of experience in modeling and scientific computing and had access to the large supercomputer NERSC. He participated several national/international projects: Japanese...
View all posts by Frank Wang >

Related Articles

Leave a Comment

Cristhian Guerrero May 16, 2016
Hi, How can I have access to the app? Regards

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI