足球联赛关键球员数据统计(足球联赛核心球员数据盘点)

2026-01-14

Considering sandbox mode

optio

I need to think about sandbox mode because we haven't discussed it yet. I'll assume a default setup with workspace-write, network-enabled, and approvals on failure. For now, I won't run any commands since it’s just a conceptual ask. I could propose a Python script that analyzes a CSV of match events to calculate key player stats like goals, assists, and expected contributions. I should mention that I can't rely on external packages requiring network access, but I can use pandas if it's installed. I'll provide a code skeleton and a sample CSV format.Proposing KPIs by Position

I’m thinking about proposing a full list of key performance indicators (KPIs) based on player positions.

For attackers, I might include goals, assists, expected goals (xG), expected assists (xA), shots, shots on target (SOT), and more. Midfielders could have key passes, xA, and defensive actions among their metrics. Defenders might use tackles, interceptions, and blocks for their KPIs, while goalkeepers can focus on saves and distribution stats.

Since the user is brief, I should ask specific questions and offer a template instead of heavy formatting. It’s all about providing a straightforward plan and options!Proposing match stats analysis

I’m thinking of proposing that if the user has a match-by-match player stat CSV, we could compute metrics per 90 minutes, including "clutch" contributions, like goals and assists in tight games.

The term "关键球员" translates to "key players," while "关键球" means "key passes." I might define "关键贡献" as weighted contributions based on match states or opponent strength and provide a formula. I’ll offer a Python pandas notebook snippet to read event data and output top player rankings. I could also ask about the league, season, data format, and whether they want code or a report.Generating a concise response

I want to create a concise response that includes asking four questions. I’ll provide a ready-to-run minimal pandas script to aggregate per-player stats from a matches.csv file. This will compute a "key contribution score" as follows: goals * 0.7 + assists * 0.5 + xG * 0.4 + xA * 0.3 + key_passes * 0.2, all weighted by match state.

I’ll explain the weights and note that they can be edited. The output will print the top 20 players and save a CSV. I need to stick to bullets and keep it concise!Crafting player stats analysis

I'm planning to produce a concise response titled "关键球员统计."

inter

First, I’ll ask some questions to gather necessary information, like the league, season, and data format.

Next, I’ll offer a quick plan that includes a Python script for processing player stats from events.csv with specific columns needed for calculations. I would outline loading data, computing per-90 metrics, and ranking players, with options for event-level or match-level datasets.

I'll also provide an SQL query option for those using a database and suggest a small Python skeleton.

The "Key Player Score" formula will account for various contributions, and I'll list default KPIs per position. Lastly, I’ll ask if the user wants the script generated in their repo, offering to provide a sample CSV template as well!

你是想做一份“联赛里的关键球员统计/排行”。我可以直接给你一套可跑的统计脚本,也可以先帮你定指标口径。先确认几个点,以便一次到位:

shots

  • 哪个联赛/赛季?是否只看联赛还是含杯赛/欧战?
  • 你有现成数据吗?事件级数据(每次射门/传球)还是比赛级汇总(每人每场)?文件格式/列名如何?
  • 想要的输出:排行榜表格、每队Top N、按位置拆分、还是一个综合“关键球员评分”?
  • 有无偏好技术栈(Python/pandas、SQL),以及是否需要每90分钟标准化和对手强度调整?

如果你先要一个可用的“关键球员评分”范式,下面给出一个稳妥的口径与脚本示例(比赛级数据即可):

关键指标建议(按位置会自动有差异,统一输出且支持筛选)

  • 进攻:非点球进球、助攻、xG、xA、关键传球、每90射门/射正、禁区触球
  • 推进/组织:推进传球、推进带球、进入三区/禁区的传球
  • 防守:抢断、拦截、对抗(空战/地面对抗)胜率、解围、封堵
  • 稳定化处理:每90分钟标准化;去除极低出场(如<270分钟);可选对手强度加权

综合评分口径(可调权重)

quot

  • 先把若干核心每90指标做z-score标准化,再线性加权求和,避免单位不一致。
  • 默认权重示例(更偏重进攻端,用于“关键球员”识别;防守球员可切片单看防守评分):
    • goals_npxG_z: 0.35(非点球进球与npxG的综合,防过拟合随机性)
    • assists_xA_z: 0.25(助攻与xA)
    • key_passes_z: 0.15
    • prog_passes_carries_z: 0.15(推进传+带)
    • defensive_actions_z: 0.10(抢断+拦截合成)
  • 可选“关键时刻加权”(若有事件级或比分状态列):在平局/落后一球时的进球/助攻给予更高权重。

Python 示例(pandas,比赛级输入)

  • 输入 CSV 示例列(最少需要):player, team, minutes, goals, pens_scored, xG, assists, xA, key_passes, shots, shots_on_target, progressive_passes, progressive_carries, tackles, interceptions
  • 同一球员可多行(每场一行),脚本会聚合并做每90与评分
# file: analyze_key_players.py
# 用比赛级汇总数据生成每球员每90指标与综合关键球员评分

