Bannerapi
DICTIONARY
describe_scenarios
describe_analysis
CALCULATION
calculate

On the drawing board.

As mentioned, this is a "first pass," there because several people and organizations have asked for it. There are things I would like to add to the API to make it significantly more useful, as well as mechanism for understanding who is doing what with the HouseMath engine. So...

Definitely Coming Soon

  • I consider the API to be Beta right now. In the production version, API users will have to register, get an access key, and use it to make API calls. Simple process, no applications or approvals. I just want to keep things reasonable.
  • A real REST-ful API where you CREATE/READ/UPDATE/DELETE an analysis as an entity, can tie it to a user, save it, and refer to it by an ID. HouseMath already has a user system, but I would like to leverage something that's out there already like YAHOO's bbauth (use your YAHOO account to login and save/manage analyses you have saved and performed.)
  • Complete support for charting... It is very simple to pop out a 'png' chart like the ones you see on the site and I almost put it into the beta (but I thought I'd leave something to make you want to come back to the actual site). HouseMath is built in a way that any "dependent variable" such as "rent equivalent", "n-th month mortgage payment", etc. can be plotted against any "independent variable" such as price, mortgage rate, etc. The goal is to provide a really flexible charting engine where you take and analysis, specify what you want to plot against what, and get a sweet-looking chart out.
2.0.15, Apr. 4th, 2007 [41]
© 2005-2007 Thansys Technologies LLC

The HouseMath API.

Here is the first pass at the long-awaited HouseMath API. The API allows any web developer to use the HouseMath calculation engine on their site. The first version provides three basic functions:
describe_scenarios
This is a function you call to get a list of all the scenarios currently available in HouseMath (as XML). The list is growing all the time, so it's a useful call for discovering new ways to do new analytics. This is the source of the important scenarioid variable used to identify which scenario you plan to work on.
describe_analysis
Gives you a complete description of all the parameters HouseMath uses to perform an analysis (as XML). This can be a quick call to just get a list of variables (FYI, if you know them you do not need a description), or a call that returns result of various degrees of complexity including parameter names, default values, units, unit labels, parameters validators, sample calculations, and even LaTex equations for each calculation used. Basically it is everything one might need to build another HouseMath app in the language of their choice, including the fancy math in the HouseMath Wiki.
calculate
Accepts parameters for various variables that are needed to calculate a scenario. If any parameters are not passed, the defaults are used. The function returns a complete set of reports with variables, intermediate calculations, etc. All in XML.

Sample Code

As some of you know, HouseMath is written in Ruby + Ruby/Rails and is relying on YUI and YUI-EXT for its user interface. However, there are other ways to skin a cat. I provide sample code in Ruby/Rails (obviously) and PHP 5.0. Any web development language that can make an HTTP GET request, parse the result as XML, and then work with it will do. I have a secret dream of putting up a version of HouseMath in Adobe Flex... "had we but world enough and time" as Andrew Marvel put it.

XML Schemas

I want to be a good citizen, so there are XSD schemas provided for all XML results. I would not necessarily use the schema locations for validation because those locations might change, but schemas are there for anyone to download and use.

Enjoy

Loading...