ManaDash logo ManaDash logo ManaDash
  • Home
  • Archetypes
  • Decktypes
  • Players
  • Elo
  • Deck Viewer
  • Cards Stats
  • Card Groups
  • Card Impact
  • Season Ranking
  • Standings
Season Ranking
Season Ranking
{
  const rankingData = transpose(ranking);

  // Percentage columns can be null for players with no recorded opponents.
  const fmt2 = x => (x == null || Number.isNaN(x)) ? "" : d3.format(".2f")(x);

  // Avg points per draft is the ranking criterion, so make it stand out.
  const boldFmt2 = x => htl.html`<strong>${fmt2(x)}</strong>`;

  const table = rankingData.length === 0
    ? htl.html`<p class="text-muted">No ranking available.</p>`
    : Inputs.table(rankingData, {
        columns: [
          "rank", "player", "drafts_played", "total_points",
          "avg_points_per_draft", "OMP", "GWP", "OGP"
        ],
        header: {
          rank: "Rank",
          player: "Player",
          drafts_played: "Drafts Played",
          total_points: "Total Points",
          avg_points_per_draft: "Avg Points / Draft",
          OMP: "Opp Match Win % (OMP)",
          GWP: "Game Win % (GWP)",
          OGP: "Opp Game Win % (OGP)"
        },
        format: {
          avg_points_per_draft: boldFmt2,
          OMP: fmt2,
          GWP: fmt2,
          OGP: fmt2
        },
        align: {
          rank: "right", drafts_played: "right", total_points: "right",
          avg_points_per_draft: "right", OMP: "right", GWP: "right", OGP: "right"
        },
        width: { rank: 60, player: 140 },
        rows: 40,
        layout: "auto"
      });

  return htl.html`<div>
    <p class="text-muted mb-2">${season_id}: ranked by average match points per draft.
    Tiebreakers: OMP, GWP, OGP (season averages).</p>
    ${table}
  </div>`;
}
 

ManaDash — Vintage Cube Analysis