Horse Racing App Part 3
Horse Racing Application
Race Horse Form Builder Part 3
Horse Ratings Calculation File
In the first two sections we have reviewed RaceHorseFormBuilder. There we described what the RHFB horse racing application can be used for. Namely you input horse racing results. Then as it does so the App performs all the calculations for creating a handicapping rating for every horse, which completed the race. You make any manual alterations. Then finally you save the loaded data into your own database.
There is one file, which is central and key in being able to calculate the actual ratings and we now go into this in some detail. It is at the heart of the application, with regard to handicapping the racing results and producing ratings from them.
This ‘control file’ is stored as a CSV file and is named calculate.csv. It can be edited outside of the App with any spreadsheet application. In the screenshots below, you will see an example of the file. First, as it appears when using a ‘Text File Import’ with Excel. Then alongside, the file it as it appears within RHFB.
Set Your own Points per Length at Any Distance
Setting the calculate.csv to your own requirements allows your preferences to control how the handicap ratings are calculated. If you want 1 length over 1 mile to be worth 3 points then set it so. If it should be 2 points it can easily be set by amending this file and loading the details into the App.
As such, you can set the distance of a race with the corresponding pounds or points per length that shall be worth. The file is also responsible in working out the Total Lengths every horse finishes behind the winner. Once again, if you do not agree with the settings in the table you can change it. For instance, we have measured that a Neck as used in the finishing distance is a decimal equivalent of 0.20 or 1/5th of a length.
To edit the calculate.csv, first take a copy and open in a spreadsheet, such as Excel. This then displays in a neat way. Being able to edit the file allows you to set exactly how you want the ratings to be calculated with your personal settings.
The screenshots and explanatory notes are using calculate.csv with their default settings, as you will receive it. On the second screenshot, there is an ‘Update Calculate File’ option. This allow you to load and store a copy of the calculate form elsewhere and it then save a calculate.csv file in the applications own folder.
Ratings Control File - calculate.csv
It is important that the formatting is left in place so Flat Racing is in columns A to D and Jump Racing from F to I. As row B is the header title, it therefore describes what type of information each of the columns contain.
Okay lets start with the basics of miles, furlongs and yards racing distances.
1 Furlong = 220 yards & 1 Mile = 8 furlongs which is 1760 yards ( 8 x 220 = 1760)
Column A is the total race distance in yards for which the App needs to be able calculate corresponding length and parts of a length values. Any race starting with 0 yards is set out in Rows 3 to 10 i.e. that means any race which is the from yards of zero. You will see this changes to 1210 (yards) at row 11. It is at that point races from 5½ furlongs in distance will use this new scale. That is rows 11 to 18.
Essentially the area rows 3 to 10 will provide calculations for Flat races less than 5½ furlongs. Which will be carried out by using figures in columns B to D.
While Column C, which is the Points column, the values will vary calculated on their worth.
The figures in Columns B and D will always repeat themselves for every different distance that Column A begins at.
As mentioned the points per length can be changed to any distance raced over, by you the user as you require. You may want a different points per length for 5 furlong or 6 furlong or 7 furlongs races and so on .More on tailoring these later.
These are the measurements used in the results per race distance as part lengths that may separate each horse from the one ahead of them.
To explain the winner of a race in the results data files does not have how far it won by. The figure denoting how far beaten do then commence at the second horse and how far behind the winner it was. Then this follows for the third placed showing how far beaten behind the second it was and so on.
Horses can be beaten by the points or pounds worth of a Length, that is denoted by the figure 1 in column B. The horse can be beaten by any multiple of one length and additionally that could include a part measurement, such as 4 ½. Meaning four and a half lengths. The application takes care of this, it just needs these 8 values to be entered and it will work anything else out itself.
For clarity the items in this column are
- nse = nose
- shd = short head
- hd = head
- nk = neck
- ¼ = quarter length
- ½ = half length
- ¾ = three quarter length
The key thing to note is the value figure for 1 in the ‘length column’. Here in column C the actual figure shown is the number of points 1 length is considered to be worth when races take place over a race distance in that range. Column 11 at Row C means that for races less than 1210 yards, here 1 length is deemed to be worth 3.5 points.
We also use this directly with weight in particular pounds (as in stones and pounds) 1 point is equal to 1 pound of weight.
The figures for the parts of a length are the result of multiplying the points for 1 length by the figure on the same row.
Two examples in races up to 1210 yards.
A horse beaten hd where the length value [ C..11 ] is worth 3.5. Now multiply by the converted value [ D..5 ] that is 0.15. This calculation results in a final figure of 0.525 points, which is the figure shown in the Points column C at row 5 [ C..5 ], if you check the earlier image.
Next example for Jumps racing where a horse was second beaten 3/4 length in a race 5280 yards or longer.
The length value [ H..29] 0.75 x converted value ¾ [ I..27 ] 0.15. This equates to 0.5625 points. In plain English, a race of 5280 yards or more, a length is worth 0.75 points. As the horse was beaten 3/4 of a length, then the value in points is three quarters of 0.75 and that reads as 0.5625.
If you want further example and explanation send us a message using one of the contact forms or email email@example.com
Having touched upon the Converted column in the previous Points section above, we now explain the Converted columns in the calculate.csv. These are presented as both Column D [Flat] and Column I [Jumps].
This relates directly not just to the Length amount but now as it is converted with a decimal representation.
Easy to see that ½ a length should be 0.5. and for a nose [ nse ] this is deemed to be 0.02 of 1 length.
As can be seen and again as mentioned earlier, these numbers are consistent for every group of race distances. A ¼ of a length is always going to be 0.25 no matter what the trip a race is run over.
Configure Your own settings
One of the beauties of having the Calculate.CSV file in this format, is that you can tailor it to meet your needs so that any handicapping is carried out with your own criteria.
You can set the Yards From for any interval of race distances. The key thing to note is that Column A should have the 8 elements for the Length column. It should also be in order of increasing Distance. Next you can see the default I have set for RaceHorseFormBuilder ratings distances used.
For Flat yardage
For Jumps yardage
You can have more (or less) than the 5 Flat or 3 National Hunt distances than currently default. Simply select the distance and convert to furlongs. 1 mile being equal to 8 furlongs. Divide the total number of furlongs by 220 will give the total yardage and of course you can add or deduct individual yards to suit.
Pounds (or points) per yards can be any figure you think is appropriate. As a good example, some people consider that races over the shortest trip in Flat racing a length is equivalent to 4 pounds.
If you want to do this taking the Column A rows which are 0, first replace 3.5 in [C..11] to 4.
Next fill in the figures in column C rows 3 to 9.
For nse multiply the Converted column D figure in the same row  by 4 0.02 x 4 = 0.08 and replace [C..3] 0.07 with this 0.08
- shd row 4 is 0.05 x 4 = 0.2 and replace [C..4] 0.175 with this 0.2
- hd row 5 is 0.15 x 4 = 0.6 and replace [C..5] 0.525 with this 0.6
- nk row 6 is 0.2 x 4 = 0.8 and replace [C..6] 0.7 with this 0.8
- ¼ row 7 is 0.25 x 4 = 1 and replace [C..7] 0.8 with this 1
- ½ row 8 is 0.5 x 4 = 2 and replace [C..8] 1.75 with this 2
- ¾ row 9 is 0.75 x 4 = 3 and replace [C..9] 2.625 with this 3
As always column D (& I) should have the same repeating range 0.02, 0.05, 0.15, 0.2, 0.25, 0.5, 0.75 & 1
Well that was quite long explanation, but we do appreciate that there are beginners as well as experts who will be reading this. So next we actually get on and describe the RaceHorseFormBuilder App itself, which we hope is straightforward enough.
Update Calculate File
When you have made a change to the details within the Calculate.csv with new settings, then these must be given or loaded into the App.
The first time you use the RHFB App you should run this. The ideal location is store the csv in the same folder as the Racehorseformbuilder.exe file as per the recommendation earlier. However you could use a working copy elsewhere and then update the App. As part of the update process the file will stored in the application folder.
Using this option in practice. If you click the Update Calculate File button, then the current located file being used is displayed along with the file content settings in the Preview area.
If you wish to change this, pen the file in Excel or any spreadsheet, ensuring all columns and rows follow the prescribed format. When saving make that the file is saved as a fully formatted CSV file. Then with the RHFB app load it as directed earlier.
Additional Notes on the Horse Racing Application
The RaceHorseFormBuilder was devised as I required a tool which does what I wanted, namely loading racing results into a database. It calculates and creates additional fields for the database. These extra fields are as follows:-
Main Data Table.
- Type – The App reads the race description and enters the different race codes for National Hunt racing. c for chases, h for hurdles and b for bumpers or national hunt flat races.
- WinTimeInSeconds – Converts the recorded winning time to seconds only
- BaseRating – Your rating for the winner is the Base Rating for any race where the handicapping has taken place. This is stored in the race conditions table (main).
Details Data Table.
- DistanceBeaten – This figure is the total distance each horse finishes behind the winner
- WeightInPounds – The column contains how much weight each horse carries as pounds
- Rating – Most important if you are rating every horse, this is where those are stored
If you are a Subscriber there is a second version of the results data files we publish weekly and we do make it possible for anybody to obtain back copies of these past results data files.
We name and call these our Single File Format and they contain all the information that is in the main.csv & details.csv, plus the 6 fields mentioned above. In addition there is a column for the SP which is converted to a decimal. The data is stored in a single CSV file, hence the name we call this type. If you are interested in becoming a Subscriber please join up at the Membership Options Page and if you want to read about the ************ Single File Format CSV files read more********* on that page. Should you want just the data from previous years racing results these are available, please read Past Racing Results page
Thank you for taking the trouble to read about the App.
While it fits my remit with the functions it has, there may be further features that you as a user would like to see added.
Please send any thought, comments or requirements that you have via this Contact Us link.
I know some people do not want to store the data in a SQL database, but still like the idea of their own ratings being calculated. We may well put a Save to CSV along with the database option in the App. If you do want to this it is possible to copy & paste the data from the App. Read all about Using the App without a database here!
We hope you appreciate that the RHFB horse racing application is a free bonus gift from myself to anyone who subscribes. I trust you find this a rewarding and constructive utility, for some people this has been exactly what they have been waiting for, are you one?
Simply put RacingFormBook will help inform and assist you to find winners and enjoyment from Horse Racing. Provide a unique rating method and racing results data.
To further anyone’s ambition to use the information, whether this is as a point of reference, a repository for their ratings or to enable the research into racing systems.