]> git.sesse.net Git - pkanalytics/commitdiff
Include was d-ed in a common per-point receiver error stat.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Jul 2023 12:29:26 +0000 (14:29 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Jul 2023 12:29:26 +0000 (14:29 +0200)
ultimate.js

index 0100f6a3b59ed2f1fdda858c5c4ee8efa16be388..56ee933671c3c8dc361f919ffba2e5eddbfa5d11 100644 (file)
@@ -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');