From f1087f96e44e99b0f0768546869423d7daaa3445 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 9 Oct 2022 20:59:33 -0600 Subject: [PATCH 01/17] CLRG Scoring Analysis pre-draft --- .../2021-12-23-drwho-S01E27-mexico/index.md | 9 +- content/blog/2022-09-06-truck-bling/index.md | 5 +- .../2022-10-09-CLRG-Scoring/awardPoints.mjs | 122 ++++++++++++ .../blog/2022-10-09-CLRG-Scoring/chart.png | Bin 0 -> 13438 bytes content/blog/2022-10-09-CLRG-Scoring/index.md | 175 ++++++++++++++++++ .../2022-10-09-CLRG-Scoring/scorecard.mjs | 54 ++++++ .../2022-10-09-CLRG-Scoring/speculator.mjs | 104 +++++++++++ content/blog/2022-10-09-CLRG-Scoring/toys.css | 36 ++++ layouts/_default/baseof.html | 11 +- layouts/shortcodes/figure.html | 4 + layouts/shortcodes/video.html | 4 +- run.sh | 3 + static/assets/css/default.css | 42 ++++- 13 files changed, 550 insertions(+), 19 deletions(-) create mode 100644 content/blog/2022-10-09-CLRG-Scoring/awardPoints.mjs create mode 100644 content/blog/2022-10-09-CLRG-Scoring/chart.png create mode 100644 content/blog/2022-10-09-CLRG-Scoring/index.md create mode 100644 content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs create mode 100644 content/blog/2022-10-09-CLRG-Scoring/speculator.mjs create mode 100644 content/blog/2022-10-09-CLRG-Scoring/toys.css create mode 100644 layouts/shortcodes/figure.html diff --git a/content/blog/2021-12-23-drwho-S01E27-mexico/index.md b/content/blog/2021-12-23-drwho-S01E27-mexico/index.md index 591972c..41b05e5 100644 --- a/content/blog/2021-12-23-drwho-S01E27-mexico/index.md +++ b/content/blog/2021-12-23-drwho-S01E27-mexico/index.md @@ -1,9 +1,6 @@ --- -date: "2021-12-23T00:00:00Z" -tags: -- drwho -title: 'Doctor Who S01E27-30: Doctor Who goes to Mexico' -url: blog/2021-12-23-drwho-S01E27-mexico/ +title: "Doctor Who S01E27-30: Doctor Who goes to Mexico" +date: 2021-12-23 --- A bunch of white people pretend to be Aztecs, and explore their moral @@ -42,7 +39,7 @@ Barbara abusing her god status to outlaw human sacrifice. The Doctor gets married or engaged or something. Susan finally expresses an emotion other than terror: -{{< video "susan-well-hello-there.mp4" "Well, hello there." >}} +{{< video src="susan-well-hello-there.mp4" text="Well, hello there." >}} I'm back to being uncomfortable with the cultural framing here. I mean, maybe this is useful for viewing 1960s British culture, but that's still diff --git a/content/blog/2022-09-06-truck-bling/index.md b/content/blog/2022-09-06-truck-bling/index.md index 701f5cf..38ab566 100644 --- a/content/blog/2022-09-06-truck-bling/index.md +++ b/content/blog/2022-09-06-truck-bling/index.md @@ -1,7 +1,6 @@ --- -date: "2022-09-06T12:11:00-0600" title: Truck bling -url: blog/2022-09-06-truck-bling/ +date: "2022-09-06T12:11:00-0600" --- Yesterday, @@ -18,7 +17,7 @@ the friend soldered a bunch of stuff together, and we plugged it in. It friggin' worked! -{{< video "truck-bling.m4v" "Pickup truck with color-changing ground effects">}} +{{< video src="truck-bling.m4v" text="Pickup truck with color-changing ground effects">}} The really cool part, at least for me, is that now she can hang out with her laptop in the cabin, diff --git a/content/blog/2022-10-09-CLRG-Scoring/awardPoints.mjs b/content/blog/2022-10-09-CLRG-Scoring/awardPoints.mjs new file mode 100644 index 0000000..40a3372 --- /dev/null +++ b/content/blog/2022-10-09-CLRG-Scoring/awardPoints.mjs @@ -0,0 +1,122 @@ +let awardPoints = [ + 100, // 1 + 75, // 2 + 65, // 3 + 60, // 4 + 56, // 5 + 53, // 6 + 50, // 7 + 47, // 8 + 45, // 9 + 43, // 10 + 41, // 11 + 39, // 12 + 38, // 13 + 37, // 14 + 36, // 15 + 35, // 16 + 34, // 17 + 33, // 18 + 32, // 19 + 31, // 20 + 30, // 21 + 29, // 22 + 28, // 23 + 27, // 24 + 26, // 25 + 25, // 26 + 24, // 27 + 23, // 28 + 22, // 29 + 21, // 30 + 20, // 31 + 19, // 32 + 18, // 33 + 17, // 34 + 16, // 35 + 15, // 36 + 14, // 37 + 13, // 38 + 12, // 39 + 11, // 40 + 10, // 41 + 9, // 42 + 8, // 43 + 7, // 44 + 6, // 45 + 5, // 46 + 4, // 47 + 3, // 48 + 2, // 49 + 1, // 50 + 0.75, // 51 + 0.65, // 52 + 0.60, // 53 + 0.56, // 54 + 0.53, // 55 + 0.50, // 56 + 0.47, // 57 + 0.45, // 58 + 0.43, // 59 + 0.41, // 60 + 0.39, // 61 + 0.38, // 62 + 0.37, // 63 + 0.36, // 64 + 0.35, // 65 + 0.34, // 66 + 0.33, // 67 + 0.32, // 68 + 0.31, // 69 + 0.30, // 70 + 0.29, // 71 + 0.28, // 72 + 0.27, // 73 + 0.26, // 74 + 0.25, // 75 + 0.24, // 76 + 0.23, // 77 + 0.22, // 78 + 0.21, // 79 + 0.20, // 80 + 0.19, // 81 + 0.18, // 82 + 0.17, // 83 + 0.16, // 84 + 0.15, // 85 + 0.14, // 86 + 0.13, // 87 + 0.12, // 88 + 0.11, // 89 + 0.10, // 90 + 0.09, // 91 + 0.08, // 92 + 0.07, // 93 + 0.06, // 94 + 0.05, // 95 + 0.04, // 96 + 0.03, // 97 + 0.02, // 98 + 0.01, // 99 + 0.00, // 100 +] + +function init() { + for (let tbody of document.querySelectorAll(".awardPoints tbody")) { + for (let i = 0; i < awardPoints.length; i++) { + let tr = tbody.appendChild(document.createElement("tr")) + tr.appendChild(document.createElement("td")).textContent = i + 1 + tr.appendChild(document.createElement("td")).textContent = awardPoints[i].toFixed(2) + } + } +} + +if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init) +} else { + init() +} + +export { + awardPoints, +} diff --git a/content/blog/2022-10-09-CLRG-Scoring/chart.png b/content/blog/2022-10-09-CLRG-Scoring/chart.png new file mode 100644 index 0000000000000000000000000000000000000000..c7e2714cbdea1fa56c512ad0839abfbb78d5aeb9 GIT binary patch literal 13438 zcmb_@c|4Ts`#;AgO60UyA~_vLlC8p2)=xRK;#0C^myB(Uk|kq|Q*H z-rRll)H$bfk79Gl`#qZM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io^J^882A@nQirIf0Wp4x#d#-Kj` zsGitZ&zxoXZg-t`-t>Bys=QHSvwagE^s0%dNr{%812U@8phAN z=hCi_btYpkGcPsAOk#urz7gaXmUOOlI=HB5gBG+%(>%|)Qj%+mSF2y4%B=kLeH7`Y ztR^_GKHeoB75_0r13Gt!=d!PF+)^yLA zqrdwxq|m)%zm#@BE{oZ(7kJpAt8Mg|F8bms(){n){0BQZUkLDYTQIe2kIzt3S?%SnAx(-_;J$=cZw6O3lyC88QpyX|U} zp=31?k6FyX+>u;vtXR5R1_rd0X|5NvO8gjk#NgTd2BZbzJi|rA-zcyQQdV8nlub0jRQ22b8qt{AE*_6@~a zQ1PZy0$U^1mwNk`lWftf4!qEP71QF8(j;RH08t!K!V@qfouys^w-l3(nc#tx2jVdK$_nFd75x!~cU8RAd ze_(!XJ*i)`ydzm)lVI5KYjX78fYkMvrTXCy9aZq$Zo4WVv>YaTL&wt#S{6p^{td$} zRMKYyaoZir?RXAb)CiNQBOK85<|c@G8!;iP0Chy;QAsyfl(oWwkXWQUHjNj1F~*(t z#%;BPr+1%c+X1I{w;o66QNGj^v%a$sAa5EV?lm9%h|R3%FK72M@rh{snI(8lLFHqgGm9;UDUC-f%a1lZ1V_%miP;gs3?FAAb<@|NY6$s?3os);A@tB%*-- P@tiU+{xkcy!;Sw3i3??} literal 0 HcmV?d00001 diff --git a/content/blog/2022-10-09-CLRG-Scoring/index.md b/content/blog/2022-10-09-CLRG-Scoring/index.md new file mode 100644 index 0000000..9ede31e --- /dev/null +++ b/content/blog/2022-10-09-CLRG-Scoring/index.md @@ -0,0 +1,175 @@ +--- +title: CLRG Scoring Analyzed +date: 2022-10-09 +stylesheets: + - toys.css +scripts: + - speculator.mjs + - scorecard.mjs +--- + +Let's take a look how how CLRG does its scoring! +*With math!* + +I'm going to only view this mathematically. +I know there's a lot of other stuff that goes on, like line-ups. +I'm only going to look at this with numbers. + + +## How CLRG Scoring Works + +As I am given to understand, the scoring works like so: + +1. Adjudicators give you a "raw score": a real number between 0 and 100 +2. The scoring system ranks each dancer per adjudicator, based on raw scores +3. These rankings are mapped into "award points" +4. All of a dancer's award points are summed +5. Final ranking is determined by comparing total award points + +## Raw Scoring + +The way raw scores translate into rankings and award points is a little +confusing, so I've made a little tool you can play with to get a feel for how it +works. Essentially, it's a way of normalizing places to an adjudicator: score +weights are only relative to the judge that assigns them. + +Adjudicator A can assign scores between 80 and 100; +adjudicator B can assign scores between 1 and 40; +and they'll both have a first, second, third, fourth place, etc. +These places then get translated into award points. + + +## Award Points + +Award points are handed out based on ranking against other dancers for that +adjudicator. I obtained these values from a FeisWorx results page for my kid: + +
+ + + + + + + +
RankingAward Points
+
+ +If there's a 2-way, 3-way, or n-way tie, +all tied dancers get the average of the next 2, 3, or n award points, +and the next 2, 3, or n rankings are skipped. + +### Award Points artifacts + +One quirk of awards points is that for any given overall +score, there are only a handful of possible judge rankings that could have led +to it. That means you can make some guesses about how each judge ranked an +individual dancer, based on only their total award points. + +Here's a handy calculator! +It (currently) doesn't consider the possibility of a tie. + +
+
+ CLRG Award Points Speculator +
+ Points: + +
+ + + + + + +
Possible Rankings
Computing: this could take a while!
+
+
+ + +## What's with these values? + +At first glance, the award points look like the output of an exponential function. + +{{
}} + +In an effort to figure out where these numbers came from, +I ran some curve fitting against the data. +Here's the best I could come up with: + +| Ranking range | Award Points Function | Type of function | +| --: | --: | --- | +| 1 - 11 | 100 * x^-0.358 | Exponential | +| 12 - 50 | 51 - x | Linear | +| 51 - 60 | 14.2 - 0.46x + 0.00385x | Polynomial | +| 61 - 100 | 1 - x/100 | Linear | + +If you, dear reader, are a mathematician, +I would love to hear your thoughts on why they went with this algorithm. + +There are a few points to note here: + +* 1st place is a *huge deal*. Disproportionately huge. +* Places 2-10 are similarly big deals compared to places 3-11. +* Places 12-50 operate the way most people probably assume ranking works: linearly. +* Places 51-60 are a second degree polynomial, but it doesn't matter much for so few points. +* Places 61-100 are all less than 1 point. If you're a judge trying to tank a top dancer, anywhere in this range is equivalent to anywhere else. + + +## Consequences of Exponential Award Points + +Playing around with this, +I've found a few interesting consequences +of the exponential growth in the top 11 places. + + +### 1st place is super important + +1st place is weighted so heavily that it's almost impossible to overcome without +your own 1st. + +Take for example this scenario, +in which Adjudicator 1 has promised to give 1st place to Alice: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AliceBob
Adj. 1
Adj. 2
Adj. 3
Award Points
Ranking
+ + + + diff --git a/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs b/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs new file mode 100644 index 0000000..0603bbd --- /dev/null +++ b/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs @@ -0,0 +1,54 @@ +import {awardPoints} from "./awardPoints.mjs" + +function scorecardUpdate(scorecard) { + let scores = [] + let points = [] + + let firstRow = scorecard.querySelector("tbody tr") + for (let input of firstRow.querySelectorAll("input")) { + scores.push(0) + points.push(0) + } + + for (let row of scorecard.querySelectorAll("tbody tr")) { + let i = 0 + for (let input of row.querySelectorAll("input")) { + let ranking = Number(input.value) + scores[i] += ranking + points[i] += awardPoints[ranking] + i += 1 + } + } + + { + let i = 0 + for (let out of scorecard.querySelectorAll("tfoot output[name='points']")) { + out.value = points[i] + i += 1 + } + } + + { + let i = 0 + for (let out of scorecard.querySelectorAll("tfoot output[name='ranking']")) { + out.value = scores[i] + i += 1 + } + } +} + +function init() { + for (let scorecard of document.querySelectorAll(".scorecard")) { + for (let input of scorecard.querySelectorAll("input")) { + input.addEventListener("input", () => scorecardUpdate(scorecard)) + } + scorecardUpdate(scorecard) + } +} + +if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init) +} else { + init() +} + \ No newline at end of file diff --git a/content/blog/2022-10-09-CLRG-Scoring/speculator.mjs b/content/blog/2022-10-09-CLRG-Scoring/speculator.mjs new file mode 100644 index 0000000..e9eaca1 --- /dev/null +++ b/content/blog/2022-10-09-CLRG-Scoring/speculator.mjs @@ -0,0 +1,104 @@ +import { awardPoints } from "./awardPoints.mjs" + +function arraysEqual(a, b) { + if (a === b) return true; + if (a == null || b == null) return false; + if (a.length != b.length) return false; + + for (let i = 0; i < a.length; ++i) { + if (a[i] !== b[i]) return false; + } + return true; +} +function awardPossibilities(total=0, depth=1) { + if (depth == 1) { + if (awardPoints.includes(total)) { + return [[total]] + } else { + return [] + } + } + + let possibilities = [] + for (let p of awardPoints) { + if (p <= total) { + for (let subPossibility of awardPossibilities(total - p, depth - 1)) { + let v = [p].concat(subPossibility) + v.sort((a,b) => b-a) + possibilities.push(v) + } + } + } + + possibilities.sort((a,b) => b.reduce((a,b) => a*100+b) - a.reduce((a,b) => a*100+b)) + let uniquePossibilities = [] + for (let p of possibilities) { + if (uniquePossibilities.length == 0 || !arraysEqual(p, uniquePossibilities[uniquePossibilities.length - 1])) { + uniquePossibilities.push(p) + } + } + return uniquePossibilities +} + +function speculate(calc) { + let points = calc.querySelector("[name=points]").value || 0 + let adjudicators = calc.querySelector("[name=adjudicators]").value || 3 + let results = calc.querySelector(".results tbody") + while (results.firstChild) { + results.removeChild(results.firstChild) + } + + for (let warning of calc.querySelectorAll(".warning")) { + if (adjudicators >3) { + warning.classList.add("visible") + setTimeout(() => asyncSpeculate(calc, points, adjudicators), 0) + } else { + warning.classList.remove("visible") + asyncSpeculate(calc, points, adjudicators) + } + } + +} + +async function asyncSpeculate(calc, points, adjudicators) { + let results = calc.querySelector(".results tbody") + let possibilites = awardPossibilities(points, adjudicators) + + if (possibilites.length == 0) { + let row = results.appendChild(document.createElement("tr")) + let cell = row.appendChild(document.createElement("th")) + cell.textContent = "No possible combinations" + } else { + let row = results.appendChild(document.createElement("tr")) + for (let i = 1; i <= adjudicators; ++i) { + let cell = row.appendChild(document.createElement("th")) + cell.textContent = "Adj. " + i + } + for (let possibility of possibilites) { + let row = results.appendChild(document.createElement("tr")) + for (let p of possibility) { + let cell = row.appendChild(document.createElement("td")) + cell.textContent = p + } + } + } + for (let warning of calc.querySelectorAll(".warning")) { + warning.classList.remove("visible") + } +} + +function init() { + for (let calc of document.querySelectorAll(".speculator")) { + for (let input of calc.querySelectorAll("input")) { + input.addEventListener("input", () => speculate(calc)) + } + speculate(calc) + } +} + +if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init) +} else { + init() +} + \ No newline at end of file diff --git a/content/blog/2022-10-09-CLRG-Scoring/toys.css b/content/blog/2022-10-09-CLRG-Scoring/toys.css new file mode 100644 index 0000000..8f7d521 --- /dev/null +++ b/content/blog/2022-10-09-CLRG-Scoring/toys.css @@ -0,0 +1,36 @@ +.winner { + color:cornsilk; +} + +figure img { + max-width: 100%; +} + +.warning { + color: #e64; + display: none; +} +.warning.visible { + display: initial; +} + +.awardPoints { + display: inline-block; + max-height: 60vh; + overflow-y: auto; + margin: 1em; +} +.awardPoints table { + margin: initial; +} +.awardPoints thead { + position: sticky; + top: 0; +} +.awardPoints tbody { + max-height: 60vh; + overflow-y: auto; +} +.awardPoints td { + text-align: right; +} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 196ff59..2b60966 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,13 +5,20 @@ - + {{range .AlternativeOutputFormats}} {{end}} + {{range .Params.stylesheets}} + + {{end}} {{range .Params.scripts}} - + {{end}} + {{range .Params.scripts}} + {{end}} {{range .Params.headers}} {{. | safeHTML}} diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html new file mode 100644 index 0000000..1105d69 --- /dev/null +++ b/layouts/shortcodes/figure.html @@ -0,0 +1,4 @@ +
+ {{- $img := $.Page.Resources.GetMatch (.Get "src")}} + {{.Get +
\ No newline at end of file diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html index 8d10820..551cfe5 100644 --- a/layouts/shortcodes/video.html +++ b/layouts/shortcodes/video.html @@ -1,4 +1,4 @@ diff --git a/run.sh b/run.sh index 5d78714..2e16e09 100755 --- a/run.sh +++ b/run.sh @@ -4,6 +4,9 @@ case "$(hostname)" in sweetums) baseURL=http://sweetums.lan:1313/ ;; + penguin) + baseURL=http://penguin.linux.test:1313/ + ;; *) baseURL=http://$(hostname --fqdn):1313/ ;; diff --git a/static/assets/css/default.css b/static/assets/css/default.css index 7f370d7..a889c96 100644 --- a/static/assets/css/default.css +++ b/static/assets/css/default.css @@ -19,12 +19,12 @@ body { } input { - font-family: "Lato", "Roboto", sans-serif; - font-size: 13pt; - border: 0; - outline: 0; - background: transparent; - border-bottom: 1px solid black; + font-family: inherit; + font-size: inherit; + border: thin solid #ccc; +} +input:read-only { + background-color: #eee; } .title, td.main { @@ -146,6 +146,36 @@ button.big { background: inherit; } +legend { + background-color: #e0e4cc; +} + +table { + margin: 1em; + border-collapse: collapse; +} +thead, tfoot { + color: #e64; + background-color: rgba(224, 228, 204, 0.8); +} +tbody tr:nth-of-type(even) { + background-color: rgba(238, 102, 68, 0.05); +} + +td, th { + padding: 0.2em 0.5em; +} +caption { + caption-side: bottom; + font-size: small; +} +.justify-right, input[type="number"] { + text-align: right; +} +.justify-left { + text-align: left; +} + .tags { font-size: small; } From 9e972a1e2f539270e3cd5df96f7e05f324d72eb5 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 9 Oct 2022 21:42:30 -0600 Subject: [PATCH 02/17] Okay, that's enough for today. --- content/blog/2022-10-09-CLRG-Scoring/index.md | 73 ++++++++++++++++--- .../2022-10-09-CLRG-Scoring/scorecard.mjs | 3 +- content/blog/2022-10-09-CLRG-Scoring/toys.css | 8 -- static/assets/css/default.css | 7 +- 4 files changed, 70 insertions(+), 21 deletions(-) diff --git a/content/blog/2022-10-09-CLRG-Scoring/index.md b/content/blog/2022-10-09-CLRG-Scoring/index.md index 9ede31e..d45e3f7 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/index.md +++ b/content/blog/2022-10-09-CLRG-Scoring/index.md @@ -125,11 +125,7 @@ of the exponential growth in the top 11 places. ### 1st place is super important -1st place is weighted so heavily that it's almost impossible to overcome without -your own 1st. - -Take for example this scenario, -in which Adjudicator 1 has promised to give 1st place to Alice: +1st place is weighted so heavily that one judge could move a 5th place dancer into 2nd. @@ -137,23 +133,27 @@ in which Adjudicator 1 has promised to give 1st place to Alice: + - - + + + - - + + + - - + + + @@ -161,15 +161,66 @@ in which Adjudicator 1 has promised to give 1st place to Alice: + +
Alice BobCarol
Adj. 1
Adj. 2
Adj. 3
Award Points
Ranking
+You can adjust these values to get a better feel for how scoring works. +### Tanking a high-ranked dancer is another way to cheat +Because of that exponential curve, +a low ranking from a single judge can carry a lot of weight. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AliceBobCarol
Adj. 1
Adj. 2
Adj. 3
Award Points
Ranking
diff --git a/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs b/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs index 0603bbd..8a75ef8 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs +++ b/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs @@ -29,9 +29,10 @@ function scorecardUpdate(scorecard) { } { + let rankedPoints = [...points].sort((a, b) => b - a) let i = 0 for (let out of scorecard.querySelectorAll("tfoot output[name='ranking']")) { - out.value = scores[i] + out.value = rankedPoints.indexOf(points[i]) + 1 i += 1 } } diff --git a/content/blog/2022-10-09-CLRG-Scoring/toys.css b/content/blog/2022-10-09-CLRG-Scoring/toys.css index 8f7d521..f52481e 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/toys.css +++ b/content/blog/2022-10-09-CLRG-Scoring/toys.css @@ -1,11 +1,3 @@ -.winner { - color:cornsilk; -} - -figure img { - max-width: 100%; -} - .warning { color: #e64; display: none; diff --git a/static/assets/css/default.css b/static/assets/css/default.css index a889c96..4d84d1d 100644 --- a/static/assets/css/default.css +++ b/static/assets/css/default.css @@ -24,6 +24,7 @@ input { border: thin solid #ccc; } input:read-only { + color: #444; background-color: #eee; } @@ -151,7 +152,7 @@ legend { } table { - margin: 1em; + margin: 1em 0; border-collapse: collapse; } thead, tfoot { @@ -189,6 +190,10 @@ caption { img, video { max-width: 60%; } + + figure img { + max-width: 100%; + } } @media (prefers-color-scheme: dark) { html { From 39f3fe3de7f94359dca755672e87bd49fe878546 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 9 Oct 2022 21:44:24 -0600 Subject: [PATCH 03/17] Remove dumb disclaimer --- content/blog/2022-10-09-CLRG-Scoring/index.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/content/blog/2022-10-09-CLRG-Scoring/index.md b/content/blog/2022-10-09-CLRG-Scoring/index.md index d45e3f7..44ca021 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/index.md +++ b/content/blog/2022-10-09-CLRG-Scoring/index.md @@ -11,10 +11,6 @@ scripts: Let's take a look how how CLRG does its scoring! *With math!* -I'm going to only view this mathematically. -I know there's a lot of other stuff that goes on, like line-ups. -I'm only going to look at this with numbers. - ## How CLRG Scoring Works From 80d24b10110c7ad7a7052762c205d6f3e6c07a93 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 9 Oct 2022 21:47:37 -0600 Subject: [PATCH 04/17] Comment on weird section --- content/blog/2022-10-09-CLRG-Scoring/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/2022-10-09-CLRG-Scoring/index.md b/content/blog/2022-10-09-CLRG-Scoring/index.md index 44ca021..9a4b988 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/index.md +++ b/content/blog/2022-10-09-CLRG-Scoring/index.md @@ -108,7 +108,7 @@ There are a few points to note here: * 1st place is a *huge deal*. Disproportionately huge. * Places 2-10 are similarly big deals compared to places 3-11. * Places 12-50 operate the way most people probably assume ranking works: linearly. -* Places 51-60 are a second degree polynomial, but it doesn't matter much for so few points. +* Places 51-60 fit best to a second degree polynomial, but it doesn't matter much for differences of hundreths of a point. This section is *really weird*, mathematically. * Places 61-100 are all less than 1 point. If you're a judge trying to tank a top dancer, anywhere in this range is equivalent to anywhere else. From 3603c7e9cb7c0109d30b0c69d872e4e2e593d5f2 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 9 Oct 2022 22:34:44 -0600 Subject: [PATCH 05/17] Adjust ranking offsets --- content/blog/2022-10-09-CLRG-Scoring/index.md | 65 +++++++++++++++++++ .../2022-10-09-CLRG-Scoring/scorecard.mjs | 13 +++- content/blog/2022-10-09-CLRG-Scoring/toys.css | 5 ++ 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/content/blog/2022-10-09-CLRG-Scoring/index.md b/content/blog/2022-10-09-CLRG-Scoring/index.md index 9a4b988..62e829c 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/index.md +++ b/content/blog/2022-10-09-CLRG-Scoring/index.md @@ -220,3 +220,68 @@ a low ranking from a single judge can carry a lot of weight. + + +### Being in 1st provides a nice buffer + +Try playing around with Alice's rankings with Adjudicators 2 and 3 here. +She has to get ranked a lot lower before her overall ranking starts going down. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
AliceBobCarolDaveErin
Adj. 1
Adj. 2
Adj. 3
Award Points
Ranking
+
\ No newline at end of file diff --git a/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs b/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs index 8a75ef8..cdacf31 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs +++ b/content/blog/2022-10-09-CLRG-Scoring/scorecard.mjs @@ -3,6 +3,7 @@ import {awardPoints} from "./awardPoints.mjs" function scorecardUpdate(scorecard) { let scores = [] let points = [] + let highestRank = [] let firstRow = scorecard.querySelector("tbody tr") for (let input of firstRow.querySelectorAll("input")) { @@ -16,6 +17,7 @@ function scorecardUpdate(scorecard) { let ranking = Number(input.value) scores[i] += ranking points[i] += awardPoints[ranking] + highestRank[i] = Math.min(highestRank[i] || 100, ranking) i += 1 } } @@ -29,10 +31,19 @@ function scorecardUpdate(scorecard) { } { + let rankOffset = 0 + let overallRanking = [] let rankedPoints = [...points].sort((a, b) => b - a) + for (let i = 0; i < points.length; i++) { + overallRanking[i] = rankedPoints.indexOf(points[i]) + 1 + if (overallRanking[i] == 1) { + rankOffset = highestRank[i] + } + } + let i = 0 for (let out of scorecard.querySelectorAll("tfoot output[name='ranking']")) { - out.value = rankedPoints.indexOf(points[i]) + 1 + out.value = rankedPoints.indexOf(points[i]) + rankOffset i += 1 } } diff --git a/content/blog/2022-10-09-CLRG-Scoring/toys.css b/content/blog/2022-10-09-CLRG-Scoring/toys.css index f52481e..7cf3861 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/toys.css +++ b/content/blog/2022-10-09-CLRG-Scoring/toys.css @@ -6,6 +6,11 @@ display: initial; } +.scrolly { + max-width: 100%; + overflow-x: auto; +} + .awardPoints { display: inline-block; max-height: 60vh; From 6b9e27d44ffbb80a7a87e9a215b9584a3866e020 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 9 Oct 2022 22:49:58 -0600 Subject: [PATCH 06/17] can I sleep yet --- content/blog/2022-10-09-CLRG-Scoring/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/blog/2022-10-09-CLRG-Scoring/index.md b/content/blog/2022-10-09-CLRG-Scoring/index.md index 62e829c..965b495 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/index.md +++ b/content/blog/2022-10-09-CLRG-Scoring/index.md @@ -143,7 +143,7 @@ of the exponential growth in the top 11 places. Adj. 2 - + Adj. 3 @@ -258,11 +258,11 @@ She has to get ranked a lot lower before her overall ranking starts going down. Adj. 3 - + - + From 097881f1bde8161408a3fcf3a4b8a7e3a431e17e Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 9 Oct 2022 22:54:56 -0600 Subject: [PATCH 07/17] now? --- content/blog/2022-10-09-CLRG-Scoring/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/2022-10-09-CLRG-Scoring/index.md b/content/blog/2022-10-09-CLRG-Scoring/index.md index 965b495..8a57818 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/index.md +++ b/content/blog/2022-10-09-CLRG-Scoring/index.md @@ -202,7 +202,7 @@ a low ranking from a single judge can carry a lot of weight. Adj. 3 - + From b8958b958fe5e3e57371e34b39db1fcdec4f5d6d Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Mon, 10 Oct 2022 07:21:53 -0600 Subject: [PATCH 08/17] Split yesterday's post into today's --- content/blog/2022-10-04-CLRG-cheating.md | 1 + .../blog/2022-10-09-CLRG-Scoring/chart.png | Bin 13438 -> 10490 bytes content/blog/2022-10-09-CLRG-Scoring/index.md | 30 +---- .../awardPoints.mjs | 122 ++++++++++++++++++ .../index.md | 35 +++++ .../speculator.mjs | 0 .../toys.css | 33 +++++ 7 files changed, 193 insertions(+), 28 deletions(-) create mode 100644 content/blog/2022-10-10-CLRG-Scoring-Artifacts/awardPoints.mjs create mode 100644 content/blog/2022-10-10-CLRG-Scoring-Artifacts/index.md rename content/blog/{2022-10-09-CLRG-Scoring => 2022-10-10-CLRG-Scoring-Artifacts}/speculator.mjs (100%) create mode 100644 content/blog/2022-10-10-CLRG-Scoring-Artifacts/toys.css diff --git a/content/blog/2022-10-04-CLRG-cheating.md b/content/blog/2022-10-04-CLRG-cheating.md index c72b9a2..dfbfa32 100644 --- a/content/blog/2022-10-04-CLRG-cheating.md +++ b/content/blog/2022-10-04-CLRG-cheating.md @@ -1,6 +1,7 @@ --- title: CLRG's Cheating Scandal date: 2022-10-04 +tags: clrg --- $SPOUSE just stumbled across a PowerPoint file with a bunch of text messages, diff --git a/content/blog/2022-10-09-CLRG-Scoring/chart.png b/content/blog/2022-10-09-CLRG-Scoring/chart.png index c7e2714cbdea1fa56c512ad0839abfbb78d5aeb9..df2e4ef1cdd15a0c6f4794a51ebf6b7a060c52f4 100644 GIT binary patch literal 10490 zcmbt)dpOhm|G$oI9k}mGeJXU2$g!Ky94ku5BuUJvoRW|^48w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YTQIe2kIzt3S?%SnAx(-_;J$=cZw6O3lyC88QpyX|U} zp=31?k6FyX+>u;vtXR5R1_rd0X|5NvO8gjk#NgTd2BZbzJi|rA-zcyQQdV8nlub0jRQ22b8qt{AE*_6@~a zQ1PZy0$U^1mwNk`lWftf4!qEP71QF8(j;RH08t!K!V@qfouys^w-l3(nc#tx2jVdK$_nFd75x!~cU8RAd ze_(!XJ*i)`ydzm)lVI5KYjX78fYkMvrTXCy9aZq$Zo4WVv>YaTL&wt#S{6p^{td$} zRMKYyaoZir?RXAb)CiNQBOK85<|c@G8!;iP0Chy;QAsyfl(oWwkXWQUHjNj1F~*(t z#%;BPr+1%c+X1I{w;o66QNGj^v%a$sAa5EV?lm9%h|R3%FK72M@rh{snI(8lLFHqgGm9;UDUC-f%a1lZ1V_%miP;gs3?FAAb<@|NY6$s?3os);A@tB%*-- P@tiU+{xkcy!;Sw3i3??} diff --git a/content/blog/2022-10-09-CLRG-Scoring/index.md b/content/blog/2022-10-09-CLRG-Scoring/index.md index 8a57818..4e3ebc8 100644 --- a/content/blog/2022-10-09-CLRG-Scoring/index.md +++ b/content/blog/2022-10-09-CLRG-Scoring/index.md @@ -1,10 +1,11 @@ --- title: CLRG Scoring Analyzed date: 2022-10-09 +tags: + - clrg stylesheets: - toys.css scripts: - - speculator.mjs - scorecard.mjs --- @@ -55,33 +56,6 @@ If there's a 2-way, 3-way, or n-way tie, all tied dancers get the average of the next 2, 3, or n award points, and the next 2, 3, or n rankings are skipped. -### Award Points artifacts - -One quirk of awards points is that for any given overall -score, there are only a handful of possible judge rankings that could have led -to it. That means you can make some guesses about how each judge ranked an -individual dancer, based on only their total award points. - -Here's a handy calculator! -It (currently) doesn't consider the possibility of a tie. - -
-
- CLRG Award Points Speculator -
- Points: - -
- - - - - - -
Possible Rankings
Computing: this could take a while!
-
-
- ## What's with these values? diff --git a/content/blog/2022-10-10-CLRG-Scoring-Artifacts/awardPoints.mjs b/content/blog/2022-10-10-CLRG-Scoring-Artifacts/awardPoints.mjs new file mode 100644 index 0000000..40a3372 --- /dev/null +++ b/content/blog/2022-10-10-CLRG-Scoring-Artifacts/awardPoints.mjs @@ -0,0 +1,122 @@ +let awardPoints = [ + 100, // 1 + 75, // 2 + 65, // 3 + 60, // 4 + 56, // 5 + 53, // 6 + 50, // 7 + 47, // 8 + 45, // 9 + 43, // 10 + 41, // 11 + 39, // 12 + 38, // 13 + 37, // 14 + 36, // 15 + 35, // 16 + 34, // 17 + 33, // 18 + 32, // 19 + 31, // 20 + 30, // 21 + 29, // 22 + 28, // 23 + 27, // 24 + 26, // 25 + 25, // 26 + 24, // 27 + 23, // 28 + 22, // 29 + 21, // 30 + 20, // 31 + 19, // 32 + 18, // 33 + 17, // 34 + 16, // 35 + 15, // 36 + 14, // 37 + 13, // 38 + 12, // 39 + 11, // 40 + 10, // 41 + 9, // 42 + 8, // 43 + 7, // 44 + 6, // 45 + 5, // 46 + 4, // 47 + 3, // 48 + 2, // 49 + 1, // 50 + 0.75, // 51 + 0.65, // 52 + 0.60, // 53 + 0.56, // 54 + 0.53, // 55 + 0.50, // 56 + 0.47, // 57 + 0.45, // 58 + 0.43, // 59 + 0.41, // 60 + 0.39, // 61 + 0.38, // 62 + 0.37, // 63 + 0.36, // 64 + 0.35, // 65 + 0.34, // 66 + 0.33, // 67 + 0.32, // 68 + 0.31, // 69 + 0.30, // 70 + 0.29, // 71 + 0.28, // 72 + 0.27, // 73 + 0.26, // 74 + 0.25, // 75 + 0.24, // 76 + 0.23, // 77 + 0.22, // 78 + 0.21, // 79 + 0.20, // 80 + 0.19, // 81 + 0.18, // 82 + 0.17, // 83 + 0.16, // 84 + 0.15, // 85 + 0.14, // 86 + 0.13, // 87 + 0.12, // 88 + 0.11, // 89 + 0.10, // 90 + 0.09, // 91 + 0.08, // 92 + 0.07, // 93 + 0.06, // 94 + 0.05, // 95 + 0.04, // 96 + 0.03, // 97 + 0.02, // 98 + 0.01, // 99 + 0.00, // 100 +] + +function init() { + for (let tbody of document.querySelectorAll(".awardPoints tbody")) { + for (let i = 0; i < awardPoints.length; i++) { + let tr = tbody.appendChild(document.createElement("tr")) + tr.appendChild(document.createElement("td")).textContent = i + 1 + tr.appendChild(document.createElement("td")).textContent = awardPoints[i].toFixed(2) + } + } +} + +if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init) +} else { + init() +} + +export { + awardPoints, +} diff --git a/content/blog/2022-10-10-CLRG-Scoring-Artifacts/index.md b/content/blog/2022-10-10-CLRG-Scoring-Artifacts/index.md new file mode 100644 index 0000000..a6c1354 --- /dev/null +++ b/content/blog/2022-10-10-CLRG-Scoring-Artifacts/index.md @@ -0,0 +1,35 @@ +--- +title: CLRG Award Points Artifacts +date: 2022-10-09 +tags: + - clrg +stylesheets: + - toys.css +scripts: + - speculator.mjs +--- + +One quirk of awards points is that for any given overall +score, there are only a handful of possible judge rankings that could have led +to it. That means you can make some guesses about how each judge ranked an +individual dancer, based on only their total award points. + +Here's a handy calculator! +It (currently) doesn't consider the possibility of a tie. + +
+
+ CLRG Award Points Speculator +
+ Points: + +
+ + + + + + +
Possible Rankings
Computing: this could take a while!
+
+
diff --git a/content/blog/2022-10-09-CLRG-Scoring/speculator.mjs b/content/blog/2022-10-10-CLRG-Scoring-Artifacts/speculator.mjs similarity index 100% rename from content/blog/2022-10-09-CLRG-Scoring/speculator.mjs rename to content/blog/2022-10-10-CLRG-Scoring-Artifacts/speculator.mjs diff --git a/content/blog/2022-10-10-CLRG-Scoring-Artifacts/toys.css b/content/blog/2022-10-10-CLRG-Scoring-Artifacts/toys.css new file mode 100644 index 0000000..7cf3861 --- /dev/null +++ b/content/blog/2022-10-10-CLRG-Scoring-Artifacts/toys.css @@ -0,0 +1,33 @@ +.warning { + color: #e64; + display: none; +} +.warning.visible { + display: initial; +} + +.scrolly { + max-width: 100%; + overflow-x: auto; +} + +.awardPoints { + display: inline-block; + max-height: 60vh; + overflow-y: auto; + margin: 1em; +} +.awardPoints table { + margin: initial; +} +.awardPoints thead { + position: sticky; + top: 0; +} +.awardPoints tbody { + max-height: 60vh; + overflow-y: auto; +} +.awardPoints td { + text-align: right; +} \ No newline at end of file From 87f7c5ffb8f502d090f65198ce55e408f4054e7c Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Mon, 10 Oct 2022 13:19:19 -0600 Subject: [PATCH 09/17] Working parser for one dataset --- .../_index.md | 7 + .../results.mjs | 178 ++++++++++++++++++ .../2022-10-10-CLRG-Results-Analysis/wat.html | 9 + .../index.md | 2 +- layouts/_default/baseof.html | 8 +- run.sh | 2 + 6 files changed, 203 insertions(+), 3 deletions(-) create mode 100644 content/blog/2022-10-10-CLRG-Results-Analysis/_index.md create mode 100644 content/blog/2022-10-10-CLRG-Results-Analysis/results.mjs create mode 100644 content/blog/2022-10-10-CLRG-Results-Analysis/wat.html diff --git a/content/blog/2022-10-10-CLRG-Results-Analysis/_index.md b/content/blog/2022-10-10-CLRG-Results-Analysis/_index.md new file mode 100644 index 0000000..de873cf --- /dev/null +++ b/content/blog/2022-10-10-CLRG-Results-Analysis/_index.md @@ -0,0 +1,7 @@ +--- +title: CLRG Results Analysis +date: 2022-10-10T10:13:00-06:00 +draft: true +--- + +Hello there. diff --git a/content/blog/2022-10-10-CLRG-Results-Analysis/results.mjs b/content/blog/2022-10-10-CLRG-Results-Analysis/results.mjs new file mode 100644 index 0000000..9ccf4e7 --- /dev/null +++ b/content/blog/2022-10-10-CLRG-Results-Analysis/results.mjs @@ -0,0 +1,178 @@ +class Results { + /** + * + * @param {string} url URL to load + */ + constructor(url) { + if (url) { + this.loadData(url) + } + } + async loadData(url) { + let resp = await fetch(url) + let contentType = resp.headers.get("Content-Type") + if (! contentType.includes("/xml")) { + console.error(`Cannot load data with content-type ${contentType}`) + return + } + let text = await resp.text() + this.doc = new DOMParser().parseFromString(text, "text/xml") + this.rawData = this.parseXMLDocument(this.doc) + this.data = this.parseRawData(this.rawData) + } + + parseXMLDocument(doc) { + let table = doc.querySelector("Table") + let rawData = [] + + for (let dataRow of table.children) { + if (! ["tr"].includes(dataRow.tagName.toLowerCase())) { + console.warn(`Warning: unexpected XML tag ${dataRow.tagName}, expecting tr`) + continue + } + + let row = [] + for (let dataCell of dataRow.children) { + if (! ["th", "td"].includes(dataCell.tagName.toLowerCase())) { + console.warn(`Warning: unexpected XML tag ${dataRow.tagName}, expecting th/td`) + continue + } + row.push(dataCell.textContent) + } + + rawData.push(row) + } + return rawData + } + + parseRawData(rawData) { + let cellA1 = rawData[0][0].trim().toLowerCase() + switch (cellA1) { + case "place awd pts": + return this.parseFeisWorx2017(rawData) + break + } + console.error("Cell A1 doesn't resemble anything I can cope with", rawData[0]) + } + + /** + * + * @param {Array.>} rawData + */ + parseFeisWorx2017(rawData) { + let adjudicators = [] + let data = [] + for (let rowIndex = 0; rowIndex < rawData.length; rowIndex++) { + let cells = rawData[rowIndex] + switch (rowIndex) { + case 0: // Column headers + break + case 1: // Adjudicators + adjudicators = cells + break + default: + if ((cells.length == 11) && (cells[0].trim().toLowerCase().startsWith("place"))) { + // Page heading + continue + } + + if (cells.length >= adjudicators.length) { + // Is this just a list of adjudicators again? + let lenDiff = cells.length - adjudicators.length + let same = true + for (let i = adjudicators.length-1; i >= 0; i--) { + if (adjudicators[i] != cells[i+lenDiff]) { + same = false + break + } + } + if (same) { + continue + } + } + + let row = {} + + { + let parts = cells[0].trim().split(/\s+/) + row.overallRank = Number(parts[0]) + row.overallPoints = Number(parts[1]) + } + + { + let parts = cells[1].trim().split(/ - /) + row.competitorNumber = Number(parts[0]) + row.competitorName = parts[1] + row.qualifier = parts[2] + } + + row.adjudication = {} // XXX: I don't like this name + for (let cellIndex = 2; cellIndex < cells.length; cellIndex++) { + let cell = cells[cellIndex] + let vote = {} + let parts = cell.trim().split(/ - ?|\s/) + + if ((parts.length == 5) && (parts[3] == "AP")) { + parts.splice(3, 0, "NaN") + } + + if ((parts.length == 7) && (parts[4] == "T")) { + vote.tie = true + parts.splice(4, 1) + } else { + vote.tie = false + } + + if (parts.length != 6) { + console.error(`Wrong number of fields in row ${rowIndex} cell ${cellIndex}:`, parts, cells) + } else { + for (let i = 0; i < parts.length; i += 2) { + let key = parts[i] + let val = Number(parts[i+1]) + switch (key) { + case "Raw": + vote.raw = val + break + case "Plc": + vote.placing = val + break + case "AP": + vote.points = val + break + default: + console.error(`Unknown key ${key} in row ${rowIndex} cell ${cellIndex}:`, cell) + break + } + } + + let adjudicator = adjudicators[cellIndex - 2] + row.adjudication[adjudicator] = vote + } + } + data.push(row) + break + } + } + return data + } +} + + +async function init() { + for (let div of document.querySelectorAll(".crlg-dataset")) { + let results = new Results() + await results.loadData(div.dataset.url) + console.log(results.data) + } +} + + +if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init) +} else { + init() +} + +export { + Results, +} \ No newline at end of file diff --git a/content/blog/2022-10-10-CLRG-Results-Analysis/wat.html b/content/blog/2022-10-10-CLRG-Results-Analysis/wat.html new file mode 100644 index 0000000..20b19b2 --- /dev/null +++ b/content/blog/2022-10-10-CLRG-Results-Analysis/wat.html @@ -0,0 +1,9 @@ +--- +title: CLRG Data Analyzer +scripts: + - results.mjs +--- + +wat? + +
\ No newline at end of file diff --git a/content/blog/2022-10-10-CLRG-Scoring-Artifacts/index.md b/content/blog/2022-10-10-CLRG-Scoring-Artifacts/index.md index a6c1354..52da72a 100644 --- a/content/blog/2022-10-10-CLRG-Scoring-Artifacts/index.md +++ b/content/blog/2022-10-10-CLRG-Scoring-Artifacts/index.md @@ -1,6 +1,6 @@ --- title: CLRG Award Points Artifacts -date: 2022-10-09 +date: 2022-10-10T08:00:00-06:00 tags: - clrg stylesheets: diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 2b60966..17fc81f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -16,9 +16,13 @@ {{range .Params.scripts}} {{end}} {{range .Params.scripts}} - + > {{end}} {{range .Params.headers}} {{. | safeHTML}} diff --git a/run.sh b/run.sh index 2e16e09..20bd01f 100755 --- a/run.sh +++ b/run.sh @@ -18,4 +18,6 @@ docker run \ -u $(id -u):$(id -g) \ -p 1313:1313 \ klakegg/hugo:ext server \ + --buildFuture \ + --buildDrafts \ --baseURL "$baseURL" From 9f4b2c989c3cabf04a119b289d0f07aeaa13391d Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Mon, 10 Oct 2022 15:53:55 -0600 Subject: [PATCH 10/17] Polish up FeisWorx parser --- .../dataset.css | 7 + .../dataset.mjs | 328 ++++++++++++++++++ .../results.mjs | 178 ---------- .../2022-10-10-CLRG-Results-Analysis/wat.html | 7 +- layouts/_default/baseof.html | 8 +- 5 files changed, 346 insertions(+), 182 deletions(-) create mode 100644 content/blog/2022-10-10-CLRG-Results-Analysis/dataset.css create mode 100644 content/blog/2022-10-10-CLRG-Results-Analysis/dataset.mjs delete mode 100644 content/blog/2022-10-10-CLRG-Results-Analysis/results.mjs diff --git a/content/blog/2022-10-10-CLRG-Results-Analysis/dataset.css b/content/blog/2022-10-10-CLRG-Results-Analysis/dataset.css new file mode 100644 index 0000000..5fb846f --- /dev/null +++ b/content/blog/2022-10-10-CLRG-Results-Analysis/dataset.css @@ -0,0 +1,7 @@ +.clrg-dataset tbody *:nth-child(3n) { + border-right: thin solid black; +} + +.clrg-dataset tbody .new-round { + border-left: thick solid black; +} \ No newline at end of file diff --git a/content/blog/2022-10-10-CLRG-Results-Analysis/dataset.mjs b/content/blog/2022-10-10-CLRG-Results-Analysis/dataset.mjs new file mode 100644 index 0000000..a24974c --- /dev/null +++ b/content/blog/2022-10-10-CLRG-Results-Analysis/dataset.mjs @@ -0,0 +1,328 @@ +/** + * @typedef Result + * @type {object} + * @param {String} name Competitor's name + * @param {Number} number Competitor's bib number + * @param {String} school Competitor's school + * @param {Number} overallPoints Overall award points for this competitor + * @param {Number} overallRank Overall ranking for this competitor + * @param {String} qualifier Any qualifiers this ranking earned + * @param {Array.} rounds How this competitor was judged in each round + */ + +/** + * @typedef Round + * @type {Array.} + */ + +/** + * @typedef Adjudication + * @type {object} + * @param {String} adjudicator Adjudicator who recorded this score + * @param {Number} raw Raw score + * @param {Number} placing Placing relative to this adjudicator's other scores + * @param {Number} points Award points + */ + +/** + * Creates a new element and appends it to parent + * + * @param {Element} parent + * @param {String} type + * @returns {Element} + */ +function newElement(parent, type) { + return parent.appendChild(document.createElement(type)) +} + +class Dataset { + /** + * + * @param {String} url URL to load + */ + constructor(url) { + if (url) { + this.loadData(url) + } + } + async loadData(url) { + let resp = await fetch(url) + let contentType = resp.headers.get("Content-Type") + if (! contentType.includes("/xml")) { + console.error(`Cannot load data with content-type ${contentType}`) + return + } + let text = await resp.text() + this.doc = new DOMParser().parseFromString(text, "text/xml") + this.rawData = this.parseXMLDocument(this.doc) + this.results = this.parseRawData(this.rawData) + } + + parseXMLDocument(doc) { + let table = doc.querySelector("Table") + let rawData = [] + + for (let dataRow of table.children) { + if (! ["tr"].includes(dataRow.tagName.toLowerCase())) { + console.warn(`Warning: unexpected XML tag ${dataRow.tagName}, expecting tr`) + continue + } + + let row = [] + for (let dataCell of dataRow.children) { + if (! ["th", "td"].includes(dataCell.tagName.toLowerCase())) { + console.warn(`Warning: unexpected XML tag ${dataRow.tagName}, expecting th/td`) + continue + } + row.push(dataCell.textContent) + } + + rawData.push(row) + } + return rawData + } + + + /** + * @typedef ParsedData + * @type {object} + * @property {Array.} adjudicators List of adjudicators + * @property {Array.} results List of results + */ + + /** + * Parse raw data into a list of adjudicators and results + * + * @param {Array.>} rawData Raw data + * @returns {Array.} + */ + parseRawData(rawData) { + let cellA1 = rawData[0][0].trim().toLowerCase() + switch (cellA1) { + case "place awd pts": + return this.parseFeisWorx2017(rawData) + } + console.error("Cell A1 doesn't resemble anything I can cope with", rawData[0]) + } + + /** + * Parse FeisWorx 2017 data + * + * This is the output of Adobe Reader saving the PDF as XML. + * + * @param {Array.>} rawData Raw data + * @returns {Array.} + */ + parseFeisWorx2017(rawData) { + let adjudicators = [] + let results = [] + let numRounds = 0 + let adjudicatorsPerRound = 0 + + for (let rowIndex = 0; rowIndex < rawData.length; rowIndex++) { + let cells = rawData[rowIndex] + + // Is it a page heading? + if ((cells.length >= 11) && (cells[0].trim().toLowerCase().startsWith("place"))) { + if (numRounds == 0) { + for (let cell of cells) { + if (cell.toLowerCase().startsWith("round")) { + numRounds++ + } + } + } + continue + } + + if (adjudicators.length == 0) { + let fishy = false + for (let adjudicator of cells) { + if (Number(adjudicator) > 0) { + fishy = true + } + adjudicators.push(adjudicator.trim()) + } + if (fishy) { + console.warn("Adjudicators row doesn't look right", cells) + } + adjudicatorsPerRound = adjudicators.length / numRounds + if (! Number.isSafeInteger(adjudicatorsPerRound)) { + console.error(`Irrational number of adjudicators for number of rounds: (${adjudicators.length}/${numRounds})`) + } + continue + } + + // Is this just a list of adjudicators again? + if (cells.length >= adjudicators.length) { + let lenDiff = cells.length - adjudicators.length + let same = true + for (let i = adjudicators.length-1; i >= 0; i--) { + if (adjudicators[i] != cells[i+lenDiff].trim()) { + same = false + break + } + } + if (same) { + continue + } + } + + let row = {} + + { + let parts = cells[0].trim().split(/\s+/) + row.overallRank = Number(parts[0]) + row.overallPoints = Number(parts[1]) + } + + { + let match = cells[1].trim().match(/(\d+) - (.+) \((.+) *\)[ -]*(.+)?/) + if (match) { + row.number = Number(match[1]) + row.name = match[2] + row.school = match[3] + row.qualifier = match[4] + } + } + + row.rounds = [] + let round = [] + for (let cellIndex = 2; cellIndex < cells.length; cellIndex++) { + let cell = cells[cellIndex] + let adjudication = {} + let parts = cell.trim().split(/ - ?|\s/) + + adjudication.adjudicator = adjudicators[cellIndex - 2] + + if ((parts.length == 5) && (parts[3] == "AP")) { + parts.splice(3, 0, "NaN") + } + + if ((parts.length == 7) && (parts[4] == "T")) { + adjudication.tie = true + parts.splice(4, 1) + } else { + adjudication.tie = false + } + + if (parts.length != 6) { + console.error(`Wrong number of fields in row ${rowIndex} cell ${cellIndex}:`, parts, cells) + break + } + + for (let i = 0; i < parts.length; i += 2) { + let key = parts[i] + let val = Number(parts[i+1]) + switch (key) { + case "Raw": + adjudication.raw = val + break + case "Plc": + adjudication.placing = val + break + case "AP": + adjudication.points = val + break + default: + console.error(`Unknown key ${key} in row ${rowIndex} cell ${cellIndex}:`, cell) + break + } + } + + round.push(adjudication) + if (round.length == adjudicatorsPerRound) { + row.rounds.push(round) + round = [] + } + } + results.push(row) + } + + return results + } +} + +/** + * + * Fills a table element with some results + * + * @param {Element} table Table to fill in + * @param {Array.} results Results to fill with + */ +function fillTable(table, results) { + let head = newElement(table, "thead") + let row0 = newElement(head, "tr") + let row1 = newElement(head, "tr") + let row2 = newElement(head, "tr") + + newElement(row0, "th").colSpan = 3 + newElement(row1, "th").colSpan = 3 + newElement(row2, "th").textContent = "Name" + newElement(row2, "th").textContent = "Points" + newElement(row2, "th").textContent = "Rank" + + let roundNumber = 0 + for (let round of results[0].rounds) { + let roundCell = newElement(row0, "th") + roundCell.textContent = `Round ${++roundNumber}` + roundCell.colSpan = 3*round.length + for (let adjudication of round) { + let adjudicator = adjudication.adjudicator + let cell = newElement(row1, "th") + cell.textContent = adjudicator + cell.colSpan = 3 + + newElement(row2, "th").textContent = "Raw" + newElement(row2, "th").textContent = "Placing" + newElement(row2, "th").textContent = "Points" + } + } + + let body = newElement(table, "tbody") + for (let result of results) { + let row = newElement(body, "tr") + + newElement(row, "th").textContent = result.name + newElement(row, "th").textContent = result.overallPoints + newElement(row, "th").textContent = result.overallRank + + let i = 0 + for (let round of result.rounds) { + let first = true + for (let adjudication of round) { + let raw = newElement(row, "td") + raw.textContent = adjudication.raw + if (first) { + raw.classList.add("new-round") + first = false + } + + newElement(row, "td").textContent = adjudication.placing + newElement(row, "td").textContent = adjudication.points + i++ + } + } + } +} + +async function init() { + for (let div of document.querySelectorAll(".clrg-dataset")) { + let dataset = new Dataset() + await dataset.loadData(div.dataset.url) + + let table = newElement(div, "table") + fillTable(table, dataset.results) + console.log(dataset) + } +} + + +if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", init) +} else { + init() +} + +export { + Dataset, +} diff --git a/content/blog/2022-10-10-CLRG-Results-Analysis/results.mjs b/content/blog/2022-10-10-CLRG-Results-Analysis/results.mjs deleted file mode 100644 index 9ccf4e7..0000000 --- a/content/blog/2022-10-10-CLRG-Results-Analysis/results.mjs +++ /dev/null @@ -1,178 +0,0 @@ -class Results { - /** - * - * @param {string} url URL to load - */ - constructor(url) { - if (url) { - this.loadData(url) - } - } - async loadData(url) { - let resp = await fetch(url) - let contentType = resp.headers.get("Content-Type") - if (! contentType.includes("/xml")) { - console.error(`Cannot load data with content-type ${contentType}`) - return - } - let text = await resp.text() - this.doc = new DOMParser().parseFromString(text, "text/xml") - this.rawData = this.parseXMLDocument(this.doc) - this.data = this.parseRawData(this.rawData) - } - - parseXMLDocument(doc) { - let table = doc.querySelector("Table") - let rawData = [] - - for (let dataRow of table.children) { - if (! ["tr"].includes(dataRow.tagName.toLowerCase())) { - console.warn(`Warning: unexpected XML tag ${dataRow.tagName}, expecting tr`) - continue - } - - let row = [] - for (let dataCell of dataRow.children) { - if (! ["th", "td"].includes(dataCell.tagName.toLowerCase())) { - console.warn(`Warning: unexpected XML tag ${dataRow.tagName}, expecting th/td`) - continue - } - row.push(dataCell.textContent) - } - - rawData.push(row) - } - return rawData - } - - parseRawData(rawData) { - let cellA1 = rawData[0][0].trim().toLowerCase() - switch (cellA1) { - case "place awd pts": - return this.parseFeisWorx2017(rawData) - break - } - console.error("Cell A1 doesn't resemble anything I can cope with", rawData[0]) - } - - /** - * - * @param {Array.>} rawData - */ - parseFeisWorx2017(rawData) { - let adjudicators = [] - let data = [] - for (let rowIndex = 0; rowIndex < rawData.length; rowIndex++) { - let cells = rawData[rowIndex] - switch (rowIndex) { - case 0: // Column headers - break - case 1: // Adjudicators - adjudicators = cells - break - default: - if ((cells.length == 11) && (cells[0].trim().toLowerCase().startsWith("place"))) { - // Page heading - continue - } - - if (cells.length >= adjudicators.length) { - // Is this just a list of adjudicators again? - let lenDiff = cells.length - adjudicators.length - let same = true - for (let i = adjudicators.length-1; i >= 0; i--) { - if (adjudicators[i] != cells[i+lenDiff]) { - same = false - break - } - } - if (same) { - continue - } - } - - let row = {} - - { - let parts = cells[0].trim().split(/\s+/) - row.overallRank = Number(parts[0]) - row.overallPoints = Number(parts[1]) - } - - { - let parts = cells[1].trim().split(/ - /) - row.competitorNumber = Number(parts[0]) - row.competitorName = parts[1] - row.qualifier = parts[2] - } - - row.adjudication = {} // XXX: I don't like this name - for (let cellIndex = 2; cellIndex < cells.length; cellIndex++) { - let cell = cells[cellIndex] - let vote = {} - let parts = cell.trim().split(/ - ?|\s/) - - if ((parts.length == 5) && (parts[3] == "AP")) { - parts.splice(3, 0, "NaN") - } - - if ((parts.length == 7) && (parts[4] == "T")) { - vote.tie = true - parts.splice(4, 1) - } else { - vote.tie = false - } - - if (parts.length != 6) { - console.error(`Wrong number of fields in row ${rowIndex} cell ${cellIndex}:`, parts, cells) - } else { - for (let i = 0; i < parts.length; i += 2) { - let key = parts[i] - let val = Number(parts[i+1]) - switch (key) { - case "Raw": - vote.raw = val - break - case "Plc": - vote.placing = val - break - case "AP": - vote.points = val - break - default: - console.error(`Unknown key ${key} in row ${rowIndex} cell ${cellIndex}:`, cell) - break - } - } - - let adjudicator = adjudicators[cellIndex - 2] - row.adjudication[adjudicator] = vote - } - } - data.push(row) - break - } - } - return data - } -} - - -async function init() { - for (let div of document.querySelectorAll(".crlg-dataset")) { - let results = new Results() - await results.loadData(div.dataset.url) - console.log(results.data) - } -} - - -if (document.readyState === "loading") { - document.addEventListener("DOMContentLoaded", init) -} else { - init() -} - -export { - Results, -} \ No newline at end of file diff --git a/content/blog/2022-10-10-CLRG-Results-Analysis/wat.html b/content/blog/2022-10-10-CLRG-Results-Analysis/wat.html index 20b19b2..ffaa047 100644 --- a/content/blog/2022-10-10-CLRG-Results-Analysis/wat.html +++ b/content/blog/2022-10-10-CLRG-Results-Analysis/wat.html @@ -1,9 +1,12 @@ --- title: CLRG Data Analyzer +stylesheets: + - dataset.css scripts: - - results.mjs + - dataset.mjs --- wat? -
\ No newline at end of file +
+
\ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 17fc81f..2473ab5 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -11,14 +11,18 @@ {{end}} {{range .Params.stylesheets}} - + {{$url := .}} + {{with $.Page.Resources.GetMatch .}} + {{$url = .RelPermalink}} + {{end}} + {{end}} {{range .Params.scripts}} {{end}} {{range .Params.scripts}} {{$url := .}} {{with $.Page.Resources.GetMatch .}} - {{$url = .RelPermaLink}} + {{$url = .RelPermalink}} {{end}}