QMK Keymap Carpalx Analyser

This attempts to adapt Carpalx into a JS system that can analyse QMK keymaps in the form of configurator .json files. Some default keymaps are available here, which can be dropped any where on this page (drop multiple files for quick comparing). The textarea below is used as a corpus, and is populated by a section from a book on Project Gutenberg, along with some of the source code for this page.

▶ Adjust overall weights
\[e = {k_{base} \times b_{triad} + k_{penalty} \times p_{triad} + k_{stroke} \times s_{triad} }\] \[b_{triad} = {k_1 \times b_{key,1} \times ( 1 + k_1 \times b_{key,2} \times ( 1 + k_3 \times b_{key,3}))}\] \[b_{key} = \text{distance from closest homerow key in } \frac{1}{2} \text{ key units}\]
Effort Component Weights
\(k_{base}\)
\(k_{penalty}\)
\(k_{stroke}\)
Triad Interaction Weights
\(k_{1}\)
\(k_{2}\)
\(k_{3}\)
▶ Adjust penalties
\[p_{triad} = {k_1 \times p_{key,1} \times ( 1 + k_1 \times p_{key,2} \times ( 1 + k_3 \times p_{key,3}))}\] \[p_{fingerkey} = {w_0 + w_{hand} \times p_{hand} + w_{finger} \times p_{finger} + w_{row} \times p_{row}}\] \[p_{thumbkey} = {w_0 + w_{hand} \times p_{hand} + w_{thumb}}\]
Penalty Weights
\(w_0\)
\(w_{hand}\)
\(w_{row}\)
\(w_{finger}\)
\(w_{thumb}\)
Hand Penalty \(p_{hand}\)
Finger Penalty \(p_{finger}\)
LeftRight
PinkyRingMiddlePointer PointerMiddleRingPinky
Row Penalty \(p_{row}\)
3 Above
2 Above
1 Above
Homerow
1 Below
2 Below
3 Below
▶ Adjust stroke path
\[s_{triad} = {f_{hand} \times s_{hand} + f_{row} \times s_{row} + f_{finger} \times s_{finger} }\]
Weights
\(f_{hand}\)
\(f_{row}\)
\(f_{finger}\)
Hand Combination Weight \(s_{hand}\)
Both used, not alternating
Alternating
Same
Row Combination Weight \(s_{row}\)
Same
Downward progression, with repetition
Upward progression, with repetition
Some different, not monotonic, max row Δ 1
Downward progression
Some different, not monotonic, max row Δ downward >1
Upward progression
Some different, not monotonic, max row Δ upward >1
Finger Combination Weight \(s_{finger}\)
Double inner roll
Repeat one
Single inner roll
Single outer roll
Double outer roll
Same finger
Alt hands
Bounce
Same key advantage

Keyboard Corpus \(e\) \(e_{finger}\) \(e_{thumb}\) \(b_{finger}\) \(b_{thumb}\) \(p_{finger}\) \(s\) ?