more »" />

Nashville real estate dashboard web app with some html5 goodies (part 1)

January 16, 2012

My wife and I are just now beginning our first home search. Being able to look up drive times, street view, photos, estimated home values, and everything in between meant lots of time browsing and SO many open tabs. It’s a frustrating mess. So I hacked up a little dashboard to make things so much easier. My favorite part was not writing it for anyone but myself. I make the rules!

After spending a weekend writing the app I’m pretty happy with it. Works great! You simply type in the street number and name, hit enter and everything appears. No need for city or state since I’m only searching in Nashville.  It even works well on my Android phone! Perfect if we see a for sale sign while out and about. As of now it’s customized to our personal search, I may generalize the code later on. (and make the JS less awful).

Hurdles

Creating a Realtracs link Just an awful site all around, everything is just so difficult. You can’t directly link to a home for more than 15 minutes as it timeouts or confuses it with another home.  Took me forever to find the search by mls feature. Problem solved? Nope! Although GET substituted just fine for the POST search, there were 2 keys created at page load that needed to be submitted with the post. So when my app initializes, it scrapes those 2 keys from a realtracs page. To finish building the URL I just need the MLS number…

MLS#. The zillow API inspired me to start making this app. It provides tons of very useful information about a home. What it doesn’t supply is agent submitted data if the agent hasn’t allowed it (photos, description, etc). I didn’t find one home that allowed that info :(. Of course the MLS number is a part of this agent submitted data.  More scraping. This time using the home details link that is returned from the zillow property details call. While scraping pages may not be kosher for real life apps, this is mine, I do what I want!

JSONP. I tend to live in JavaScript land. The zillow API does not return JSONP, or even JSON. Just XML. Instead of using some 3rd party resource to convert the feed into JSONP I took at stab at it in PHP. So easy! To get the file, load it as xml, and convert it to JSON only takes ONE line:

echo json_encode(simplexml_load_string(file_get_contents('zillow query goes here')));

 

In part 2 I’ll write a little bit about using the new html5 feature localStorage. Super simple! In this case not quite  as useful as storing to a db, but not dealing with log-ins and keeping it client side was my goal.