Data Study on real estate properties in NYC
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:
- Address, type string, gives the address of each sale
- Neighborhood, type string, gives the neighborhood of each sale
- Beds, type string, gives the number of bedrooms in each sale
- Bath, type string, gives the number of bathrooms in each sale
- Size, type string, gives the size of each sale
- Price.FT2, type string, gives the price per square feet of each sale
- Price, type string(with dollar sign), gives the total price of each sale
- 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.
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.
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.
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.
- Improve the shiny app in both algorithm and in UI perspective.
- 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!