@sportsdataverse/sdvplot 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/NOTICE.md +94 -0
- package/README.md +908 -2
- package/dist/_web-D7Aa5Rd8.d.ts +69 -0
- package/dist/aaf-GJ3SH34T.js +13 -0
- package/dist/aaf-HCYN5T6Y.js +37 -0
- package/dist/aaf-ZAE5KS2Y.js +13 -0
- package/dist/ahl-E66MDVCU.js +66 -0
- package/dist/ahl-NPQQWZEV.js +249 -0
- package/dist/ahl-QRDU73XX.js +309 -0
- package/dist/axis-CraWQRUJ.d.ts +49 -0
- package/dist/bins.d.ts +174 -0
- package/dist/bins.js +4 -0
- package/dist/bins.js.map +1 -0
- package/dist/cfb-F42SVS4X.js +5000 -0
- package/dist/cfb-P3SHEYRZ.js +692 -0
- package/dist/cfb-WXRZANLP.js +10226 -0
- package/dist/chartjs-surface.d.ts +42 -0
- package/dist/chartjs-surface.js +65 -0
- package/dist/chartjs-surface.js.map +1 -0
- package/dist/chartjs.d.ts +132 -0
- package/dist/chartjs.js +339 -0
- package/dist/chartjs.js.map +1 -0
- package/dist/chunk-4C3GX6QO.js +92 -0
- package/dist/chunk-4C3GX6QO.js.map +1 -0
- package/dist/chunk-C2CDY5OG.js +137 -0
- package/dist/chunk-C2CDY5OG.js.map +1 -0
- package/dist/chunk-E7G7VSLV.js +43 -0
- package/dist/chunk-E7G7VSLV.js.map +1 -0
- package/dist/chunk-J6R2LEJ7.js +58 -0
- package/dist/chunk-J6R2LEJ7.js.map +1 -0
- package/dist/chunk-JJFTD4VB.js +175 -0
- package/dist/chunk-JJFTD4VB.js.map +1 -0
- package/dist/chunk-KKH6ABMA.js +223 -0
- package/dist/chunk-KKH6ABMA.js.map +1 -0
- package/dist/chunk-NLPH2VZT.js +127 -0
- package/dist/chunk-NLPH2VZT.js.map +1 -0
- package/dist/chunk-OKEE4AH6.js +30 -0
- package/dist/chunk-OKEE4AH6.js.map +1 -0
- package/dist/chunk-QY65DUEF.js +306 -0
- package/dist/chunk-QY65DUEF.js.map +1 -0
- package/dist/chunk-RMT2GMFH.js +97 -0
- package/dist/chunk-RMT2GMFH.js.map +1 -0
- package/dist/chunk-SEBO35DV.js +76 -0
- package/dist/chunk-SEBO35DV.js.map +1 -0
- package/dist/chunk-TAXO3VXH.js +556 -0
- package/dist/chunk-TAXO3VXH.js.map +1 -0
- package/dist/chunk-TDNBAEQB.js +105 -0
- package/dist/chunk-TDNBAEQB.js.map +1 -0
- package/dist/cricket-KPCYG2HL.js +493 -0
- package/dist/cricket-NDXLE25B.js +116 -0
- package/dist/cricket-YUUF7P6M.js +160 -0
- package/dist/d3.d.ts +234 -0
- package/dist/d3.js +198 -0
- package/dist/d3.js.map +1 -0
- package/dist/echarts.d.ts +121 -0
- package/dist/echarts.js +228 -0
- package/dist/echarts.js.map +1 -0
- package/dist/echl-3CR4RGFC.js +241 -0
- package/dist/echl-NPC32C23.js +107 -0
- package/dist/echl-PI33DGJC.js +64 -0
- package/dist/export.d.ts +130 -0
- package/dist/export.js +258 -0
- package/dist/export.js.map +1 -0
- package/dist/headshots-B2J_LOO8.d.ts +40 -0
- package/dist/index.d.ts +182 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/interact.d.ts +567 -0
- package/dist/interact.js +809 -0
- package/dist/interact.js.map +1 -0
- package/dist/marks-DH-tQIP-.d.ts +75 -0
- package/dist/mbb-3TRLVW3H.js +3619 -0
- package/dist/mbb-DQUHCHZP.js +5111 -0
- package/dist/mbb-PRAIO2P5.js +371 -0
- package/dist/milb-6IQ6NCEW.js +291 -0
- package/dist/milb-EYY5MD4T.js +1752 -0
- package/dist/milb-EYZ4SZLI.js +797 -0
- package/dist/mlb-4PBUJSVQ.js +35 -0
- package/dist/mlb-FHPY3GQJ.js +701 -0
- package/dist/mlb-REVGL3N2.js +665 -0
- package/dist/nba-ATT775GS.js +485 -0
- package/dist/nba-LKM4UHVU.js +482 -0
- package/dist/nba-YX7PXM3R.js +35 -0
- package/dist/nbagl-3WGZCZ4S.js +37 -0
- package/dist/nbagl-LP4XJRAL.js +229 -0
- package/dist/nbagl-VTTOU7LN.js +499 -0
- package/dist/ncaa_baseball-UV75LNVR.js +2670 -0
- package/dist/ncaa_baseball-VD5J5C72.js +419 -0
- package/dist/ncaa_baseball-YRBS32D6.js +4592 -0
- package/dist/ncaa_mhockey-IMYHS7QS.js +1033 -0
- package/dist/ncaa_mhockey-TXTKWHE3.js +115 -0
- package/dist/ncaa_mhockey-U3MFW5VT.js +663 -0
- package/dist/ncaa_softball-6WR6KS64.js +420 -0
- package/dist/ncaa_softball-RZCTIE56.js +2654 -0
- package/dist/ncaa_softball-VOD4PVGY.js +4599 -0
- package/dist/ncaa_whockey-6XXGUTBK.js +607 -0
- package/dist/ncaa_whockey-AKKYKY67.js +53 -0
- package/dist/ncaa_whockey-KBEKXFBB.js +293 -0
- package/dist/nfl-BDB2HYAR.js +625 -0
- package/dist/nfl-EHYHDLJD.js +37 -0
- package/dist/nfl-VF4NJCHY.js +514 -0
- package/dist/nfl_gsis-UY64JO37.js +4 -0
- package/dist/nhl-6WPHME7H.js +511 -0
- package/dist/nhl-EMIJFZHY.js +884 -0
- package/dist/nhl-ISFUKRFU.js +37 -0
- package/dist/ohl-2FEM554G.js +113 -0
- package/dist/ohl-C5Q4W6JB.js +32 -0
- package/dist/ohl-TQ4J46VC.js +66 -0
- package/dist/phf-H7POU2KW.js +32 -0
- package/dist/phf-K5IFMZUM.js +13 -0
- package/dist/phf-TWJI3BOW.js +20 -0
- package/dist/plot.d.ts +449 -0
- package/dist/plot.js +711 -0
- package/dist/plot.js.map +1 -0
- package/dist/plotly.d.ts +129 -0
- package/dist/plotly.js +360 -0
- package/dist/plotly.js.map +1 -0
- package/dist/pwhl-OX3BO4JI.js +53 -0
- package/dist/pwhl-W44OC3C6.js +17 -0
- package/dist/pwhl-ZJGG3H7W.js +23 -0
- package/dist/qmjhl-5HISEHLL.js +35 -0
- package/dist/qmjhl-DA3UHKE5.js +125 -0
- package/dist/qmjhl-YG4BOQPF.js +614 -0
- package/dist/react.d.ts +101 -0
- package/dist/react.js +164 -0
- package/dist/react.js.map +1 -0
- package/dist/resolve-CQW-jzvr.d.ts +28 -0
- package/dist/selection-D4T3PkRt.d.ts +140 -0
- package/dist/shots.d.ts +364 -0
- package/dist/shots.js +85 -0
- package/dist/shots.js.map +1 -0
- package/dist/soccer-7BH3ZLVL.js +7898 -0
- package/dist/soccer-MRU25OGE.js +2636 -0
- package/dist/soccer-PF4IPPVA.js +12342 -0
- package/dist/surfaces-ChaD9nei.d.ts +38 -0
- package/dist/testing.d.ts +75 -0
- package/dist/testing.js +240 -0
- package/dist/testing.js.map +1 -0
- package/dist/tiers-B6pUBPcE.d.ts +93 -0
- package/dist/types-C7n6gJF3.d.ts +62 -0
- package/dist/ufl-7VLZTLTT.js +143 -0
- package/dist/ufl-CCMBLPSW.js +100 -0
- package/dist/ufl-F2BJRXME.js +16 -0
- package/dist/usfl-4CR5RMZJ.js +32 -0
- package/dist/usfl-LD7HP2YK.js +14 -0
- package/dist/usfl-VU4YSJQD.js +19 -0
- package/dist/ushl-CPG2LB4L.js +73 -0
- package/dist/ushl-PQL6HJAD.js +88 -0
- package/dist/ushl-ZT2ATPHK.js +22 -0
- package/dist/vega.d.ts +85 -0
- package/dist/vega.js +362 -0
- package/dist/vega.js.map +1 -0
- package/dist/wbb-3KHCDYTK.js +5087 -0
- package/dist/wbb-BMX53Q3Q.js +369 -0
- package/dist/wbb-QNRN2CJJ.js +3620 -0
- package/dist/whl-4ATYZWUB.js +97 -0
- package/dist/whl-RVFPL6MH.js +79 -0
- package/dist/whl-Y7ASKYMM.js +28 -0
- package/dist/wnba-FWX5SFVI.js +232 -0
- package/dist/wnba-GX6HZR4B.js +220 -0
- package/dist/wnba-NTMWIPP6.js +20 -0
- package/dist/xfl-43R2JMJK.js +30 -0
- package/dist/xfl-H3BXQPZZ.js +16 -0
- package/dist/xfl-XON7A7FI.js +69 -0
- package/package.json +154 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as Plot from '@observablehq/plot';
|
|
2
|
+
import { L as League, S as SeasonInput, V as Variant, M as MarkType, I as IdSystem } from './types-C7n6gJF3.js';
|
|
3
|
+
|
|
4
|
+
type Axis = "x" | "y" | "fx" | "fy";
|
|
5
|
+
/**
|
|
6
|
+
* Plot's axis options sdvplot does not own pass through: `ticks`, `tickSpacing`, `tickPadding`, `tickRotate`,
|
|
7
|
+
* `fontSize`, `fill`, `ariaLabel`, `ariaDescription`, `facetAnchor`, `className`, the margins, and the rest. A
|
|
8
|
+
* `render` you pass wraps sdvplot's (it sees the images). sdvplot owns `tickFormat` (the tick text becomes the
|
|
9
|
+
* image); `anchor`, `tickSize` and `label` are sdvplot's own options below.
|
|
10
|
+
*/
|
|
11
|
+
type AxisPassThrough = Omit<Plot.AxisXOptions, "tickFormat" | "anchor" | "tickSize" | "label">;
|
|
12
|
+
/**
|
|
13
|
+
* Options for `axisLogos`. Each drawn image is named by the tick it replaces ("KC logo", "KC wordmark"), so assistive
|
|
14
|
+
* technology reads the category the text showed. The images are sized by `height` (a fraction of the frame); a caller
|
|
15
|
+
* margin on the anchored side smaller than the computed one can clip them.
|
|
16
|
+
*/
|
|
17
|
+
interface AxisLogosOptions extends AxisPassThrough {
|
|
18
|
+
league: League;
|
|
19
|
+
season?: SeasonInput;
|
|
20
|
+
/** Fraction of the frame height in (0, 1]; default 0.1. */
|
|
21
|
+
height?: number;
|
|
22
|
+
variant?: Variant;
|
|
23
|
+
markType?: MarkType;
|
|
24
|
+
idSystem?: IdSystem;
|
|
25
|
+
anchor?: "top" | "bottom" | "left" | "right";
|
|
26
|
+
tickSize?: number;
|
|
27
|
+
label?: string | null;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Axis mark whose tick text is swapped for the team image; categories that do not resolve keep their text.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* import * as Plot from "@observablehq/plot";
|
|
35
|
+
* import { loadLeague } from "@sportsdataverse/sdvplot";
|
|
36
|
+
* import { axisLogos } from "@sportsdataverse/sdvplot/plot";
|
|
37
|
+
*
|
|
38
|
+
* await loadLeague("nfl");
|
|
39
|
+
* const wins = [
|
|
40
|
+
* { team: "KC", wins: 15 },
|
|
41
|
+
* { team: "BUF", wins: 13 },
|
|
42
|
+
* { team: "LAC", wins: 11 },
|
|
43
|
+
* ];
|
|
44
|
+
* Plot.plot({ marks: [Plot.barY(wins, { x: "team", y: "wins" }), axisLogos("x", { league: "nfl" })] });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare function axisLogos(axis: Axis, o: AxisLogosOptions): Plot.Markish;
|
|
48
|
+
|
|
49
|
+
export { type Axis as A, type AxisLogosOptions as a, type AxisPassThrough as b, axisLogos as c };
|
package/dist/bins.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/** One bin of either shape (`hexbin`, `squarebin`): the points in it, plus its centre in the points' own units. */
|
|
2
|
+
type BinOf<T> = T[] & {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Bin points into pointy-top hexagons of circumradius `radius`, in the points' OWN units (data space, not
|
|
8
|
+
* pixels). Points with a NaN coordinate are skipped. Centres of `-0` are folded to `0` (blazing-the-nets
|
|
9
|
+
* `main` `lib/data/aggregate.ts:101`), so equal hexes share one key. Throws `InputError` unless `radius` is a finite
|
|
10
|
+
* number greater than 0.
|
|
11
|
+
*
|
|
12
|
+
* Each point goes to the centre upstream d3-hexbin picks, which is close to but not exactly the nearest one: it
|
|
13
|
+
* compares two candidates' squared distances in lattice units (x over √3·radius, y over 1.5·radius; `:43`), so
|
|
14
|
+
* about 1-2% of points sit just outside the hexagon drawn for their bin (on the real BKN fixture, 22 of 2000 shots
|
|
15
|
+
* at radius 10 and 37 of 2000 at radius 15). That is faithful to d3-hexbin and to blazing-the-nets, which draw the
|
|
16
|
+
* same; do not "fix" it. Squares (`squarebin`) contain every point they bin.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* import { hexbin } from "@sportsdataverse/sdvplot/bins";
|
|
21
|
+
*
|
|
22
|
+
* // three Brooklyn shots of 2025-26 in tenths of a foot from the hoop (sportsdataverse-data nba_stats_shots): the
|
|
23
|
+
* // two at the rim share a 1 ft hexagon, so this is 2
|
|
24
|
+
* const shots = [
|
|
25
|
+
* { x_legacy: 0, y_legacy: 0 },
|
|
26
|
+
* { x_legacy: -1, y_legacy: 7 },
|
|
27
|
+
* { x_legacy: -44, y_legacy: 252 },
|
|
28
|
+
* ];
|
|
29
|
+
* hexbin(shots, { radius: 10, x: (s) => s.x_legacy, y: (s) => s.y_legacy }).length;
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
declare function hexbin<T>(points: readonly T[], o: {
|
|
33
|
+
radius: number;
|
|
34
|
+
x: (p: T) => number;
|
|
35
|
+
y: (p: T) => number;
|
|
36
|
+
}): BinOf<T>[];
|
|
37
|
+
/**
|
|
38
|
+
* An SVG path for a hexagon of circumradius `r` centred on the current point, byte-identical to d3-hexbin's
|
|
39
|
+
* `hexbin.hexagon(r)`: `selection.attr("transform", translate(cx, cy)).attr("d", hexagonPath(r))`.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* import { hexagonPath } from "@sportsdataverse/sdvplot/bins";
|
|
44
|
+
*
|
|
45
|
+
* hexagonPath(10);
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
declare function hexagonPath(r: number): string;
|
|
49
|
+
|
|
50
|
+
/** The cell shape of a lattice. */
|
|
51
|
+
type BinShape = "hex" | "square";
|
|
52
|
+
/**
|
|
53
|
+
* A cell lattice as plain JSON: pointy-top hexagons of circumradius `radius` (d3-hexbin's), squares of side `side`,
|
|
54
|
+
* or (`equalArea: true`) the square with the same area as a hexagon of circumradius `radius`.
|
|
55
|
+
*/
|
|
56
|
+
type BinnerOptions = {
|
|
57
|
+
readonly shape?: "hex";
|
|
58
|
+
readonly radius: number;
|
|
59
|
+
} | {
|
|
60
|
+
readonly shape: "square";
|
|
61
|
+
readonly side: number;
|
|
62
|
+
} | {
|
|
63
|
+
readonly shape: "square";
|
|
64
|
+
readonly radius: number;
|
|
65
|
+
readonly equalArea: true;
|
|
66
|
+
};
|
|
67
|
+
/** A lattice with `equalArea` resolved: what an index stores so a later binning reproduces the same cells. */
|
|
68
|
+
type Lattice = {
|
|
69
|
+
readonly shape?: "hex";
|
|
70
|
+
readonly radius: number;
|
|
71
|
+
} | {
|
|
72
|
+
readonly shape: "square";
|
|
73
|
+
readonly side: number;
|
|
74
|
+
};
|
|
75
|
+
/** One lattice, either shape. */
|
|
76
|
+
interface Binner {
|
|
77
|
+
/** `"hex"` or `"square"`. */
|
|
78
|
+
readonly shape: BinShape;
|
|
79
|
+
/** The full cell size in the points' units: the hexagon's circumradius, or the square's side. */
|
|
80
|
+
readonly size: number;
|
|
81
|
+
/** The resolved options: `{ radius }` for hexagons, `{ shape: "square", side }` for squares. */
|
|
82
|
+
readonly lattice: Lattice;
|
|
83
|
+
/** Bin points (`hexbin` or `squarebin`). */
|
|
84
|
+
bins<T>(points: readonly T[], o: {
|
|
85
|
+
x: (p: T) => number;
|
|
86
|
+
y: (p: T) => number;
|
|
87
|
+
}): BinOf<T>[];
|
|
88
|
+
/** An SVG path for one cell of size `s` (default `size`) centred on the current point. */
|
|
89
|
+
cell(s?: number): string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Bin points into axis-aligned squares of side `side`, in the points' OWN units. As in d3-hexbin's lattice, a cell
|
|
93
|
+
* is centred on the origin, so centres are `(i·side, j·side)`. Cells are half-open, `[c − side/2, c + side/2)` on
|
|
94
|
+
* each axis: a point exactly on an edge goes to the higher cell, because the cell index is `Math.round(x / side)`,
|
|
95
|
+
* the rounding d3-hexbin uses (`hexbin.js:33-34`). Bins come out in first-seen order; points with a NaN coordinate
|
|
96
|
+
* are skipped; centres of `-0` fold to `0`. Throws `InputError` unless `side` is a finite number greater than 0.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* import { squarebin } from "@sportsdataverse/sdvplot/bins";
|
|
101
|
+
*
|
|
102
|
+
* // three Brooklyn shots of 2025-26 (sportsdataverse-data nba_stats_shots); x = 5 sits on a cell edge and goes to
|
|
103
|
+
* // the higher cell: [[0, 0, 1], [0, 10, 1], [10, 90, 1]]
|
|
104
|
+
* const shots = [
|
|
105
|
+
* { x_legacy: 0, y_legacy: 0 },
|
|
106
|
+
* { x_legacy: -1, y_legacy: 7 },
|
|
107
|
+
* { x_legacy: 5, y_legacy: 91 },
|
|
108
|
+
* ];
|
|
109
|
+
* squarebin(shots, { side: 10, x: (s) => s.x_legacy, y: (s) => s.y_legacy }).map((b) => [b.x, b.y, b.length]);
|
|
110
|
+
* ```
|
|
111
|
+
*/
|
|
112
|
+
declare function squarebin<T>(points: readonly T[], o: {
|
|
113
|
+
side: number;
|
|
114
|
+
x: (p: T) => number;
|
|
115
|
+
y: (p: T) => number;
|
|
116
|
+
}): BinOf<T>[];
|
|
117
|
+
/**
|
|
118
|
+
* An SVG path for a square of side `s` centred on the current point, drawn the way `hexagonPath` is:
|
|
119
|
+
* `selection.attr("transform", translate(cx, cy)).attr("d", squarePath(s))`.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```ts
|
|
123
|
+
* import { squarePath } from "@sportsdataverse/sdvplot/bins";
|
|
124
|
+
*
|
|
125
|
+
* squarePath(10); // "m-5,-5h10v10h-10z"
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
declare function squarePath(s: number): string;
|
|
129
|
+
/**
|
|
130
|
+
* A cell's vertices around (0, 0), in the points' units: a hexagon of circumradius `size` (d3-hexbin's vertex
|
|
131
|
+
* order) or a square of side `size`. Add a bin's centre to each to outline that cell as a polygon.
|
|
132
|
+
*
|
|
133
|
+
* @example
|
|
134
|
+
* ```ts
|
|
135
|
+
* import { cellPoints } from "@sportsdataverse/sdvplot/bins";
|
|
136
|
+
*
|
|
137
|
+
* cellPoints("square", 10); // [[-5, -5], [5, -5], [5, 5], [-5, 5]]
|
|
138
|
+
* ```
|
|
139
|
+
*/
|
|
140
|
+
declare function cellPoints(shape: BinShape, size: number): [number, number][];
|
|
141
|
+
/**
|
|
142
|
+
* A cell's relative SVG path, `hexagonPath(size)` or `squarePath(size)`, drawn with a `translate` to each bin centre.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```ts
|
|
146
|
+
* import { cellPath } from "@sportsdataverse/sdvplot/bins";
|
|
147
|
+
*
|
|
148
|
+
* cellPath("square", 10); // "m-5,-5h10v10h-10z"
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
declare function cellPath(shape: BinShape, size: number): string;
|
|
152
|
+
/**
|
|
153
|
+
* One binning API for both lattices: `binner({ radius: 15 })` is d3-hexbin's, `binner({ shape: "square", side: 15 })`
|
|
154
|
+
* squares, and `binner({ shape: "square", radius: 15, equalArea: true })` squares of side 15·√(3√3/2) ≈ 24.18,
|
|
155
|
+
* each the area of a radius-15 hexagon. Works on any x/y data, not just shots. Throws `InputError` on an unknown
|
|
156
|
+
* `shape` or a size that is not a positive finite number, naming the option passed.
|
|
157
|
+
*
|
|
158
|
+
* @example
|
|
159
|
+
* ```ts
|
|
160
|
+
* import { binner } from "@sportsdataverse/sdvplot/bins";
|
|
161
|
+
*
|
|
162
|
+
* const b = binner({ shape: "square", radius: 10, equalArea: true }); // side 16.1185…: a radius-10 hexagon's area
|
|
163
|
+
* // three Brooklyn shots of 2025-26 (sportsdataverse-data nba_stats_shots): the two at the rim share a square
|
|
164
|
+
* const shots = [
|
|
165
|
+
* { x_legacy: 0, y_legacy: 0 },
|
|
166
|
+
* { x_legacy: -1, y_legacy: 7 },
|
|
167
|
+
* { x_legacy: -44, y_legacy: 252 },
|
|
168
|
+
* ];
|
|
169
|
+
* b.bins(shots, { x: (s) => s.x_legacy, y: (s) => s.y_legacy }).map((c) => [c.x, c.y, c.length]);
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
declare function binner(o: BinnerOptions): Binner;
|
|
173
|
+
|
|
174
|
+
export { type BinOf, type BinShape, type Binner, type BinnerOptions, type Lattice, binner, cellPath, cellPoints, hexagonPath, hexbin, squarePath, squarebin };
|
package/dist/bins.js
ADDED
package/dist/bins.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"bins.js"}
|