In-Play Tennis stats to Guardian using a script and API. Script and example baf

User avatar
mcgoo
Posts: 898
Joined: Thu Jul 18, 2013 12:30 pm

Hi Sniffer

Thank you for this .Fun to have a play around. Was wondering if I wanted to add 'Max Games in a row' and 'Total points won', as examples, to the stats obtained; How would I go about this.Sorry my scripting coding ability is wanting :D
sniffer66
Posts: 1688
Joined: Thu May 02, 2019 8:37 am

mcgoo wrote:
Sat Jun 04, 2022 5:21 am
Hi Sniffer

Thank you for this .Fun to have a play around. Was wondering if I wanted to add 'Max Games in a row' and 'Total points won', as examples, to the stats obtained; How would I go about this.Sorry my scripting coding ability is wanting :D
No problem, glad it's useful.
I'm just back from a 4 day music festival, but will try and put an overview post up and walk you through adding in additional, available stats, when my head has recovered :D

With the script framework as it is, it's possible to get data for any sport in the SS API so might be helpful to a few others to be able to add their own sports\stats in
User avatar
mcgoo
Posts: 898
Joined: Thu Jul 18, 2013 12:30 pm

sniffer66 wrote:
Sun Jun 05, 2022 4:17 pm
mcgoo wrote:
Sat Jun 04, 2022 5:21 am
Hi Sniffer

Thank you for this .Fun to have a play around. Was wondering if I wanted to add 'Max Games in a row' and 'Total points won', as examples, to the stats obtained; How would I go about this.Sorry my scripting coding ability is wanting :D
No problem, glad it's useful.
I'm just back from a 4 day music festival, but will try and put an overview post up and walk you through adding in additional, available stats, when my head has recovered :D

With the script framework as it is, it's possible to get data for any sport in the SS API so might be helpful to a few others to be able to add their own sports\stats in
Thanks sniffer. That will be great. Hope the head recovers ok... :D
sniffer66
Posts: 1688
Joined: Thu May 02, 2019 8:37 am

mcgoo wrote:
Sun Jun 05, 2022 11:26 pm
sniffer66 wrote:
Sun Jun 05, 2022 4:17 pm
mcgoo wrote:
Sat Jun 04, 2022 5:21 am
Hi Sniffer

Thank you for this .Fun to have a play around. Was wondering if I wanted to add 'Max Games in a row' and 'Total points won', as examples, to the stats obtained; How would I go about this.Sorry my scripting coding ability is wanting :D
No problem, glad it's useful.
I'm just back from a 4 day music festival, but will try and put an overview post up and walk you through adding in additional, available stats, when my head has recovered :D

With the script framework as it is, it's possible to get data for any sport in the SS API so might be helpful to a few others to be able to add their own sports\stats in
Thanks sniffer. That will be great. Hope the head recovers ok... :D
Hi McGoo

Unfortunately no time so far to write a tutorial but I have managed to add those 2 stats to the script.

Also, I've added in 1st and 2nd serve rating from here:

https://www.atptour.com/en/news/infosys ... rve-rating

Seems a very good way to compare serve so going to look at it. It doesn't mention 2nd serve but logically it should rate that as well so have added it

New script file is on this link :

https://drive.google.com/file/d/1sSc0-r ... sp=sharing

Let me know how that works for you

Cheers
Stu


Code: Select all

12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: IP1stServeIn% = 89
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: IP1stServePointsWon% = 72
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: IP2ndServeIn% = 50
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: IP2ndServePointsWon% = 25
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: IPOppReceivePointsWon = 12
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: IPBPAgainst = 4
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: BPSaved% = 75
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: 1stServeRating = 64.08
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: 2ndServeRating = 12.5
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: HomeTotalPointsWon = 34
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Andy Murray: HomeMaxGamesRow = 1
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: IP1stServeIn% = 94
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: IP1stServePointsWon% = 72
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: IP2ndServeIn% = 50
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: IP2ndServePointsWon% = 50
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: IPOppReceivePointsWon = 10
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: IPBPAgainst = 4
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: BPSaved% = 100
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: 1stServeRating = 64.08
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: 2ndServeRating = 25
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: AwayTotalPointsWon = 36
12/06/2022 15:07:26: [G_Auto 2] :  Store Value for Matteo Berrettini: AwayMaxGamesRow = 3
User avatar
mcgoo
Posts: 898
Joined: Thu Jul 18, 2013 12:30 pm

