|
Managing Chart Data in JCapper
By Jeff Platt
Date Last Modified: July 30, 2020
|
Managing Chart Data in JCapper
Overview
This article is intended to provide you with the necessary background info for managing Chart Data in JCapper.
Field Mapping
HDW Text Chart Result Files are comma delimited text (254 fields per horse record.) Link to field mapping PDF -
here.
File Types
Mid Day Chart Results File
The Mid Day Chart Results File contains comma delimited text chart results data, one row per horse record, and 254 columns per horse record. Field mapping linked to above.
The Mid Day Chart Results File is updated by HDW approximately every 15 minutes during each race day as chart data for new races are are transmitted to HDW by Equibase.
Unlike standard HDW Text Chart Result Files, the Mid Day Chart Results File contains chart data for all thoroughbred races at all tracks each race day.
To download the Mid Day Chart Results File, bring up the HDW File Download Tool in the HDW File Mgr, click MENU, select IE/WinInet Clear Cache to clear the download history, log into the HDW site using your HDW username and password, click the Queue Mid Day Results File button on the left hand side of the interface, select the Mid Day Chart Results File to highlight it, and click the Download button at the bottom of the interface to download the .zip file containing the Mid Day Chart Results File to your current active data folder.
From there, unzip the file using the unzip utility of your choice, copy it to a desired folder as needed – and then import the Mid Day Chart Results File into the third party app or spreadsheet of your choice.
Clearing the Download History
Always clear the download history by running the IE/WinInet Clear Cache routine from the HDW File Mgr menu just before each download session.
Running the IE/WinInet Clear Cache routine from the HDW File Mgr menu forces the Internet Explorer DLLs that I used in the HDW File Download Tool to grab the most current available version of all files downloaded during the current session from the HDW site. This applies to and includes the following file types: Mid Day Chart Results File, HDW Text Chart Result Files, and .JCP Past Performance Data Files.
Warning, If you fail to run the IE/WinInet Clear Cache routine from the menu at the start of a download session:
The Internet Explorer DLLs I used in the HDW File Download Tool will (wrongly) assume that previously downloaded versions of files you are attempting to download during the current session are ok. As a result, you’ll just end up re-downloading the same (older) versions of files that you previously downloaded.
HDW Text Chart Results File
The HDW Text Chart Results File contains comma delimited text chart results data, one row per horse record, and 254 columns per horse record. Field mapping linked to above.
Each HDW Text Chart Results File contains thoroughbred chart data for a single racecard only. (A racecard being defined as the races at a single track for a single calendar day only.)
HDW Text Chart Results Files generally first become available for download on the HDW server a few hours after the last race at a given track goes official.
Corrected Chart Data
Be aware that Equibase chart data is constantly being corrected. Also be aware that Equibase is constantly transmitting corrected chart data to its licensed data resellers Brisnet, DRF, HDW, and TrackMaster. From there it’s up to the data reseller whether or not to make corrected chart data available for download to horseplayers.
At my urging, in 2017, HDW began creating a number of internal systems for making corrected chart data available for download to horseplayers.
Many of the corrections are minor in terms of impact on decision making for purposes of live play. For example: spelling correction of a breeder name, adding another last name to an owner partnership, etc.
Other changes can have a major impact if you are using chart data for purposes of decision making during live play. For example: corrections of final and sectional times for mistimed races, corrections of positional calls and/or beaten lengths, corrections for data entry errors involving pari-mutuel payoffs, etc.
HDW is constantly updating the Text Chart Result Files available for download on the HDW site as new corrections are received from Equibase.
HDW makes their Text Chart Result Files available for download for a period of 45 days.
It’s up to you to periodically re-download (and rebuild) all of the HDW Text Chart Result Files available for download on the HDW server.
Weekly Maintenance
Rather than hunt and peck through a lengthy list of chart files that have undergone corrections:
I've adopted a simple strategy that involves clearing the download history to insure that I get the most current chart data available for download on the HDW site, followed by redownloading all of the available chart data from the HDW site, and followed by rebuilding all of the chart data I just downloaded.
I make the effort to do this about once per week. I generally do this each Monday morning after 8:00 am Eastern time.
Important Notes:
I recommend downloading corrected chart data during the day (as opposed to doing it during the middle of the night.) I say that because of a quirk I noticed that (sometimes) happens with the HDW download server.
HDW keeps files available for download on their server for a period of 45 days. At some point during each night they remove the oldest day of files from their download server and add the next new day of files to their download server.
The quirk is: If you happen to start downloading while they are replacing the oldest day of files with the newest day of files (if you time it just right) the index will show 46 days of available files instead of (the correct) 45 days available files.
When that happens, if you attempt to download the 46th day of files, the Internet Explorer DLLs I am using in the HDW File Download Tool are tricked into downloading the 46th day of files which are no longer there. The result is that you end up downloading empty .ZIP files for that 46th day. From there, you end up replacing otherwise good .ZIP files with empty .ZIP files for that 46th day back.
Right now as I type this I am working on new code to handle this as a bug fix that will be published in an upcoming JCapper Program Update.
But I am writing it up here so that you will at least be aware of it:
You can avoid the issue entirely by not downloading corrected chart data for prior months between 12:00 am Eastern and 8:00 am Eastern time.
If you must download between 12:00 am Eastern and 8:00 am Eastern time, be aware that it’s possible for the file index on the HDW server to display files for 46 days instead of 45 days.
If that’s the case: Do NOT highlight files for the 46th day back. Otherwise, you risk downloading empty .ZIP files (and losing chart files for that 46th day back.)
How to Download Corrected Chart Data:
Current Month:
1. Launch the HDW File Mgr and clear the download history by running the IE/WinInet Clear Cache routine from the HDW File Mgr menu (as described above.)
2. Queue up all available chart files for the current month and download them to your current active data folder.
3. Run an .XRD File Build routine for the current month files that you just downloaded. Then x-out of the HDW File Mgr.
That’s it!
Prior Months:
1. Bring up the DFM and change the current active data folder to the folder associated with the prior month. Then x-out of the DFM.
2. Launch the HDW File Mgr and clear the download history by running the IE/WinInet Clear Cache routine from the HDW File Mgr menu (as described above.)
3. Queue up all available chart files for the prior month and download them to the current active data folder (that you persisted as checked in the DFM in step 1 above.)
4. Run an .XRD File Build routine for the prior month files that you just downloaded. Then X-out of the HDW File Mgr.
5. Bring up the DFM and change the current active data folder back to the folder associated with the current month. Then x-out of the DFM.
That’s it!
Command Line Switches
Like many of you, I have automated my HDW File Download Experience. I’ve created a handful of desktop shortcuts that, when clicked, run DOS .BAT files that run the HDW File Mgr using command line switches.
The primary .BAT file that I use for current month chart data contains the following commands:
cd c:\jcapper\exe
hdwreader/getchartfiles synchtodisc currentmonth autobuild noexit
The top command line “cd c:\jcapper\exe” (without the quotes) causes the open program window to navigate to the c:\jcapper\exe folder where the .exe file for the HDW File Mgr is located.
The second command line “hdwreader/getchartfiles synchtodisc currentmonth autobuild noexit” (without the quotes) causes the following chain of events to be executed:
1. The HDW File Mgr is launched by running its .EXE file (filename: hdwreader.exe on the c:\jcapper\exe folder.)
2. Upon startup, the The HDW File Mgr executes the following command line switch: getchartfiles synchtodisc currentmonth autobuild noexit
The result is auto-running of the exact same event chain that would happen had I manually launched the HDW File Mgr, clicked the File Download Tool button, clicked the Queue Chart Files button, clicked the Synch to Disc button, answered Yes when prompted if I wanted chart files for the current month, clicked the Download button at the bottom of the interface to download highlighted chart files for the current month, closed down the HDW File Download Tool, clicked the File Build Filter Tool button, selected HDW Chart Results File from the File Build Type dropdown, selected the date of the oldest file just downloaded from the start date Calendar Control, selected the date of the newest file just downloaded from the end date Calendar Control, and clicked the Apply Dates Build Files button to run an HDW Chart File Build.
At the end of the event chain, the HDW File Mgr remains open (because of the noexit command on the switch) so that I can clearly see the filenames of the individual racecards that were downloaded, unzipped, and built.
From there, all I have to do (manually) is x-out of the HDW File Mgr.
Important Notes:
I purposely used “getchartfiles synchtodisc currentmonth” (without the quotes) on the command line switch because (sometimes) the chart data for a given racecard is delayed a day or two because the data itself contains glaring errors that are caught by sanity checking or quality control routines employed by HDW.
Examples of this might be a race without a win mutuel, races where the chart caller or track personnel failed to remove one or more scratched horses, fractional times that are impossible given the final time, track condition, or distance for a race, or races with final times that are impossible given the track condition or race distance, etc.
In cases like this:
HDW will contact Equibase, who in turn will contact the track, who in turn will figure out what went wrong and get the bad data corrected – and send it back up the chain.
It might take a few days, but eventually HDW will publish a Text Chart Results File for that racecard.
I purposely did NOT use “getchartfiles yesterday” (without the quotes) in my .BAT file because doing that causes me to miss picking up occasional chart files that are delayed for a few days because they contain bad data (such as those described immediately above.)
Link to a text file containing the command lines in my .BAT file described above -
here.
Install Instructions:
1. Download the above linked to text file to your c:\JCapper\Exe folder.
2. Rename the file by changing the file extension from “.txt” (without the quotes) to “.bat” (again without the quotes.)
3. Create a new desktop shortcut naming the .BAT file (in step 2 above) as the target to be run by the new shortcut.
That’s it!
From there, provided you have a current version of JCapper, you can get new chart files for the current month simply by double clicking your shortcut (as opposed to manually performing the same steps in the HDW File Mgr.)
Of course, you’ll still want to pick up corrected charts (once per week or so) by performing the steps listed in the How to Download Corrected Chart Data section (above.)
-jp
.
|
Copyright © 2020 JCapper Software
http://www.JCapper.com
|
|