{
  "$id": "/stats/player",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Contains player-specific stats over the whole game.",
  "properties": {
    "average_shot_quality": {
      "$ref": "/types/quality_score",
      "description": "The average quality score of all shots taken by the player.",
      "title": "Quality Score"
    },
    "average_x_coverage_percentage": {
      "$ref": "/types/percentage",
      "description": "The average percentage of court width coverage assigned to the player during rallies, based on their positioning relative to their partner. It's only relevant in doubles; not included for singles games.",
      "title": "Percentage"
    },
    "backhands": {
      "$ref": "/stats/shot",
      "description": "Stats about backhands. Omitted if the player did not hit any backhands.",
      "title": "Shot Stats"
    },
    "ball_directions": {
      "additionalProperties": false,
      "description": "Categorizes ball directions across a player's shots (9 total).",
      "properties": {
        "down_the_line_left_count": {
          "$ref": "/types/count",
          "description": "A shot played from the left straight down the left sideline.",
          "title": "Count"
        },
        "down_the_line_right_count": {
          "$ref": "/types/count",
          "description": "A shot played from the right straight down the right sideline.",
          "title": "Count"
        },
        "down_the_middle_count": {
          "$ref": "/types/count",
          "description": "A shot played from the middle straight down the middle of the court.",
          "title": "Count"
        },
        "left_cross_right_count": {
          "$ref": "/types/count",
          "description": "A shot played from the left side of the court that crosses over to the right side.",
          "title": "Count"
        },
        "left_to_middle_count": {
          "$ref": "/types/count",
          "description": "A shot played from the left side of the court towards the middle.",
          "title": "Count"
        },
        "mid_cross_left_count": {
          "$ref": "/types/count",
          "description": "A shot played from the middle of the court that crosses over to the left side.",
          "title": "Count"
        },
        "mid_cross_right_count": {
          "$ref": "/types/count",
          "description": "A shot played from the middle of the court that crosses over to the right side.",
          "title": "Count"
        },
        "right_cross_left_count": {
          "$ref": "/types/count",
          "description": "A shot played from the right side of the court that crosses over to the left side.",
          "title": "Count"
        },
        "right_to_middle_count": {
          "$ref": "/types/count",
          "description": "A shot played from the right side of the court towards the middle.",
          "title": "Count"
        }
      },
      "required": [
        "mid_cross_left_count",
        "mid_cross_right_count",
        "down_the_middle_count",
        "left_to_middle_count",
        "left_cross_right_count",
        "down_the_line_left_count",
        "right_to_middle_count",
        "right_cross_left_count",
        "down_the_line_right_count"
      ],
      "title": "Ball Directions",
      "type": "object"
    },
    "dinks": {
      "$ref": "/stats/shot",
      "description": "Stats about dink. Omitted if the player did not hit any dink.",
      "title": "Shot Stats"
    },
    "drives": {
      "$ref": "/stats/shot",
      "description": "Stats about drives. Omitted if the player did not hit any drives.",
      "title": "Shot Stats"
    },
    "drops": {
      "$ref": "/stats/shot",
      "description": "Stats about drops. Omitted if the player did not hit any drops.",
      "title": "Shot Stats"
    },
    "fifths": {
      "$ref": "/stats/shot",
      "description": "Stats about fifths. Omitted if the player did not hit any fifths.",
      "title": "Shot Stats"
    },
    "final_shot_count": {
      "$ref": "/types/count",
      "description": "The total number of final shots by the player.",
      "title": "Count"
    },
    "forehands": {
      "$ref": "/stats/shot",
      "description": "Stats about forehands. Omitted if the player did not hit any forehands.",
      "title": "Shot Stats"
    },
    "fourths": {
      "$ref": "/stats/shot",
      "description": "Stats about fourths. Omitted if the player did not hit any fourths.",
      "title": "Shot Stats"
    },
    "ground_stroke_count": {
      "$ref": "/types/count",
      "description": "The total number of ground strokes by the player.",
      "title": "Count"
    },
    "kitchen_area": {
      "$ref": "/stats/shot",
      "description": "Stats about shots from the kitchen or near the kitchen area. Omitted if the player did not hit any shots from the kitchen or near the kitchen area.",
      "title": "Shot Stats"
    },
    "kitchen_arrival_percentage": {
      "additionalProperties": false,
      "description": "Counts of fair kitchen-arrival opportunities (denominator) and successful arrivals (numerator), broken down by serving/returning roles for the player and their partner.",
      "properties": {
        "returning": {
          "additionalProperties": false,
          "properties": {
            "oneself": {
              "additionalProperties": false,
              "properties": {
                "denominator": {
                  "$ref": "/types/count",
                  "description": "Number of rallies where the player had a fair opportunity to arrive within a few feet of the kitchen when on the returning team, as the returner (requires at least 3 non-fault shots).",
                  "title": "Count"
                },
                "numerator": {
                  "$ref": "/types/count",
                  "description": "Number of rallies where the player successfully arrived within a few feet of the kitchen when on the returning team, as the returner (requires at least 3 non-fault shots).",
                  "title": "Count"
                }
              },
              "required": [
                "numerator",
                "denominator"
              ],
              "type": "object"
            },
            "partner": {
              "additionalProperties": false,
              "properties": {
                "denominator": {
                  "$ref": "/types/count",
                  "description": "Number of rallies where the player had a fair opportunity to arrive within a few feet of the kitchen when on the returning team, as the partner of the returner (requires at least 3 non-fault shots).",
                  "title": "Count"
                },
                "numerator": {
                  "$ref": "/types/count",
                  "description": "Number of rallies where the player successfully arrived within a few feet of the kitchen when on the returning team, as the partner of the returner (requires at least 3 non-fault shots).",
                  "title": "Count"
                }
              },
              "required": [
                "numerator",
                "denominator"
              ],
              "type": "object"
            }
          },
          "required": [
            "oneself",
            "partner"
          ],
          "type": "object"
        },
        "serving": {
          "additionalProperties": false,
          "properties": {
            "oneself": {
              "additionalProperties": false,
              "properties": {
                "denominator": {
                  "$ref": "/types/count",
                  "description": "Number of rallies where the player had a fair opportunity to arrive within a few feet of the kitchen when on the serving team, as the server (requires at least 4 non-fault shots).",
                  "title": "Count"
                },
                "numerator": {
                  "$ref": "/types/count",
                  "description": "Number of rallies where the player successfully arrived within a few feet of the kitchen when on the serving team, as the server (requires at least 4 non-fault shots).",
                  "title": "Count"
                }
              },
              "required": [
                "numerator",
                "denominator"
              ],
              "type": "object"
            },
            "partner": {
              "additionalProperties": false,
              "properties": {
                "denominator": {
                  "$ref": "/types/count",
                  "description": "Number of rallies where the player had a fair opportunity to arrive within a few feet of the kitchen when on the serving team, as the partner of the server (requires at least 4 non-fault shots).",
                  "title": "Count"
                },
                "numerator": {
                  "$ref": "/types/count",
                  "description": "Number of rallies where the player successfully arrived within a few feet of the kitchen when on the serving team, as the partner of the server (requires at least 4 non-fault shots).",
                  "title": "Count"
                }
              },
              "required": [
                "numerator",
                "denominator"
              ],
              "type": "object"
            }
          },
          "required": [
            "oneself",
            "partner"
          ],
          "type": "object"
        }
      },
      "required": [
        "serving",
        "returning"
      ],
      "title": "Kitchen Arrival Opportunity Stats",
      "type": "object"
    },
    "left_side_player": {
      "$ref": "/stats/shot",
      "description": "Stats about shots as the left-side player. Omitted if the player did not hit any shots as the left-side player.",
      "title": "Shot Stats"
    },
    "lobs": {
      "$ref": "/stats/shot",
      "description": "Stats about lobs. Omitted if the player did not hit any lobs.",
      "title": "Shot Stats"
    },
    "md5_full": {
      "const": "b94e549c799cb645c782cb806ae0f9c3",
      "description": "MD5 of the all aspects of this schema (including non-functional elements like documentation)"
    },
    "md5_functional": {
      "const": "a2ee9be438cb891e85da3665d6ff7f04",
      "description": "MD5 of the functional aspects of this schema"
    },
    "mid_court_area": {
      "$ref": "/stats/shot",
      "description": "Stats about shots from the mid-court area. Omitted if the player did not hit any shots from the mid-court area.",
      "title": "Shot Stats"
    },
    "near_baseline_area": {
      "$ref": "/stats/shot",
      "description": "Stats about shots from near the baseline area. Omitted if the player did not hit any shots from near the baseline area.",
      "title": "Shot Stats"
    },
    "near_left_sideline_area": {
      "$ref": "/stats/shot",
      "description": "Stats about shots taken near the left sideline. Omitted if the player did not hit any shots taken near the left sideline.",
      "title": "Shot Stats"
    },
    "near_midline_area": {
      "$ref": "/stats/shot",
      "description": "Stats about shots taken near the middle line. Omitted if the player did not hit any shots taken near the middle line.",
      "title": "Shot Stats"
    },
    "near_right_sideline_area": {
      "$ref": "/stats/shot",
      "description": "Stats about shots taken near the right sideline. Omitted if the player did not hit any shots taken near the right sideline.",
      "title": "Shot Stats"
    },
    "net_fault_percentage": {
      "$ref": "/types/percentage",
      "description": "The percentage of shots that hit the net out of the total attempts.",
      "title": "Percentage"
    },
    "net_impact_score": {
      "$ref": "/types/quality_score",
      "description": "The net impact score is a measure of the player's overall impact on the game's outcome.",
      "title": "Quality Score"
    },
    "out_fault_percentage": {
      "$ref": "/types/percentage",
      "description": "The percentage of shots hit out of the total attempts.",
      "title": "Percentage"
    },
    "passing": {
      "$ref": "/stats/shot",
      "description": "Stats about passing shots. Omitted if the player did not hit any passing shots.",
      "title": "Shot Stats"
    },
    "poaches": {
      "$ref": "/stats/shot",
      "description": "Stats about poaches. Omitted if the player did not hit any poaches.",
      "title": "Shot Stats"
    },
    "resets": {
      "$ref": "/stats/shot",
      "description": "Stats about resets. Omitted if the player did not hit any resets.",
      "title": "Shot Stats"
    },
    "returns": {
      "$ref": "/stats/shot",
      "description": "Stats about returns. Omitted if the player did not hit any returns.",
      "title": "Shot Stats"
    },
    "right_side_player": {
      "$ref": "/stats/shot",
      "description": "Stats about shots as the right-side player. Omitted if the player did not hit any shots as the right-side player.",
      "title": "Shot Stats"
    },
    "role_stats": {
      "$ref": "/insights/role_data",
      "description": "data about this player in each serving and receiving role",
      "title": "Role Data"
    },
    "serves": {
      "$ref": "/stats/shot",
      "description": "Stats about serves. Omitted if the player did not hit any serves.",
      "title": "Shot Stats"
    },
    "shot_count": {
      "$ref": "/types/count",
      "description": "The total number of shots by the player.",
      "title": "Count"
    },
    "smashes": {
      "$ref": "/stats/shot",
      "description": "Stats about smash shots. Omitted if the player did not hit any smash shots.",
      "title": "Shot Stats"
    },
    "speedups": {
      "$ref": "/stats/shot",
      "description": "Stats about speedups. Omitted if the player did not hit any speedups.",
      "title": "Shot Stats"
    },
    "team": {
      "description": "The team to which the player belongs.",
      "maximum": 1,
      "minimum": 0,
      "type": "integer"
    },
    "team_fifths_percentage": {
      "$ref": "/types/percentage",
      "description": "The number of 5th shots taken by the player as a percentage of the total 5th shots taken by the team.",
      "title": "Percentage"
    },
    "team_fourths_percentage": {
      "$ref": "/types/percentage",
      "description": "The number of 4th shots taken by the player as a percentage of the total 4th shots taken by the team. An indicator of 3rd shot targeting.",
      "title": "Percentage"
    },
    "team_kitchen_arrival": {
      "additionalProperties": false,
      "description": "Counts of rallies where both teammates had a fair opportunity to arrive at the kitchen (denominator) and both successfully arrived (numerator), broken down by serving/returning roles. Both players on the same team share identical values.",
      "properties": {
        "returning": {
          "additionalProperties": false,
          "properties": {
            "denominator": {
              "$ref": "/types/count",
              "description": "Number of rallies where both teammates had a fair opportunity to arrive at the kitchen when on the returning team (requires at least 3 non-fault shots).",
              "title": "Count"
            },
            "numerator": {
              "$ref": "/types/count",
              "description": "Number of rallies where both teammates arrived at the kitchen when on the returning team (requires at least 3 non-fault shots and both players having a fair opportunity).",
              "title": "Count"
            }
          },
          "required": [
            "numerator",
            "denominator"
          ],
          "type": "object"
        },
        "serving": {
          "additionalProperties": false,
          "properties": {
            "denominator": {
              "$ref": "/types/count",
              "description": "Number of rallies where both teammates had a fair opportunity to arrive at the kitchen when on the serving team (requires at least 4 non-fault shots).",
              "title": "Count"
            },
            "numerator": {
              "$ref": "/types/count",
              "description": "Number of rallies where both teammates arrived at the kitchen when on the serving team (requires at least 4 non-fault shots and both players having a fair opportunity).",
              "title": "Count"
            }
          },
          "required": [
            "numerator",
            "denominator"
          ],
          "type": "object"
        }
      },
      "required": [
        "serving",
        "returning"
      ],
      "title": "Team Kitchen Arrival Stats",
      "type": "object"
    },
    "team_left_side_percentage": {
      "$ref": "/types/percentage",
      "description": "The percentage of time when this player was to the left of their partner.",
      "title": "Percentage"
    },
    "team_long_length_rallies_won": {
      "$ref": "/types/percentage",
      "description": "Percent of rallies won by this player's team when the rally is 11 or more shots long. Rallies whose winner could not be determined are excluded; absent when no such rally had a determined winner.",
      "title": "Percentage"
    },
    "team_medium_length_rallies_won": {
      "$ref": "/types/percentage",
      "description": "Percent of rallies won by this player's team when the rally is [6,10] shots long. Rallies whose winner could not be determined are excluded; absent when no such rally had a determined winner.",
      "title": "Percentage"
    },
    "team_short_length_rallies_won": {
      "$ref": "/types/percentage",
      "description": "Percent of rallies won by this player's team when the rally is [1,5] shots long. Rallies whose winner could not be determined are excluded; absent when no such rally had a determined winner.",
      "title": "Percentage"
    },
    "team_shot_percentage": {
      "$ref": "/types/percentage",
      "description": "The percentage of total team shots taken by the player.",
      "title": "Percentage"
    },
    "team_thirds_percentage": {
      "$ref": "/types/percentage",
      "description": "The number of 3rd shots taken by the player as a percentage of the total 3rd shots taken by the team.",
      "title": "Percentage"
    },
    "third_drives": {
      "$ref": "/stats/shot",
      "description": "Stats about third shot drives. Omitted if the player did not hit any third shot drives.",
      "title": "Shot Stats"
    },
    "third_drops": {
      "$ref": "/stats/shot",
      "description": "Stats about third shot drops. Omitted if the player did not hit any third shot drops.",
      "title": "Shot Stats"
    },
    "third_lobs": {
      "$ref": "/stats/shot",
      "description": "Stats about third shot lobs. Omitted if the player did not hit any third shot lobs.",
      "title": "Shot Stats"
    },
    "thirds": {
      "$ref": "/stats/shot",
      "description": "Stats about thirds. Omitted if the player did not hit any thirds.",
      "title": "Shot Stats"
    },
    "total_distance_covered": {
      "description": "The number of feet each player travels between shots in all rallies combined.",
      "type": "number"
    },
    "volley_count": {
      "$ref": "/types/count",
      "description": "The total number of volleys by the player.",
      "title": "Count"
    }
  },
  "required": [
    "team",
    "shot_count",
    "final_shot_count",
    "volley_count",
    "ground_stroke_count",
    "net_impact_score",
    "average_shot_quality",
    "out_fault_percentage",
    "net_fault_percentage",
    "role_stats",
    "kitchen_arrival_percentage",
    "team_kitchen_arrival",
    "ball_directions",
    "total_distance_covered",
    "team_shot_percentage",
    "team_left_side_percentage",
    "team_thirds_percentage",
    "team_fourths_percentage",
    "team_fifths_percentage"
  ],
  "title": "Player Stats",
  "type": "object"
}