Data Study on real estate properties in NYC

Posted on Aug 8, 2016
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.


Every year people come to New York City from all over the world to pursue careers, chase dreams, and seek success. They might even want to buy a home. In that case, these questions may come to mind: What are the prices of the properties in NYC? What kind of property will I be able to buy? What is the average price in my neighborhood?  This shiny project seeks to use data to provide answers to these questions.


Source of Data:


The data comes from a real estate company website, City Realty and covers sales history from 2003 onward. The shiny app focuses solely on the year 2016.  The original data contains the following variables:


  1. Address, type string, gives the address of each sale
  2. Neighborhood, type string, gives the neighborhood of each sale
  3. Beds, type string, gives the number of bedrooms in each sale
  4. Bath, type string, gives the number of bathrooms in each sale
  5. Size, type string, gives the size of each sale
  6. Price.FT2, type string, gives the price per square feet of each sale
  7. Price, type string(with dollar sign), gives the total price of each sale
  8. Sale.Date, type string, gives the sale date


Data from Shiny-App:


For preprocessing the geocode() function turned addresses into coordinates to facilitate plotting on a map. Sometimes this process produced errors such as putting a NYC property in Australia.  To solve this the area of note was restricted to NYC. The addition of a variable called Area was created which assigns boroughs to each property.  Finally, the Price.FT2 and Price variables were transformed from strings to numbers, and renamed  Cost.FT2, and Cost.   

The default map where all the sales are plotted appears first in the Interactive Map panel.

Data Study on real estate properties in NYC

On the side bar, you can choose which neighborhood you want to have a look at, the price range and the property type(2b2b eg.). Let's say you chose Brooklyn, the map will give all the location of the sales and number of sales in each area.

Data Study on real estate properties in NYC


If you are particularly interested in one of the properties, you can simply zoom in and click on that property. A popup will appear and show you the address and a website link to this property.

Data Study on real estate properties in NYC


In the Explore data session, I calculated the average price per square feet for each Area so that you can see the price trend over time.


Of course, you can compare prices in multiple Areas as well.


In the Reference panel, you can explore the original data and do some search also.


For example, you might want to know the most expensive property listed in this shiny app. By looking at the slider in the interactive map, we know that the maximum is about 59M. Thus, we simply type in 59 and the result will come out.



Next Steps:

  1. Improve the shiny app in both algorithm and in UI perspective.
  2. Webscrape URL of the profile of each sale and link them to each sale in the popup.

Thank you for reading this blog post. Please feel free to give any comments!


About Author

Miaozhi Yu

Miaozhi recently received her Master’s degree in Mathematics from New York University. Before that she received a Bachelor’s Degree in both Mathematics and Statistics with a minor in Physics from UIUC. Her research interests lie in random graphs...
View all posts by Miaozhi Yu >

Leave a Comment

No comments found.

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