Skip to content

A web app used to research potential rental real estate investments.

License

Notifications You must be signed in to change notification settings

jttyeung/investable

Repository files navigation

Investable

Investable is a research tool for individuals looking to purchase rental real estate. Intended for smart investors, this app compares personal mortgage rates to average rent rates within the surrounding neighborhood of the point of interest. Using the estimated rental rate on the market, it helps users instantly determine which properties might bring in rental income. Users can search by address or region or use Google Maps directly to find a home of interest, and can filter down search results by number of bedrooms, bathrooms or the home listing price.

Database Model (See full model in the model.py file.) Investable DB Model

App Investable Homepage

Investable Second Page

Table of Contents

Tech Stack

Backend: Python, Flask, PostgreSQL, PostGIS, SQLAlchemy, GeoAlchemy2, BeautifulSoup, Scrapy
Frontend: JavaScript, jQuery, AJAX, JSON, Jinja2, Bootstrap, HTML, CSS
APIs: Zillow, Google Maps

How to Run Investable Locally

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  1. Python 2.7.0
  2. PostgreSQL

Installation Instructions

  1. Clone this repository:
$ git clone https://github.com/jttyeung/investable.git
  1. Set up a Python virtualenv and activate it.
$ virtualenv env
$ source env/bin/activate
  1. Install all app dependencies listed in requirements.txt.
$ pip install -r requirements.txt
  1. Make sure you have PostgreSQL running (psql).
  2. Create a database named investable.
$ createdb investable
  1. Open the database, add the PostGIS database extension, and exit out of the database.
$ psql investable
CREATE EXTENSION postgis;
\quit
  1. Create tables in your database.
$ python model.py
  1. Set up a secrets.sh file using the following API key variables, and fill in the template with your own API key values.
export APP_KEY='your app secret key'
export ZWSID='your zillow api key'
export GMAPS_JS='your google maps api key'
  1. Source the secrets file.
$ source secrets.sh
  1. Start the Flask server.
$ python server.py
  1. Go to localhost:5000 to view the application.

How to Use Investable

  1. Edit the list of start_urls in /rent_scraper/rent_scraper/spiders/craigslist.py with the Craigslist URL for the city you would like rent averages from.
  2. Edit the CLOSESPIDER_ITEMCOUNT in /rent_scraper/rent_scraper/spiders/settings.py to indicate how many rental properties to include in the average. Please scrape responsibly.
  3. Search for a listing of interest by full address. Note: This is a proof of concept project and therefore it is not possible to search by city/region without listing data in the database. It is still possible to search specific home addresses (which call upon Zillow's API directly).
  4. Enter your mortgage customizations to compare rent rate vs. mortgage rate, or search again.

Version 2.0

  • Improve application security
  • Improve testing coverage
  • Add Airbnb rates comparison as rental income option
  • Add user login to save favorite listings
  • Using sessions, mark visited markers a different color
  • Use address normalization for search
  • Make price slider range dynamic to database data
  • Show graphs of rental or home prices over time
  • Build a Chrome extension for app

Author

Joanne Yeung is a full-stack engineer in San Francisco, CA. Learn more on LinkedIn: https://linkedin.com/in/jttyeung

License

This project is licensed under the MIT License.

About

A web app used to research potential rental real estate investments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published