From: Steinar H. Gunderson Date: Thu, 20 Jul 2023 12:29:26 +0000 (+0200) Subject: Include was d-ed in a common per-point receiver error stat. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=4eb264e84fab1ed40e26ae04b8cbe4680f9d4ade;p=pkanalytics Include was d-ed in a common per-point receiver error stat. --- diff --git a/ultimate.js b/ultimate.js index 0100f6a..56ee933 100644 --- a/ultimate.js +++ b/ultimate.js @@ -947,7 +947,7 @@ function make_table_per_point(players) { add_th(header, 'Hockey assists'); add_th(header, 'Ds'); add_th(header, 'Throwaways'); - add_th(header, 'Drops'); + add_th(header, 'Recv. errors'); add_th(header, 'Touches'); rows.push(header); } @@ -957,7 +957,7 @@ function make_table_per_point(players) { let hockey_assists = 0; let defenses = 0; let throwaways = 0; - let drops = 0; + let receiver_errors = 0; let touches = 0; for (const [q,p] of Object.entries(players)) { if (q === 'globals') continue; @@ -978,7 +978,7 @@ function make_table_per_point(players) { add_3cell_ci(row, ci_hockey_assists); add_3cell_ci(row, make_poisson_ci(p.defenses, p.points_played, z)); add_3cell_ci(row, make_poisson_ci(p.throwaways, p.points_played, z, true)); - add_3cell_ci(row, make_poisson_ci(p.drops, p.points_played, z, true)); + add_3cell_ci(row, make_poisson_ci(p.drops + p.was_ds, p.points_played, z, true)); if (p.points_played > 0) { add_3cell(row, p.touches == 0 ? 0 : (p.touches / p.points_played).toFixed(2)); } else { @@ -991,7 +991,7 @@ function make_table_per_point(players) { hockey_assists += p.hockey_assists; defenses += p.defenses; throwaways += p.throwaways; - drops += p.drops; + receiver_errors += p.drops + p.was_ds; touches += p.touches; } @@ -1005,7 +1005,7 @@ function make_table_per_point(players) { add_3cell_with_filler_ci(row, hockey_assists == 0 ? 0 : (hockey_assists / globals.points_played).toFixed(2)); add_3cell_with_filler_ci(row, defenses == 0 ? 0 : (defenses / globals.points_played).toFixed(2)); add_3cell_with_filler_ci(row, throwaways == 0 ? 0 : (throwaways / globals.points_played).toFixed(2)); - add_3cell_with_filler_ci(row, drops == 0 ? 0 : (drops / globals.points_played).toFixed(2)); + add_3cell_with_filler_ci(row, receiver_errors == 0 ? 0 : (receiver_errors / globals.points_played).toFixed(2)); add_3cell(row, touches == 0 ? 0 : (touches / globals.points_played).toFixed(2)); } else { add_3cell_with_filler_ci(row, 'N/A');