OZmium Sports Betting and Horse Racing Forums

OZmium Sports Betting and Horse Racing Forums (http://forums.ozmium.com.au/index.php)
-   General Topics (http://forums.ozmium.com.au/forumdisplay.php?f=59)
-   -   Betfair API data (http://forums.ozmium.com.au/showthread.php?t=32112)

thorns 1st July 2020 07:45 AM

Betfair API data
 
Asking a bit of a favour or guidance. I have just downloaded this years horse racing historical data via betfair and it comes as a *.tar file.

Is there a simple way to convert this to open in excel?

walkermac 1st July 2020 10:48 AM

A .tar file is a compressed archive of multiple individual files. You can use something like the free program 7Zip to extract it. The Betfair .tar file is composed of .bz2 files, which are themselves compressed, so they'll have to be extracted once again to get the base JSON file. *phew*!

There's a bit more info here: https://betfair-datascientists.gith...storicDataSite/.

There are JSON to CSV converters to subsequently get the data into Excel.

Another option that may suit your purposes is this tool from Betfair, which seems to automate the process: https://github.com/betfair/historic-data-workbook

*NB - this is theory from me, haven't done it myself.

thorns 3rd July 2020 07:52 AM

thanks, managed to extract it all, seems like there is a lot of data still missing though when I get it into excel so will need to go back through it seems, not sure if I need to run some script to piece everything back together once extracted.

chook 11th July 2020 01:26 PM

from pureinfotech.com::
While you can use a number of third-party applications like 7-Zip and PeaZip, sometimes these applications don’t play well with files created on another platform, and they’re slow to uncompressed a large number of files. However, Windows 10 includes native support for tar that you can use with Command Prompt to extract these files. Also, you can even use the Windows Subsystem for Linux (WSL) that brings native support for Ubuntu, Fedora, and SUSE, and therefore you can also access many Linux tools, including tar to quickly extract content from tarballs.

windows has native tar
mm unix
tar -xf filename.tar

start .. command prompt .. run as admin


Open Start.

Search for Command Prompt, right-click the first result and select the Run as administrator option.

Type the following command to use tar to extract the files and press Enter:

tar -xvzf C:\PATH\TO\FILE\FILE-NAME.tar.gz -C C:\PATH\TO\FOLDER\EXTRACTION

hope that does it for you

UselessBettor 12th July 2020 08:10 AM

thorns,

The betfair historical data isn't going to be very useful unless you are looking at trading and trying to plot the distribution of prices.

It could be useful to get some historical data to line up with other data you have as well but that isn't great unless you are just using the BSP prices.

How are you intending to use the data?


All times are GMT +10. The time now is 06:50 AM.

Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.