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.)
Backend: Python, Flask, PostgreSQL, PostGIS, SQLAlchemy, GeoAlchemy2, BeautifulSoup, Scrapy
Frontend: JavaScript, jQuery, AJAX, JSON, Jinja2, Bootstrap, HTML, CSS
APIs: Zillow, Google Maps
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.
- Python 2.7.0
- PostgreSQL
- Clone this repository:
$ git clone https://github.com/jttyeung/investable.git
- Set up a Python virtualenv and activate it.
$ virtualenv env
$ source env/bin/activate
- Install all app dependencies listed in requirements.txt.
$ pip install -r requirements.txt
- Make sure you have PostgreSQL running (psql).
- Create a database named investable.
$ createdb investable
- Open the database, add the PostGIS database extension, and exit out of the database.
$ psql investable
CREATE EXTENSION postgis;
\quit
- Create tables in your database.
$ python model.py
- 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'
- Source the secrets file.
$ source secrets.sh
- Start the Flask server.
$ python server.py
- Go to localhost:5000 to view the application.
- 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. - 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. - 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).
- Enter your mortgage customizations to compare rent rate vs. mortgage rate, or search again.
- 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
Joanne Yeung is a full-stack engineer in San Francisco, CA. Learn more on LinkedIn: https://linkedin.com/in/jttyeung
This project is licensed under the MIT License.