Go Back   Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board > Thoroughbred Horse Racing Discussion > Handicapping Software
User Name
Password

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 04-19-2010, 01:03 AM   #1
thorobasePA
Registered User
 
thorobasePA's Avatar
 
Join Date: Jan 2010
Location: Denver, CO
Posts: 93
vCash: 400
The thorobase API (Open Source)

The thorobase API goes open-source! Right now, the (JavaScript) API consists of 2 projects:

* thoroData, to encapsulate horse racing data, and
* thoroMotion, to visualize this data.

The projects are all hosted on github.com under my robinhowlett account. thoroData and thoroMotion are submodules of the thorobase project.

The thoroData API contains the basic Model for horse racing objects: Meets, RaceCards, Races, and Performances. It also contains static racing data (e.g. Equibase Points of Call and Points of Fractionals), and the "interface" for Provider (suppliers of racing data) objects.

Provider implementations parse the raw data contained with the provider's file format and transform it into the thoroData Model. Currently, I have implemented just one implementation of a Provider so far, the BRIS Import Chart Data, with many more to come.

The thoroMotion API wraps a Google Visualization API Motion Chart object and provides a createThoroMotionData method that transforms any thoroData Race object into the format a thoroMotion visualization requires.

If all of the above makes absolutely no sense, don't worry! In the coming days and weeks I will give a series of simple tutorials about getting started with the thorobase API, including creating thoroMotions, custom PPs, gadgets, converting from one provider's format to another etc.

For those of you comfortable with code, please go ahead and follow the links above to the GitHub repositories where you browse the source code. I've written some test code (in the /test folder) that demonstrates some basic usage of the thoroData and thoroMotion modules, and I've left some comments on the code that I hope, along with the code design, makes things clear.

If you know Git and github feel free the fork the projects, and if you are comfortable with JavaScript, just download the code and get started.

Otherwise, just either subscribe to the mailing list or the RSS feed on thorobase.com and you'll receive the tutorials when they written.

If you have any questions, please don't hesitate to ask.
__________________
Watch great horse racing videos at thorobase.com. You should also follow @thorobase on Twitter and become a fan.
thorobasePA is offline   Reply With Quote Reply
Old 04-19-2010, 10:44 AM   #2
Tom
Registered User
 
Tom's Avatar
 
Join Date: Mar 2001
Location: Canandaigua, New york
Posts: 50,915
vCash: 1310
Thorobase....
__________________
I'm not full of it, but I am close to the brim!
Tom is online now   Reply With Quote Reply
Old 04-20-2010, 02:07 AM   #3
CBedo
AllAboutTheROE
 
Join Date: Aug 2006
Location: Denver
Posts: 2,410
vCash: 400
Send a message via AIM to CBedo
Thanks for doing this Robin. Besides for the great code and ideas, I've been looking for a reason to learn and use Git instead of Subversion.
__________________
"No problem can withstand the assault of sustained thinking" -- Voltaire
CBedo is offline   Reply With Quote Reply
Old 04-20-2010, 08:14 PM   #4
thorobasePA
Registered User
 
thorobasePA's Avatar
 
Join Date: Jan 2010
Location: Denver, CO
Posts: 93
vCash: 400
@Tom and @CBedo, thanks for your support - it's always appreciated.

While I've released the source code now, this isn't version 1.0 by any means - it's very much an "alpha" project right now, which means the code may change significantly in the coming months.

I've had some feedback about data providers and I'm looking towards creating an implementation of the MULTICAPS format. I'm not overly-familiar with all the various data file structures or their popularity, but my impressions with .mcp files are that they are widely used and are perhaps the most detailed (is this true?).

So I think it makes sense to perhaps base thoroData on the most detailed file structure.

Also, while I will make some demos on creating a thoroMotion, I think that I will extend the thorobase API to include a database (tentatively titled thoroDB).

The majority of the feedback I've received has been around people wanting to explore racing data in the ways they see fit, and rightly so. However, I'm going to take a different approach on this. While the majority of sophisticated gamblers focus on using a database for investigating profitability of edge cases, I want to promote everyone being able to use the data in a variety of ways. That includes creating custom user interfaces and data discovery techniques, shareable queries and algorithms, and bespoke versions for mobile devices when at the track.

Hence, I'm looking at using the document-oriented database MongoDB. It stores objects as JavaScript objects so it's easy to work directly with the Model. It uses an Object-focused query language that great for simple filtering and supports map/reduce functionality for calculations on large datasets. I haven't used it before so it could turn into a disaster but that's always been the risk.

Hopefully I'll soon have something to show.
__________________
Watch great horse racing videos at thorobase.com. You should also follow @thorobase on Twitter and become a fan.
thorobasePA is offline   Reply With Quote Reply
Old 04-20-2010, 08:45 PM   #5
CBedo
AllAboutTheROE
 
Join Date: Aug 2006
Location: Denver
Posts: 2,410
vCash: 400
Send a message via AIM to CBedo
Mongo

I have been playing around with Mongo as well, and think it has some potential. I have used Solr/Lucene for some projects in the past (Solr is behind the model that I have talked about on this forum last summer) and the speed of queries is fairly impressive with the denormalized document structures. I think (still haven't reached full conclusion) that for simple queries, it will be a very good solution (and Mongo continues to evolve), but depending on the complexity of queries/join tables, it could possibly be limiting as well. I am going back and forth on whether to use Mongo or stick with MySQl with Ruby on Rails as the object relational model on top of it.

In general, I think the generalized relational database is somewhat a dying structure with more and more specialized solutions for specific projects. I'll be watching attentively with your progress with Mongo.

As far as data files, I don't think the multicaps files have the "most" information, but they do have more than the pp files, and their cost is substantially less than some of the other data files which probably only have more derived data anyway. Multicaps seems to be the way to go currently.
__________________
"No problem can withstand the assault of sustained thinking" -- Voltaire
CBedo is offline   Reply With Quote Reply
Reply

« Previous Thread | Next Thread »



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



All times are GMT -4. The time now is 04:13 PM.





Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright 1999 - 2011 -- PaceAdvantage.Com -- All Rights Reserved -- Best Viewed @ 1024x768 Resolution Or Higher