At last week’s hackathon, ZipCode, by Retsly, granted access to the MLS in a handful of markets. The MLS is a list of all the properties for sale in a market, and when the property sells, the price that was paid.
I set out to build a list of multifamily properties where rent from one unit would cover the mortgage payment of the entire property, aka ‘house hacking’. Positioning a property as a short term rental can lead to higher revenue, so I pulled data from Airbnb to find comps, and to estimate rental income.
For the hackathon, the only MLS that would approve my application, and listed multifamily properties was the Okanagan Mainline MLS. Okanagan is a dozen communities around Lake Okanagan in Canada. The Retsly team explained that Okanagan is the Napa of Vancouver, with a lack of frost, 2-hour drive from Vancouver, and wineries near the lake.
Given the ~20 hours to hack, I focused on the simplest project I could, and I was able to have a finished product by the end of the hackathon.
Because Okanagan is in Canada, I used the higher downpayment(25%) and interest rates(3.1%) when calculating a mortgage payment. The revenue prediction is accomplished by averaging the past performance of nearby listings. Airbnb only exposes historical calendar data, not any kind of real revenue predictions.
My main technical goal was a very low-cost way to have the Investor Report auto-update itself. Serving this app on Heroku or DigitalOcean would cost about $7-20. To keep costs down, I focused on making the site static so it could be hosted on Amazon S3, for about 10 cents a month.
With the Heroku free tier, I have 8 dyno hours a day to use, which is more than enough for the level of work being down with the Investor’s Report. Importing data, generating the static site, and deploying to S3 are fired off by separate rake tasks, which run every 12 hours.
One gotcha I ran into was Heroku’s free dyno’s run out of memory when deploying with the s3_website after importing data. To get around this, I separated the deploy task from the import task. This snippet shows how the deploy is run.
task :deploy_static_site => :environment do
StaticSite.generate
puts `s3_website cfg apply --headless`
puts `s3_website push`
end