num: digits, a forced sign, a prefix or suffix
| Team | Net EPA/play | Points for |
|---|---|---|
| KC | +0.063 | 385 pts |
| LAC | +0.101 | 402 pts |
| DEN | +0.108 | 425 pts |
| LV | −0.146 | 309 pts |
| BUF | +0.190 | 525 pts |
| MIA | −0.019 | 345 pts |
| NYJ | −0.045 | 338 pts |
| NE | 289 pts |
import { STANDINGS, type Standing } from "@sportsdataverse/examples/data";
import { defineTable } from "@sportsdataverse/sdvtables";
import { renderHTMLAsync } from "@sportsdataverse/sdvtables/html";
// New England has no net EPA on file (null): the cell stays blank.
const spec = defineTable<Standing>()
.columns((c) => [
c.text("team"),
c.num("net_epa", { label: "Net EPA/play", digits: 3, forceSign: true }),
c.num("pf", { label: "Points for", digits: 0, suffix: " pts" }),
])
.title("AFC, 2024")
.build();
await renderHTMLAsync(spec, STANDINGS);
Tags: kind · num. All sdvtables examples.