feat: add sample size
This commit is contained in:
		@@ -214,7 +214,12 @@ def mvp():
 | 
				
			|||||||
            for i, p in enumerate(r.mvps):
 | 
					            for i, p in enumerate(r.mvps):
 | 
				
			||||||
                ranks[p] = ranks.get(p, []) + [i + 1]
 | 
					                ranks[p] = ranks.get(p, []) + [i + 1]
 | 
				
			||||||
    return [
 | 
					    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()
 | 
					        for p, v in ranks.items()
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -83,8 +83,9 @@ const RaceChart: FC<RaceChartProps> = ({ players, std }) => {
 | 
				
			|||||||
            fontWeight={"bold"}
 | 
					            fontWeight={"bold"}
 | 
				
			||||||
            strokeWidth={4}
 | 
					            strokeWidth={4}
 | 
				
			||||||
            paintOrder={"stroke fill"}
 | 
					            paintOrder={"stroke fill"}
 | 
				
			||||||
 | 
					            style={{ whiteSpace: "pre" }}
 | 
				
			||||||
          >
 | 
					          >
 | 
				
			||||||
            {`${player.rank} ± ${player.std}`}
 | 
					            {`${player.rank} ± ${player.std}     N = ${player.n}`}
 | 
				
			||||||
          </text>
 | 
					          </text>
 | 
				
			||||||
        </g>
 | 
					        </g>
 | 
				
			||||||
      ))}
 | 
					      ))}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@ export interface Edge {
 | 
				
			|||||||
  from: string;
 | 
					  from: string;
 | 
				
			||||||
  to: string;
 | 
					  to: string;
 | 
				
			||||||
  color: string;
 | 
					  color: string;
 | 
				
			||||||
  relation: "likes" | "dislikes"
 | 
					  relation: "likes" | "dislikes";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
export interface Node {
 | 
					export interface Node {
 | 
				
			||||||
  id: string;
 | 
					  id: string;
 | 
				
			||||||
@@ -16,5 +16,5 @@ export interface PlayerRanking {
 | 
				
			|||||||
  name: string;
 | 
					  name: string;
 | 
				
			||||||
  rank: number;
 | 
					  rank: number;
 | 
				
			||||||
  std: number;
 | 
					  std: number;
 | 
				
			||||||
 | 
					  n: number;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user