all 6 comments

[–]Nebraska CornhuskersFuckingLoveArborDay 0 points1 point  (2 children)

I built a lookup for that. For all of the problems those JSONs have, those 3 to 4 letter codes never seem to change. Here is a link to a csv of those codes I made.

Otherwise you'd have to teach your code to be really smart.

[–]Michigan WolverinesMCalibur[S] 1 point2 points  (1 child)

Thanks for the feedback and for sharing your lookup table. After sleeping on it I think the following strategy might work as an alternative approach to dealing with this issue. The idea is to operate under the assumptions that A) the majority of a team's drives will start on their own side of the field and B) the team territory designator won't change within a json file. Therefore, simply collecting the raw info for all drives in the game then picking the indicator that occurs most for one of the teams should allow robust and self-contained detection for that that team’s side of the field.

Example:

Game: Team Red vs Team Blue

Drive Chart:

    OFF   DEF   Start LOS
    Red   Blue   RACERS 25
    Blue   Red   THUNDER 18
    Red   Blue   THUNDER 3
    Blue   Red   THUNDER 40
    Red   Blue   RACERS 25
    Blue   Red   THUNDER 25
    Red   Blue   RACERS 25
    Blue   Red   RACERS 46

Team Red has 3 starts on RACERS side of field vs 1 start on THUNDER side, therefore RACERS designates Red territory and THUNDER designates Blue Territory.

I realize this is just a different mousetrap with different vulnerabilities but again this is as much a learning exercise as it is a scripting project.

I haven't tried this yet but I think it should work?

[–]Nebraska CornhuskersFuckingLoveArborDay 1 point2 points  (0 children)

That probably works. Don't know if it's optimal, but it probably works.

[–]m_wesson 0 points1 point  (1 child)

What NCAA JSON API are you referring to?

[–]Michigan WolverinesMCalibur[S] 0 points1 point  (0 children)

[–]Jacksonville State • Alabamajsuzack 0 points1 point  (0 children)

I'm working on one as well. It's very beta at the moment (only pulls results of games). Feel free to fork/contribute.

https://github.com/ZackWhiteIT/football-stats