HighlanderRobotics / Scouting-Server

1 stars 1 forks source link

Team lookup detail functions are missing information #9

Closed MangoSwirl closed 1 year ago

MangoSwirl commented 1 year ago

Team lookup detail functions such as cargoAccuracy, cargoCount, and defenseQuantity are missing the following information in their response:

cargoAccuracy and cargoCount are missing...

Current behavior

Example for GET /API/analysis/cargoAccuracy?team=4499

[
  {
    "result": 0.8620689655172413,
    "team": "4499"
  }
]

Desired behavior

Example for GET /API/analysis/cargoAccuracy?team=4499

[
  {
    "result": {
      "value": 0.8620689655172413,
      "tournamentAverage": 0.9354278157482648,
      "difference": -0.0733588502,
      "field": {
        "hub": 1,
        "tarmac": 0.8958396449387205,
        "field": 0.719576360914587,
        "launchpad": 0.688761267985609,
        "fieldEnd": 0.3483859810482642
      }
    },
    "team": "4499"
  }
]
MangoSwirl commented 1 year ago

From Cassie on Discord:

i just saw the issue u put on github, but it might not be made till a bit later because i am in tahoe and have limited time to work. In the future please detail everything you want me to do more speecificy. I did all the things in the picture but that seems like it wasn't all you were asking

MangoSwirl commented 1 year ago

From Cassie on Discord:

also @MangoSwirl not sure what this means Value's average overall teams at the tournament and this Difference between value and value's average overall teams

MangoSwirl commented 1 year ago

From Collin on Discord (replying to "i just saw the issue u put on github..."):

The issue was referring to the team detail endpoints, detail functions such as cargoAccuracy, cargoCount, and defenseQuantity not overview. I did put it in the document. Since we're not using the same endpoint paths I originally requested, I had to do a bit more guesswork about which of your functions corresponds to which endpoint. I originally thought that cargoAccuracy, cargoCount, and defenseQuantity corresponded to the team detail functions, but I'm now realizing you might have been planning to make separate functions such as detailedCargoAccuracy or detailedDefenseQuantity. That would also be easier on my part because overview is directly linked to them, and I don't need the detailed info in overview. I apologize if this wasn't clear. I think most of this could have been avoided if I made sure Barry had seen the document and if he discussed with the scouting team before making changes.

MangoSwirl commented 1 year ago

From Collin on Discord (replying to "also @MangoSwirl not sure what this means..."):

Value's average over all teams at the tournament means the specified value's average between all teams at the tournament, not just the specified one.

(Difference between value and value's average over all teams) = (value for specified team) - (Value's average over all teams at the tournament)

MangoSwirl commented 1 year ago

I've updated the original comment with a list of tasks to make it easier to track.

MangoSwirl commented 1 year ago

We don't need to do this for Rapid React anymore.