Residential Property Investment Visualization and Analysis Shiny App

[This article was first published on R – NYC Data Science Academy Blog, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.


The purpose of this Shiny web app is to better advise clients in residential property investments in New York City by visualizing sales and rental market trends in major areas.

Check out the app HERE, and find the code HERE.


Sales and rental data are compiled from OneBlockOver by Streeteasy. The dataset used in this web app is combined using:

– Borough
– Neighborhood
– Date
– Condo Listing Median Price
– Condo Sale Median Price
– Rental Studio Median Price
– Rental One Bedroom Median Price
– Rental Two Bedroom Median Price
– Rental Three+ Bedroom Median Price

Boroughs in consideration are Manhattan, Brooklyn, Queens.
The date of the data point ranges from Jan 2014 to Aug 2018, aggregated monthly.

Boundary data of the neighborhoods are acquired from


How to use this web app:

Start by clicking on the “Visualization” tab on the side menu to go to the visualization page. Beware that it takes a little time to load so don’t be startled by the error messages. Voilà!

First, choose a borough and neighborhood from the right side of the page.

Then, you will see that the neighborhood you selected will be highlighted on the map at the top of the page.

On the bottom left, there will be a brief summary of the market trend of property sales in your chosen neighborhood, whether it has been increasing or decreasing. And it will provide a rough estimate of the percentage change in property value and value prediction for 2019 and 2023 (5 years). You can also opt to see an interactive chart of Listing and Sale price over the years.

On the bottom right, there is a chart showing the rental prices for different properties types, whether it is a Studio, One Bedroom, or even Three+ Bedroom.

You will notice a slider and selector below the location selectors, it is used to set a budget and a room count so that the tool will calculate a rough estimate of your mortgage payment, given 20% down payment,  30-year term, and an annual rate of 5.04%.

Future Works:

  • There is some backend issue with the interface that will require an overhaul, which I will tackle first.
  • Still making improvements on the map feature. The idea is to show nearest neighborhood info on the map for comparison.
  • Dataset is not really complete for neighborhoods that brokers do not post listings on Streeteasy. Need more detailed and comprehensive data.
  • Need more features to consider such as crime rate, school ranking, etc. for different neighborhoods. 

To leave a comment for the author, please follow the link and comment on their blog: R – NYC Data Science Academy Blog. offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)