Thanks very much Stu. I'll give it a whirl. Much appreciated mate
Dr Ginhog
Posts: 260
Joined: Wed Nov 03, 2010 12:10 am
Location: Ballygarvan,Cork Ireland T12D2VR
Contact:

Hi STU,
Excellent work.
I cant wait for the Cricket version.
User avatar
MemphisFlash
Posts: 2202
Joined: Fri May 16, 2014 10:12 pm
Location: Leicester

i'm off to my 4 day music festival on thursday.
The Rockabilly Rave at Camber Sands
sniffer66
Posts: 1688
Joined: Thu May 02, 2019 8:37 am

MemphisFlash wrote:
Mon Jun 13, 2022 3:06 pm
i'm off to my 4 day music festival on thursday.
The Rockabilly Rave at Camber Sands

Enjoy mate
sniffer66
Posts: 1688
Joined: Thu May 02, 2019 8:37 am

If anyone is using these, a nice way to represent serve data over time is to save the three 1st\2nd serve values to History Lists (which also makes them available to automation), then plot as a line in an Advanced Chart. I find this a much easier way to assess the trend than trying to look back through the numbers.

Red: Serve% in
Green: % Points won
Blue: Serve Rating

Capture.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 22795
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

sniffer66 wrote:
Tue Jun 14, 2022 10:42 am
If anyone is using these, a nice way to represent serve data over time is to save the three 1st\2nd serve values to History Lists (which also makes them available to automation), then plot as a line in an Advanced Chart. I find this a much easier way to assess the trend than trying to look back through the numbers.

Red: Serve% in
Green: % Points won
Blue: Serve Rating


Capture.JPG
Now that is very cool, thanks again for taking the time to share this :D


Image Image
sniffer66
Posts: 1688
Joined: Thu May 02, 2019 8:37 am

Dallas wrote:
Tue Jun 14, 2022 10:59 am
sniffer66 wrote:
Tue Jun 14, 2022 10:42 am
If anyone is using these, a nice way to represent serve data over time is to save the three 1st\2nd serve values to History Lists (which also makes them available to automation), then plot as a line in an Advanced Chart. I find this a much easier way to assess the trend than trying to look back through the numbers.

Red: Serve% in
Green: % Points won
Blue: Serve Rating


Capture.JPG
Now that is very cool, thanks again for taking the time to share this :D


Image Image
Cheers Dallas. Interesting watching the graphs as the match plays out. Errani (who couldn't serve an afternoon tea) was being rescued by her 2nd serve. but can see that now nosedive on the graph, and her 1st is consistently dire, has just been broken back in the 3rd. You could almost see it coming.
sniffer66
Posts: 1688
Joined: Thu May 02, 2019 8:37 am

Then again Brengle isn't doing any better. Coin toss lol
sniffer66
Posts: 1688
Joined: Thu May 02, 2019 8:37 am

This is better now, using market History Lists so each chart is P1 (red) vs P2 (Blue). Easier to see the comparison at a glance

Shame we can't put a title\key on each chart though.


Capture.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
AndyIsHere
Posts: 43
Joined: Thu Feb 11, 2021 8:07 pm

Hey Mate,

Is there a post on how to set this up?

Is it possible to just pull this data into an excel file and not feed it back to bet angel?

I want to use the data to plot graphs using power query/power pivot in real time, I prefer the graphs in excel

cheers
sniffer66
Posts: 1688
Joined: Thu May 02, 2019 8:37 am

AndyIsHere wrote:
Fri Jun 17, 2022 12:43 am
Hey Mate,

Is there a post on how to set this up?

Is it possible to just pull this data into an excel file and not feed it back to bet angel?

I want to use the data to plot graphs using power query/power pivot in real time, I prefer the graphs in excel

cheers
The first post in the thread links to my footy version with full setup instructions. If you just want the data could you not just import the csv that's output into Excel ? That csv contains the player, SV Name and value in sequence across each row so should be straightforward. You'll need to refresh it quickly though as it updates every 15 seconds.
The aim of this was to get the live stat data into BA as SV values for automation. I only did the graphs as a bells n whistles visual aid. I like to have everything in one app on a single screen
Post Reply

Return to “Bet Angel Automation - Tennis”