+1 vote
Does anyone know at what time the daily updates are made or if more information is available at a later time? Is it possible to write a script for the latest speed figures with each horse whilst also using data from the daily tables because the speed figure seems to be missing for the daily tables?

 

Thanks in advance.
in Horseracing by arkantosno1 Novice (220 points)

3 Answers

0 votes
The latest daily cards are updated the night before racing, after final declarations. Declarations for racecards beyond the next day are sometimes available also.

Results updates from the previous day's racing are available from 5 am every morning.

The speed figure assigned to the run of a horse is part of the results updates, so will not appear in daily racecard information.  However, you can capture the speed figure from a horse's last run and combine it with daily racecard data.

There are lots of ways to do this.  The best way to get exactly the data you want and present it how you want is with a program script that uses a database interface, such as Perl, Ruby, PHP, Python, R etc.

Any script - or manual method using the database alone - will use a couple of key queries.

First, you'll need a list of all the horses you want to find the last speed figure for.  This can be a list of horse names for all runners declared today (or a previous day), as follows:

>select course, distance_yards, scheduled_time, name from daily_runners join daily_races using (race_id) where meeting_date=CURDATE();

Second, you'll need to find the last speed figure for each of those runners.  Here's one way to do that - in this example using a specific horse name - Opinion Poll - which in a program could be replaced by a variable representing a horse name:

>select course, distance_yards, scheduled_time, historic_runners.speed_rating, name from historic_runners join historic_races using (race_id) where name = "Opinion Poll" order by scheduled_time DESC LIMIT 1;

A suitable script would save the list of daily runners, then loop over that list and present the name of each horse to the second query shown, in order to retrieve its speed figure and display that figure alongside any of the other variables retrieved in the example query above (eg. course, distance etc).
by colin Frankel (19.7k points)
+1 vote

Extending Colin's answer a bit, it's worth bearing in mind that solely using the latest single speed figure isn't always that helpful.

Using Colin's sample query in practice would need some extra "where" clauses to get rid of records in the 'historic runners' table where the horse was a non-runner, for a start. But even with this refinement, there's no guarantee that the speed figure from a horse's latest run is a true representation of it's potential. A whole range of factors could affect it (slowly run race, horse hampered, horse badly drawn in a sprint. horse falls in a jumps race, etc.).

I tend to take the best speed figure from a horse's last three runs as the standard basis for my analysis. It's reasonable to assume that at least one of these runs will have been in circumstances where the horse was able to show what it can do ... 

by SlightReturn Listed class (2.9k points)
0 votes
Some good answers but thought I may be able to add a little bit more as well. SlightReturn suggested using the last three which is way better than using the last one. Another possibility would be to bring back all the speed figures in the last 30 days (or 60 or 90 depending on what you are looking for). Then you can remove the outliers before taking the mean of what is left. This will most likely give you a much more reliable figure for recent performance. You could also do this if you are using a programming language to access the database so that you are just returned the single figure. You may want to take it one step further still and use a regression to find the slope which can help you to predict where the horse should be performing today.
by raceadvisor Handicapper (630 points)
...