feat: add sample size

This commit is contained in:
julius 2025-03-03 09:40:16 +01:00
parent de79970987
commit 9d65c1d1df
Signed by: julius
GPG Key ID: C80A63E6A5FD7092
3 changed files with 10 additions and 4 deletions

View File

@ -214,7 +214,12 @@ def mvp():
for i, p in enumerate(r.mvps):
ranks[p] = ranks.get(p, []) + [i + 1]
return [
{"name": p, "rank": f"{np.mean(v):.02f}", "std": f"{np.std(v):.02f}"}
{
"name": p,
"rank": f"{np.mean(v):.02f}",
"std": f"{np.std(v):.02f}",
"n": len(v),
}
for p, v in ranks.items()
]

View File

@ -83,8 +83,9 @@ const RaceChart: FC<RaceChartProps> = ({ players, std }) => {
fontWeight={"bold"}
strokeWidth={4}
paintOrder={"stroke fill"}
style={{ whiteSpace: "pre" }}
>
{`${player.rank} ± ${player.std}`}
{`${player.rank} ± ${player.std} N = ${player.n}`}
</text>
</g>
))}

View File

@ -2,7 +2,7 @@ export interface Edge {
from: string;
to: string;
color: string;
relation: "likes" | "dislikes"
relation: "likes" | "dislikes";
}
export interface Node {
id: string;
@ -16,5 +16,5 @@ export interface PlayerRanking {
name: string;
rank: number;
std: number;
n: number;
}