myLeagues testing thread

Discussion in 'AFL' started by walesy, Apr 19, 2016.

  1. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    [Just moving this to it's own thread so it doesn't flood jp's with error reports. :D]

    I hate to be that guys, but I've been working on this for a little bit now.

    Go to MyTeams

    Click this button: upload_2016-4-19_18-14-14.png
    Give it a minute :D

    Then click this button: upload_2016-4-19_18-14-30.png
    Give it another minute :D

    Enjoy (and sorry jp!!!! :D)

    Still needs plenty of testing. :D So feel free to report any bugs
     
    Last edited: Apr 20, 2016
    • Like Like x 4
  2. Owen

    Owen Well-Known Member

    Joined:
    Jan 3, 2016
    Messages:
    432
    Likes Received:
    285
    Well that pretty much does what my big ass spreadsheet does, and soooo much quicker. There are some errors though, some teams in my league have negative cash.

    Ideas on how to add value (perhaps not actually adding value, but ideas anyway):

    - add in a compare teams button where it shows unique players between yours and a team your select
    - add in a comma separator on the cash field, or perhaps right justify so it's easier to look down the list
     
    • Like Like x 1
  3. jp

    jp Active Member

    Joined:
    Jan 3, 2016
    Messages:
    123
    Likes Received:
    52
    Great minds... :thumbsu:
     
    • Like Like x 3
  4. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    Definitely not better! I can see a bunch of folk who seem to have missed an odd week.

    Couldn't tell though before the front end was put together.

    Gunna need to tweak the data to correct gaps, then let next weeks run finish the job.

    How long does yours take to run? Mine takes bloody days! But it should be able to grab stuff ad hocly as people use it.

    Untested . Fingers crossed.
     
  5. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    Definitely will be adding a compare function!
     
    • Like Like x 1
  6. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    (also an id search, for beat the best style articles)
     
    • Like Like x 2
  7. jp

    jp Active Member

    Joined:
    Jan 3, 2016
    Messages:
    123
    Likes Received:
    52
    My first try was going to take 10 days :)

    So I learned about threading and it was down to about 6 hours when I was running it from my PC. But now I have some server space and on there it is down to about ~3 hours maybe less. Although it never gets everyone first try, there are always a few that won't load or have errors. I usually run the script a couple time, luckily it's a lot quicker after the first run.
     
    • Like Like x 2
  8. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    Sounds pretty similar :D 10 days, 5 threads. :D
     
  9. TheTassieHawk

    TheTassieHawk SC fanatic Staff Member

    Joined:
    Jan 3, 2016
    Messages:
    7,604
    Likes Received:
    6,586
    @walesy - solid effort mate, here are a few of the bugs I found in my 5 leagues which you may or may not know about through your testing

    Error 1 - reporting no trades left

    example Tommys Titans T: 0 C: $488700 (TeamId=17237) - per below should be 26 trades left

    2 Daniel MENZELOUT: $260600
    2 Oscar McDonaldOUT: $155400
    2 Jordan de GoeyIN: $318400
    2 Michael HartleyIN: $117300
    4 Brad CrouchOUT: $306100
    4 George HewettOUT: $163800

    (Edit - also seems to be missing IN Ruggles $XXXXX and Aaron Young $YYYYY)

    ---------------------------
    Error 2 - reporting negative cash


    example Lightning Bolt T: 26 C: $-16700 (TeamId=64)


    3 Tom RockliffOUT: $550,100
    3 Michael BARLOWOUT: $471,100
    3 Jason JohannisenIN: -$452,400
    3 Tom PapleyIN: -$196,100 [$372,700]
    4 Brad CrouchOUT: $306,100
    4 George HewettOUT: $163,800
    4 Dayne ZorkoIN: -$568,000
    4 Zac MerrettIN: -$530,000 [-$628,100]
    [-$255,400]
    This would suggest starting cash of $238,700 and cash after Rd3 of $611,400 if the above $$$ and Rounds are correct

    ---------------------------
    Error 3 - reporting more than 2 trades in a single week


    example CHARLIE'S ANKLES T: -2 C: $154800 (TeamId=11550) - per below should be 24 trades left

    26 players OUT in Round 2 AND BACK IN for Round 3
    2 Aaron Hall OUT: $428100 3 Aaron Hall IN: $488100
    2 Anthony McDonald-Tipungwuti OUT: $102400 3 Anthony McDonald-Tipungwuti IN: $166600
    2 Callum Mills OUT: $211800 3 Callum Mills IN: $243000
    2 Connor Menadue OUT: $155400 3 Connor Menadue IN: $192000
    2 Daniel Wells OUT: $243900 3 Daniel Wells IN: $317700
    2 Gary Ablett OUT: $623200 3 Gary Ablett IN: $635500
    2 George Hewett OUT: $123900 3 George Hewett IN: $163800
    2 Heath Shaw OUT: $607800 3 Heath Shaw IN: $578000
    2 Jacob Weitering OUT: $220800 3 Jacob Weitering IN: $289100
    2 Jade Gresham OUT: $144300 3 Jade Gresham IN: $144300
    2 Kade Kolodjashnij OUT: $482200 3 Kade Kolodjashnij IN: $482200
    2 Luke DAHLHAUS OUT: $563600 3 Luke DAHLHAUS IN: $566900
    2 Marcus Adams OUT: $117300 3 Marcus Adams IN: $226000
    2 Matt Priddis OUT: $611200 3 Matt Priddis IN: $609200
    2 Matthew DEA OUT: $183600 3 Matthew DEA IN: $243500
    2 Max GAWN OUT: $550800 3 Max GAWN IN: $563300
    2 Mitch W. BROWN OUT: $117300 3 Mitch W. BROWN IN: $154100
    2 Oliver Wines OUT: $525100 3 Oliver Wines IN: $511900
    2 Patrick Dangerfield OUT: $647000 3 Patrick Dangerfield IN: $657900
    2 Ryan Davis OUT: $102400 3 Ryan Davis IN: $151500
    2 Sam Gray OUT: $480800 3 Sam Gray IN: $459200
    2 Sam GRIMLEY OUT: $123900 3 Sam GRIMLEY IN: $123900
    2 Sam Kerridge OUT: $137600 3 Sam Kerridge IN: $215700
    2 Trent MCKENZIE OUT: $306600 3 Trent MCKENZIE IN: $291900
    2 Wayne Milera OUT: $175800 3 Wayne Milera IN: $201800
    2 Zachary SMITH OUT: $425300 3 Zachary SMITH IN: $423500

    4 players out in Round 2 and 4 player In in round 3 ??
    2 Jack Steele OUT: $312200
    2 Jared POLEC OUT: $303000
    2 Jeremy MCGOVERN OUT: $429500 (Out Round 3 per JP's report)
    2 Michael BARLOW OUT: $505300 (Out Round 3 per JP's report)
    3 Chad Wingard IN: $527800 (In Round 2 per JP's report)
    3 Jason Johannisen IN: $452400
    3 Tom Papley IN: $196100 (In Round 2 per JP's report)
    3 Zac Merrett IN: $505400

    Round 4 seems OK
    4 Trent MCKENZIE OUT: $291900
    4 George Hewett OUT: $163800
    4 Tom Ruggles IN: $102400
    4 Aaron YOUNG IN: $299600

    ---------------------------
    Error 4 - reporting (517846) League 6 times (I am only in 5 leagues)


    WALESYleagues.png
     
    • Like Like x 1
  10. Owen

    Owen Well-Known Member

    Joined:
    Jan 3, 2016
    Messages:
    432
    Likes Received:
    285
    So I imagine the script works by starting at team ID 1 and then copying each teams player and price for that round. Then comparing them to the previous week to work out who was traded and cash made/lost. Do you collect any other information on the teams, i.e. round score, ladder position, etc.?
     
  11. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    Cheers mate!

    1 - I'm hoping get recalced properly in the next round rollover.

    2 is strange.

    The trades look right, but I've got a starting salary of 9,931,300

    Heath Shaw 607800
    Daniel Rich 436100
    Jesse Lonergan 345300
    Paul SEEDSMAN 324700
    Jacob Weitering 220800
    Matthew DEA 183600
    Marcus Adams 117300
    Mitch W. BROWN 117300

    Patrick Dangerfield 647000
    Gary Ablett 623200
    Joel Selwood 565500
    *Tom Rockliff 550100
    Patrick Cripps 519600
    Tom LIBERATORE 357300
    *Brad Crouch 306100
    Callum Mills 211800
    Jade Gresham 144300
    *George Hewett 123900
    Ryan Davis 102400

    Todd Goldstein 695100
    Max GAWN 550800
    Darrean Wyatt 102400

    *Michael BARLOW 505300
    Aaron Hall 428100
    Jordan de Goey 318400
    Daniel Wells 243900
    Ben Kennedy 187800
    Connor Menadue 155400
    Sam Kerridge 137600
    Anthony McDonald-Tipungwuti 102400

    But that would make him a wizard. Is that @thokash's team? Or @bgt2110? Too many Bretts :D Get in here and illuminate this wizardry! :D

    3- That one is a fail. I need to run through the data and clean them up, however any trades made in that round will be lost :(

    The 4 trades out in 2, and 4 in 3 are the trades that happened, but no way of knowing which round each happened- so the cash might be off if I roll the dice wrong. :D

    4- yeah, thought something like that would happen, I'll sort out something for it.

    Cheers mate!
     
  12. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    Nah, just the players for that week. Then it plugs into TS to get the rest of the data.

    Wanted to grab the Benched Players and Captain, so that we could extrapolate the entire season, and identify lost points- but ran out of time on the first week.

    Likely to go into next years upgrades.
     
  13. TheTassieHawk

    TheTassieHawk SC fanatic Staff Member

    Joined:
    Jan 3, 2016
    Messages:
    7,604
    Likes Received:
    6,586
    apart from using JP's fine website to check - note I have updated my post with the "correct" info !!!!!!!!!!!!!!!
     
  14. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    That is some good thinking. <3 @jp
     
  15. TheTassieHawk

    TheTassieHawk SC fanatic Staff Member

    Joined:
    Jan 3, 2016
    Messages:
    7,604
    Likes Received:
    6,586
    is the salary cap a flat $10M this year or is it $10.17M ??
    if so this is what I am calculating per the current trades $$ figures assuming $10M to start
    68700 $68,700 (starting cash)
    3 Tom RockliffOUT: $550,100
    3 Michael BARLOWOUT: $471,100 **
    3 Jason JohannisenIN: -$452,400 **
    3 Tom PapleyIN: -$196,100 ** $372,700 $441,400 (Rd3 cash)

    4 Brad CrouchOUT: $306,100
    4 George HewettOUT: $163,800
    4 Dayne ZorkoIN: -$568,000 **
    4 Zac MerrettIN: -$530,000 ** -$628,100 -$186,700 (closing cash)

    So it does not seem to be getting the correct cash figure (Out by $170K??)

    ** = error in price - ie grabbing the price after the end of the round not before it - as the others which are correct did not play in Round 3 or 4 when they were traded out I think this is causing the main issue !!

    recalcing for correct prices (again assuming a $10M salary cap)
    68700 $68,700
    3 Tom RockliffOUT: $550,100
    3 Michael BARLOWOUT: $505,300 **
    3 Jason JohannisenIN: -$418,200 **
    3 Tom PapleyIN: -$109,900 ** $527,300 $596,000 (revised Rd3 cash)

    4 Brad CrouchOUT: $306,100
    4 George HewettOUT: $163,800
    4 Dayne ZorkoIN: -$543,000
    4 Zac MerrettIN: -$477,400 -$550,500 $45,500 (revised closing cash)
     
    • Like Like x 1
  16. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    Nice, he's in the first league I was testing with, so hopefully a recalc will fix him
     
  17. Owen

    Owen Well-Known Member

    Joined:
    Jan 3, 2016
    Messages:
    432
    Likes Received:
    285
    I'd imagine you'd be coding like crazy in the first week of the season to adjust to the changes that are made every year so that you can grab the information in time?
     
  18. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    Yeah, first week was a bit of a mess this year cause of the new site. :D
     
    • Like Like x 1
  19. walesy

    walesy Administrator Staff Member

    Joined:
    Nov 30, 2015
    Messages:
    3,872
    Likes Received:
    2,564
    Also, as a bit of a hack, you can put and uid into the url when you are looking at a team, to look at their trades.

    uTeamId=135 for mine. :D

    Definitely have the $$ calculating on the post-round-price though!.
     
  20. jp

    jp Active Member

    Joined:
    Jan 3, 2016
    Messages:
    123
    Likes Received:
    52
    Let me know if you want a big dump of data.

    My wife gave birth during the opening game round 1.. . I very nearly put the project off till next year :)
     

Share This Page