Does/will this work on mac?
Forum > Goal Line Blitz 2 > Script for Match Analysis - Feedback
kaiijy
offline
offline
Originally posted by ki11erkiwi
Does/will this work on mac?
I'm building it on a Mac, so you can be sure of it (:
If you have no clue on how to run a Python script, I recommend CodeRunner at the App Store.
Does/will this work on mac?
I'm building it on a Mac, so you can be sure of it (:
If you have no clue on how to run a Python script, I recommend CodeRunner at the App Store.
ki11erkiwi
offline
offline
Originally posted by kaiijy
I'm building it on a Mac, so you can be sure of it (:
If you have no clue on how to run a Python script, I recommend CodeRunner at the App Store.
Oh awesome! Your a legend mate
im becoming an OC next season so will help with any info I can
I'm building it on a Mac, so you can be sure of it (:
If you have no clue on how to run a Python script, I recommend CodeRunner at the App Store.
Oh awesome! Your a legend mate
im becoming an OC next season so will help with any info I cankaiijy
offline
offline
So, guys, you can get the first version here:
https://gist.github.com/philgruneich/2cd7af31bd666c9bc7d5
Just replace the game_id and hit Run (:
You can also customize what the system considers as Very Short/Short/Medium and Long, just as in the tactics.
Next? Well, sort the output properly is the next step, then convert it to a class, which will ease the next major step, which is allowing you to analyze more than a single match and mess with the results afterwards. Also, improve the damn speed since it takes 2500 ms for each run.
https://gist.github.com/philgruneich/2cd7af31bd666c9bc7d5
Just replace the game_id and hit Run (:
You can also customize what the system considers as Very Short/Short/Medium and Long, just as in the tactics.
Next? Well, sort the output properly is the next step, then convert it to a class, which will ease the next major step, which is allowing you to analyze more than a single match and mess with the results afterwards. Also, improve the damn speed since it takes 2500 ms for each run.
Rob.
offline
offline
How do I make this work? Sorry, but I don't have any experience with this type of stuff on this game. Do I need a program?
Xavori
offline
offline
Originally posted by kaiijy
So, guys, you can get the first version here:
https://gist.github.com/philgruneich/2cd7af31bd666c9bc7d5
Just replace the game_id and hit Run (:
You can also customize what the system considers as Very Short/Short/Medium and Long, just as in the tactics.
Next? Well, sort the output properly is the next step, then convert it to a class, which will ease the next major step, which is allowing you to analyze more than a single match and mess with the results afterwards. Also, improve the damn speed since it takes 2500 ms for each run.
Okay. It's awesomesauce.
Originally posted by rob4121983
How do I make this work? Sorry, but I don't have any experience with this type of stuff on this game. Do I need a program?
First, go get Python.
https://www.python.org/
Then you'll prolly want PiP (makes the next 2 steps easier)
https://pip.pypa.io/en/latest/installing.html
Then you'll need two add to file libraries for Python that kaiijy used: (I'm assuming windows here)
-Go to your c:\Python34/Scripts directory from the command prompt (cd:\Python34\Scripts)
-type "pip install requests"
-type "pip install BeautifulSoup4"
Then follow the link kaiijy gave us, copy the script of the text into a text file named "ultimate_glb2.py" and put that in your Python34 directory. Edit the game ID that kiijy very nicely commented to the game you want to scout.
From the command prompt type
cd:\Python34 (in case you aren't there already)
ultimate_grb2.py (and wait patiently)
It'll then spit out all the stuff we've asked for for the game ID you put in.
So, guys, you can get the first version here:
https://gist.github.com/philgruneich/2cd7af31bd666c9bc7d5
Just replace the game_id and hit Run (:
You can also customize what the system considers as Very Short/Short/Medium and Long, just as in the tactics.
Next? Well, sort the output properly is the next step, then convert it to a class, which will ease the next major step, which is allowing you to analyze more than a single match and mess with the results afterwards. Also, improve the damn speed since it takes 2500 ms for each run.
Okay. It's awesomesauce.
Originally posted by rob4121983
How do I make this work? Sorry, but I don't have any experience with this type of stuff on this game. Do I need a program?
First, go get Python.
https://www.python.org/
Then you'll prolly want PiP (makes the next 2 steps easier)
https://pip.pypa.io/en/latest/installing.html
Then you'll need two add to file libraries for Python that kaiijy used: (I'm assuming windows here)
-Go to your c:\Python34/Scripts directory from the command prompt (cd:\Python34\Scripts)
-type "pip install requests"
-type "pip install BeautifulSoup4"
Then follow the link kaiijy gave us, copy the script of the text into a text file named "ultimate_glb2.py" and put that in your Python34 directory. Edit the game ID that kiijy very nicely commented to the game you want to scout.
From the command prompt type
cd:\Python34 (in case you aren't there already)
ultimate_grb2.py (and wait patiently)
It'll then spit out all the stuff we've asked for for the game ID you put in.
Edited by Xavori on May 7, 2014 01:23:22
Edited by Xavori on May 7, 2014 01:22:50
flynn
offline
offline
you should talk to Thunderoo
he has made a script that pulls most of this info in a different format
you could expand on his thing and use his outputs as info for your script if it works out
though his script is for pc so it may be that you guys have made similar scripts for different systems
he has made a script that pulls most of this info in a different format
you could expand on his thing and use his outputs as info for your script if it works out
though his script is for pc so it may be that you guys have made similar scripts for different systems
Originally posted by kaiijy
That's how I do it right now, that data I posted earlier is already done, in 2 different scripts. I want to integrate both and make it as easier as possible so anyone can use it without much Python knowledge (insert game ID and you're good to go).
If someone else wants to know what Stobie is talking about, open any replay and add /1 to the URL, like this: http://glb2.warriorgeneral.com/game/replay/53990/3350979/1
Something else to think about is if you don't need all the movement information is to use this version of JSON. Took my parsing times from 40-50 seconds down to 3-5 seconds.
http://glb2.warriorgeneral.com/game/game/54546/json?type=pbp
basically it is all the plays in the game at a high level attributes. Also uses playerID's instead of names so you don't have conflicting JSON escapes to code for. Time remaning is a divide by 60 as it is seconds. It won't give you defensive team id, but you can derive that from the inverse of the offense team id once you know the game your in.
3405818: {
quarter: "1",
defense_play: "5",
score: "0",
description: "K {12668} kicked off 53 yards to KR {19668} for a 39 yard return, out of bounds.",
offense: "291",
time_remaining: "900",
los: "OPP 30",
to_go: "10",
down: "0",
offense_play: "6"
},
That's how I do it right now, that data I posted earlier is already done, in 2 different scripts. I want to integrate both and make it as easier as possible so anyone can use it without much Python knowledge (insert game ID and you're good to go).
If someone else wants to know what Stobie is talking about, open any replay and add /1 to the URL, like this: http://glb2.warriorgeneral.com/game/replay/53990/3350979/1
Something else to think about is if you don't need all the movement information is to use this version of JSON. Took my parsing times from 40-50 seconds down to 3-5 seconds.
http://glb2.warriorgeneral.com/game/game/54546/json?type=pbp
basically it is all the plays in the game at a high level attributes. Also uses playerID's instead of names so you don't have conflicting JSON escapes to code for. Time remaning is a divide by 60 as it is seconds. It won't give you defensive team id, but you can derive that from the inverse of the offense team id once you know the game your in.
3405818: {
quarter: "1",
defense_play: "5",
score: "0",
description: "K {12668} kicked off 53 yards to KR {19668} for a 39 yard return, out of bounds.",
offense: "291",
time_remaining: "900",
los: "OPP 30",
to_go: "10",
down: "0",
offense_play: "6"
},
Rob.
offline
offline
Originally posted by Xavori
First, go get Python.
https://www.python.org/
Then you'll prolly want PiP (makes the next 2 steps easier)
https://pip.pypa.io/en/latest/installing.html
Then you'll need two add to file libraries for Python that kaiijy used: (I'm assuming windows here)
-Go to your c:\Python34/Scripts directory from the command prompt (cd:\Python34\Scripts)
-type "pip install requests"
-type "pip install BeautifulSoup4"
Then follow the link kaiijy gave us, copy the script of the text into a text file named "ultimate_glb2.py" and put that in your Python34 directory. Edit the game ID that kiijy very nicely commented to the game you want to scout.
From the command prompt type
cd:\Python34 (in case you aren't there already)
ultimate_grb2.py (and wait patiently)
It'll then spit out all the stuff we've asked for for the game ID you put in.
Thanks for the detailed instructions. I got it working. This is awesome!
First, go get Python.
https://www.python.org/
Then you'll prolly want PiP (makes the next 2 steps easier)
https://pip.pypa.io/en/latest/installing.html
Then you'll need two add to file libraries for Python that kaiijy used: (I'm assuming windows here)
-Go to your c:\Python34/Scripts directory from the command prompt (cd:\Python34\Scripts)
-type "pip install requests"
-type "pip install BeautifulSoup4"
Then follow the link kaiijy gave us, copy the script of the text into a text file named "ultimate_glb2.py" and put that in your Python34 directory. Edit the game ID that kiijy very nicely commented to the game you want to scout.
From the command prompt type
cd:\Python34 (in case you aren't there already)
ultimate_grb2.py (and wait patiently)
It'll then spit out all the stuff we've asked for for the game ID you put in.
Thanks for the detailed instructions. I got it working. This is awesome!
kaiijy
offline
offline
Originally posted by Stobie
Something else to think about is if you don't need all the movement information is to use this version of JSON. Took my parsing times from 40-50 seconds down to 3-5 seconds.
http://glb2.warriorgeneral.com/game/game/54546/json?type=pbp
basically it is all the plays in the game at a high level attributes. Also uses playerID's instead of names so you don't have conflicting JSON escapes to code for. Time remaning is a divide by 60 as it is seconds. It won't give you defensive team id, but you can derive that from the inverse of the offense team id once you know the game your in.
3405818: {
quarter: "1",
defense_play: "5",
score: "0",
description: "K {12668} kicked off 53 yards to KR {19668} for a 39 yard return, out of bounds.",
offense: "291",
time_remaining: "900",
los: "OPP 30",
to_go: "10",
down: "0",
offense_play: "6"
},
That's just great! May I assume "offense_play" and "defense_play" correspond to the formation ID? That probably inform the number of WRs and TEs. The description is also better as I can skip decoding to latin-1, which will definitely improve the json load.
Something else to think about is if you don't need all the movement information is to use this version of JSON. Took my parsing times from 40-50 seconds down to 3-5 seconds.
http://glb2.warriorgeneral.com/game/game/54546/json?type=pbp
basically it is all the plays in the game at a high level attributes. Also uses playerID's instead of names so you don't have conflicting JSON escapes to code for. Time remaning is a divide by 60 as it is seconds. It won't give you defensive team id, but you can derive that from the inverse of the offense team id once you know the game your in.
3405818: {
quarter: "1",
defense_play: "5",
score: "0",
description: "K {12668} kicked off 53 yards to KR {19668} for a 39 yard return, out of bounds.",
offense: "291",
time_remaining: "900",
los: "OPP 30",
to_go: "10",
down: "0",
offense_play: "6"
},
That's just great! May I assume "offense_play" and "defense_play" correspond to the formation ID? That probably inform the number of WRs and TEs. The description is also better as I can skip decoding to latin-1, which will definitely improve the json load.
Xavori
offline
offline
One little tweak that'd make the output easier to read is putting things in ascending play distance order instead of alphabetical, ie. very short, short, medium, long, very long.
Originally posted by kaiijy
That's just great! May I assume "offense_play" and "defense_play" correspond to the formation ID? That probably inform the number of WRs and TEs. The description is also better as I can skip decoding to latin-1, which will definitely improve the json load.
Those are the play ID's that you can then decipher using both of offense and defense json pages which for the life of me can't remember how to get to.
That's just great! May I assume "offense_play" and "defense_play" correspond to the formation ID? That probably inform the number of WRs and TEs. The description is also better as I can skip decoding to latin-1, which will definitely improve the json load.
Those are the play ID's that you can then decipher using both of offense and defense json pages which for the life of me can't remember how to get to.
ki11erkiwi
offline
offline
Originally posted by Xavori
First, go get Python.
https://www.python.org/
Then you'll prolly want PiP (makes the next 2 steps easier)
https://pip.pypa.io/en/latest/installing.html
Then you'll need two add to file libraries for Python that kaiijy used: (I'm assuming windows here)
-Go to your c:\Python34/Scripts directory from the command prompt (cd:\Python34\Scripts)
-type "pip install requests"
-type "pip install BeautifulSoup4"
Then follow the link kaiijy gave us, copy the script of the text into a text file named "ultimate_glb2.py" and put that in your Python34 directory. Edit the game ID that kiijy very nicely commented to the game you want to scout.
From the command prompt type
cd:\Python34 (in case you aren't there already)
ultimate_grb2.py (and wait patiently)
It'll then spit out all the stuff we've asked for for the game ID you put in.
Ok soo... im on a mac and have downloaded python3.4 and pip, ran get-pip.py but now im stuck. Dont think I have python34\scripts tells me command doesn't exsit.. and when I try the pip install requests or beautifulsoup it says invalid syntax..
Where am I goimg wrong? Thanks in advance
First, go get Python.
https://www.python.org/
Then you'll prolly want PiP (makes the next 2 steps easier)
https://pip.pypa.io/en/latest/installing.html
Then you'll need two add to file libraries for Python that kaiijy used: (I'm assuming windows here)
-Go to your c:\Python34/Scripts directory from the command prompt (cd:\Python34\Scripts)
-type "pip install requests"
-type "pip install BeautifulSoup4"
Then follow the link kaiijy gave us, copy the script of the text into a text file named "ultimate_glb2.py" and put that in your Python34 directory. Edit the game ID that kiijy very nicely commented to the game you want to scout.
From the command prompt type
cd:\Python34 (in case you aren't there already)
ultimate_grb2.py (and wait patiently)
It'll then spit out all the stuff we've asked for for the game ID you put in.
Ok soo... im on a mac and have downloaded python3.4 and pip, ran get-pip.py but now im stuck. Dont think I have python34\scripts tells me command doesn't exsit.. and when I try the pip install requests or beautifulsoup it says invalid syntax..
Where am I goimg wrong? Thanks in advance
kaiijy
offline
offline
Originally posted by ki11erkiwi
Ok soo... im on a mac and have downloaded python3.4 and pip, ran get-pip.py but now im stuck. Dont think I have python34\scripts tells me command doesn't exsit.. and when I try the pip install requests or beautifulsoup it says invalid syntax..
Where am I goimg wrong? Thanks in advance
Python 3 usually comes with pip pre-installed. Try using pip3 instead
pip3 install requests
for example (:
After installing Python, you'll get a folder in your Applications, you can run the script through IDLE, I believe.
Ok soo... im on a mac and have downloaded python3.4 and pip, ran get-pip.py but now im stuck. Dont think I have python34\scripts tells me command doesn't exsit.. and when I try the pip install requests or beautifulsoup it says invalid syntax..
Where am I goimg wrong? Thanks in advance
Python 3 usually comes with pip pre-installed. Try using pip3 instead
pip3 install requests
for example (:
After installing Python, you'll get a folder in your Applications, you can run the script through IDLE, I believe.
You are not logged in. Please log in if you want to post a reply.





























