I need to strip the information about Australian horse racing form, so that I can analyse it more efficiently.
Racing form for harness racing is available at [url removed, login to view]
An example of an individual race is at [url removed, login to view]
The project requires the following steps:
1. Parse the details for each race record.
4-11 MARYBRO 05Dec10 2190MS (Good), $5000 Emerson Printing (C5 to C6), Fr3 David Moran $12.10, btn [url removed, login to view], wnr LANDSCAPE Fr2, 2nd WIZARD OF SPEED NZ Fr1, 2:00.6, 57.4 (30.8, 33.3, 30.0, 27.4) gate speed, 1 out 1 back at bell
4-11 means finished 4th out of 11 horses in the race
MARYBRO is the code for the racetrack
05Dec10 is the date
2190 is the distance of the race
MS means the type of start
(Good) is the track condition
$5000 Emerson Printing (C5 to C6) is the details of the race
Fr3 is the barrier position
David Moran is the horse's driver
$12.10 is the horse's odds
btn [url removed, login to view] is how far the horse was beaten by the winner of the race
wnr LANDSCAPE Fr2 means that the winner of the race was a horse named LANDSCAPE and its barrier position was Fr2
2nd WIZARD OF SPEED NZ Fr1 means that the 2nd placegetter of the race was a horse named WIZARD OF SPEED NZ and its barrier position was Fr1
2:00.6, means the mile rate
57.4 is the seconds taken to run the "Last 800".
(30.8, 33.3, 30.0, 27.4) are the number of seconds taken to run the last 1600m, broken into 400m blocks
gate speed, 1 out 1 back at bell are comments
2. Identify the "Last 800m" time (in this example it is 57.4). In some cases, this data is not provided.
3. "Beaten distance" Find the distance the horse was beaten by. It will follow "btn" (in this case it is [url removed, login to view]) unless the horse won the race, such as the following example. In this example, there is no "btn" anywhere as the horse won by [url removed, login to view]
1-11 CRANBRN 11Dec10 2080MS (Good), $8000 Ted Bull Funeral Services (M0 To M1.), Fr2 Luke McCarthy $10.00, [url removed, login to view], [url removed, login to view], 2nd ST BARTS NZ Sr5, 3rd WHIPAIR Sr3, 1:59.0, 58.7 (31.0, 31.1, 29.4, 29.3) gate speed, led, leader at bell, swabbed
4. Calculate the "adjusted 800"="Last 800"+("Beaten distance"/14)
For Example 1, this would be 58.28=57.4+(12.3/14)
5. Round this answer to the nearest 0.25
6. Output the data for all horses in a race, in Excel with each horse on one row, and each race in a column