Quarterback headshots by team scoring
import * as Plot from "@observablehq/plot";
import { STANDINGS } from "@sportsdataverse/examples/data";
import { headshots } from "@sportsdataverse/sdvplot/plot";
// ESPN player ids need no league data: headshots builds each URL from the id alone.
Plot.plot({
grid: true,
x: { label: "Points for" },
y: { label: "Points against", reverse: true },
marks: [
headshots(STANDINGS, {
league: "nfl",
x: "pf",
y: "pa",
player: "qb_espn_id",
title: "qb",
height: 0.14,
}),
],
});
Tags: plot · headshots · nfl. All sdvplot examples.