import pandas as pd
from pathlib import Path

# 可调参数
MIN_MINUTES = 270  # 至少3场90分钟
WEIGHTS = {
    "goals_npxG_z": 0.35,
    "assists_xA_z": 0.25,
    "key_passes_z": 0.15,
    "prog_passes_carries_z": 0.15,
    "defensive_actions_z": 0.10,
}

def safe_z(s: pd.Series) -> pd.Series:
    # 对全零或方差极小的列做保护,避免除零
    if s.std(ddof=0) < 1e-9:
        return pd.Series(0.0, index=s.index)
    return (s - s.mean()) / s.std(ddof=0)

def main(input_csv="players_matches.csv", out_csv="out/player_key_stats.csv", out_top=20):
    df = pd.read_csv(input_csv)

    # 缺失列填0,方便聚合
    cols = [
        "goals","pens_scored","xG","assists","xA","key_passes",
        "shots","shots_on_target","progressive_passes","progressive_carries",
        "tackles","interceptions","minutes","player","team"
    ]
    for c in cols:
        if c not in df.columns:
            df[c] = 0

    # 聚合到球员赛季层面
    g = df.groupby(["player","team"], as_index=False).agg({
        "minutes":"sum",
        "goals":"sum",
        "pens_scored":"sum",
        "xG":"sum",
        "assists":"sum",
        "xA":"sum",
        "key_passes":"sum",
        "shots":"sum",
        "shots_on_target":"sum",
        "progressive_passes":"sum",
        "progressive_carries":"sum",
        "tackles":"sum",
        "interceptions":"sum",
    })

    # 过滤低出场
    g = g[g["minutes"] >= MIN_MINUTES].copy()
    if g.empty:
        raise SystemExit("No players meet the minutes threshold. Lower MIN_MINUTES or check data.")

    mp90 = g["minutes"] / 90.0

    # 基础派生
    g["non_pen_goals"] = g["goals"] - g["pens_scored"]
    g["def_actions"] = g["tackles"] + g["interceptions"]
    g["prog_total"] = g["progressive_passes"] + g["progressive_carries"]

    # 每90
    per90_cols = {
        "npg90": g["non_pen_goals"] / mp90,
        "xG90": g["xG"] / mp90,
        "ast90": g["assists"] / mp90,
        "xA90": g["xA"] / mp90,
        "kp90": g["key_passes"] / mp90,
        "sh90": g["shots"] / mp90,
        "sot90": g["shots_on_target"] / mp90,
        "prog90": g["prog_total"] / mp90,
        "def90": g["def_actions"] / mp90,
        "mins": g["minutes"],  # 保留原始出场时间
    }
    out = g[["player","team"]].copy()
    for k, v in per90_cols.items():
        out[k] = v

    # 组合指标与z分数
    out["goals_npxG90"] = (out["npg90"] + out["xG90"]) / 2.0
    out["assists_xA90"] = (out["ast90"] + out["xA90"]) / 2.0

    out["goals_npxG_z"] = safe_z(out["goals_npxG90"])
    out["assists_xA_z"] = safe_z(out["assists_xA90"])
    out["key_passes_z"] = safe_z(out["kp90"])
    out["prog_passes_carries_z"] = safe_z(out["prog90"])
    out["defensive_actions_z"] = safe_z(out["def90"])

    # 综合关键球员评分(线性加权的z分数)
    out["key_player_score"] = sum(out[k] * w for k, w in WEIGHTS.items())

    # 排名与导出
    out = out.sort_values("key_player_score", ascending=False)
    Path(out_csv).parent.mkdir(parents=True, exist_ok=True)
    out.to_csv(out_csv, index=False)

    # 预览Top N
    preview_cols = [
        "player","team","mins","npg90","ast90","xG90","xA90",
        "kp90","prog90","def90","key_player_score"
    ]
    print(out[preview_cols].head(out_top).to_string(index=False))

if __name__ == "__main__":
    # python analyze_key_players.py  # 默认读取 players_matches.csv
    main()

如何准备输入数据

  • CSV 文件名(默认):players_matches.csv
  • 最少列:player, team, minutes, goals, pens_scored, xG, assists, xA, key_passes, shots, shots_on_target, progressive_passes, progressive_carries, tackles, interceptions
  • 一行代表一名球员的一场比赛;脚本会自动按球员聚合

想进一步提升准确度,可以加上:

  • 对手强度:为每场提供对手Elo/排名,按强队给更高权重
  • 比分状态/事件级:有事件级数据时,对平局/落后一球时的进球/助攻给予额外系数
  • 位置分组:分别输出前锋/中场/后卫的榜单与不同权重

需要我把这套脚本和一个CSV模板文件放到你的仓库里并跑一遍吗?如果你贴一小段你的数据样例(前几行),我可以按你的列名定制脚本与指标/权重。

服务热线

0311-7109800

© Copyright 2024 九游首页 - 九游(9Y)中国官方网站 - JIUYOU All Rights by 九游

地址:青海省海南藏族自治州兴海县曲什安镇
电话:0311-7109800