@ggterm/core 0.2.7 → 0.2.10
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/dist/cli-plot.js +387 -6
- package/dist/cli.js +378 -5
- package/dist/geoms/index.d.ts +1 -0
- package/dist/geoms/index.d.ts.map +1 -1
- package/dist/geoms/ridgeline.d.ts +52 -0
- package/dist/geoms/ridgeline.d.ts.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +382 -5
- package/dist/pipeline/pipeline.d.ts.map +1 -1
- package/dist/pipeline/render-geoms.d.ts +6 -0
- package/dist/pipeline/render-geoms.d.ts.map +1 -1
- package/dist/pipeline/scales.d.ts.map +1 -1
- package/dist/stats/density.d.ts +5 -0
- package/dist/stats/density.d.ts.map +1 -1
- package/dist/stats/density2d.d.ts +36 -0
- package/dist/stats/density2d.d.ts.map +1 -0
- package/dist/stats/index.d.ts +3 -1
- package/dist/stats/index.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -651,7 +651,7 @@ function isCategoricalField(data, field) {
|
|
|
651
651
|
for (const row of data) {
|
|
652
652
|
const value = row[field];
|
|
653
653
|
if (value !== null && value !== undefined) {
|
|
654
|
-
if (typeof value === "string"
|
|
654
|
+
if (typeof value === "string") {
|
|
655
655
|
return true;
|
|
656
656
|
}
|
|
657
657
|
}
|
|
@@ -1048,6 +1048,44 @@ function getPointColor(row, aes, colorScale) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
return DEFAULT_POINT_COLOR;
|
|
1050
1050
|
}
|
|
1051
|
+
function parseColorToRgba(color, fallback = { r: 128, g: 128, b: 128, a: 1 }) {
|
|
1052
|
+
if (!color)
|
|
1053
|
+
return fallback;
|
|
1054
|
+
if (typeof color === "object" && color !== null && "r" in color) {
|
|
1055
|
+
return color;
|
|
1056
|
+
}
|
|
1057
|
+
if (typeof color === "string") {
|
|
1058
|
+
if (color.startsWith("#")) {
|
|
1059
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(color);
|
|
1060
|
+
if (result) {
|
|
1061
|
+
return {
|
|
1062
|
+
r: parseInt(result[1], 16),
|
|
1063
|
+
g: parseInt(result[2], 16),
|
|
1064
|
+
b: parseInt(result[3], 16),
|
|
1065
|
+
a: 1
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
const namedColors = {
|
|
1070
|
+
red: { r: 255, g: 0, b: 0, a: 1 },
|
|
1071
|
+
blue: { r: 0, g: 0, b: 255, a: 1 },
|
|
1072
|
+
green: { r: 0, g: 128, b: 0, a: 1 },
|
|
1073
|
+
black: { r: 0, g: 0, b: 0, a: 1 },
|
|
1074
|
+
white: { r: 255, g: 255, b: 255, a: 1 },
|
|
1075
|
+
gray: { r: 128, g: 128, b: 128, a: 1 },
|
|
1076
|
+
grey: { r: 128, g: 128, b: 128, a: 1 },
|
|
1077
|
+
yellow: { r: 255, g: 255, b: 0, a: 1 },
|
|
1078
|
+
orange: { r: 255, g: 165, b: 0, a: 1 },
|
|
1079
|
+
purple: { r: 128, g: 0, b: 128, a: 1 },
|
|
1080
|
+
cyan: { r: 0, g: 255, b: 255, a: 1 },
|
|
1081
|
+
magenta: { r: 255, g: 0, b: 255, a: 1 }
|
|
1082
|
+
};
|
|
1083
|
+
const named = namedColors[color.toLowerCase()];
|
|
1084
|
+
if (named)
|
|
1085
|
+
return named;
|
|
1086
|
+
}
|
|
1087
|
+
return fallback;
|
|
1088
|
+
}
|
|
1051
1089
|
function renderGeomPoint(data, geom, aes, scales, canvas) {
|
|
1052
1090
|
const defaultShape = getPointShape(geom.params.shape);
|
|
1053
1091
|
const positionType = getPositionType(geom.position);
|
|
@@ -1446,7 +1484,7 @@ function renderGeomHLine(_data, geom, _aes, scales, canvas) {
|
|
|
1446
1484
|
if (yintercept === undefined)
|
|
1447
1485
|
return;
|
|
1448
1486
|
const cy = Math.round(scales.y.map(yintercept));
|
|
1449
|
-
const color = geom.params.color
|
|
1487
|
+
const color = parseColorToRgba(geom.params.color);
|
|
1450
1488
|
const startX = Math.round(scales.x.range[0]);
|
|
1451
1489
|
const endX = Math.round(scales.x.range[1]);
|
|
1452
1490
|
canvas.drawHLine(startX, cy, endX - startX + 1, "─", color);
|
|
@@ -1456,7 +1494,7 @@ function renderGeomVLine(_data, geom, _aes, scales, canvas) {
|
|
|
1456
1494
|
if (xintercept === undefined)
|
|
1457
1495
|
return;
|
|
1458
1496
|
const cx = Math.round(scales.x.map(xintercept));
|
|
1459
|
-
const color = geom.params.color
|
|
1497
|
+
const color = parseColorToRgba(geom.params.color);
|
|
1460
1498
|
const startY = Math.round(Math.min(scales.y.range[0], scales.y.range[1]));
|
|
1461
1499
|
const endY = Math.round(Math.max(scales.y.range[0], scales.y.range[1]));
|
|
1462
1500
|
canvas.drawVLine(cx, startY, endY - startY + 1, "│", color);
|
|
@@ -1767,6 +1805,120 @@ function renderGeomViolin(data, geom, _aes, scales, canvas) {
|
|
|
1767
1805
|
}
|
|
1768
1806
|
}
|
|
1769
1807
|
}
|
|
1808
|
+
function renderGeomRidgeline(data, geom, aes, scales, canvas) {
|
|
1809
|
+
const scaleFactor = geom.params.scale ?? 0.9;
|
|
1810
|
+
const alpha = geom.params.alpha ?? 0.8;
|
|
1811
|
+
const showOutline = geom.params.outline ?? true;
|
|
1812
|
+
const fixedFill = geom.params.fill;
|
|
1813
|
+
const fixedColor = geom.params.color;
|
|
1814
|
+
const plotLeft = Math.round(scales.x.range[0]);
|
|
1815
|
+
const plotRight = Math.round(scales.x.range[1]);
|
|
1816
|
+
const plotTop = Math.round(Math.min(scales.y.range[0], scales.y.range[1]));
|
|
1817
|
+
const plotBottom = Math.round(Math.max(scales.y.range[0], scales.y.range[1]));
|
|
1818
|
+
const groups = new Map;
|
|
1819
|
+
const groupKeys = [];
|
|
1820
|
+
for (const row of data) {
|
|
1821
|
+
const key = String(row.y ?? "default");
|
|
1822
|
+
if (!groups.has(key)) {
|
|
1823
|
+
groups.set(key, { data: [], index: Number(row.yIndex) ?? groupKeys.length });
|
|
1824
|
+
groupKeys.push(key);
|
|
1825
|
+
}
|
|
1826
|
+
groups.get(key).data.push(row);
|
|
1827
|
+
}
|
|
1828
|
+
const numGroups = groupKeys.length;
|
|
1829
|
+
if (numGroups === 0)
|
|
1830
|
+
return;
|
|
1831
|
+
const plotHeight = Math.abs(plotBottom - plotTop);
|
|
1832
|
+
const ridgeBaseHeight = plotHeight / numGroups;
|
|
1833
|
+
const defaultColors = [
|
|
1834
|
+
{ r: 79, g: 169, b: 238, a: 1 },
|
|
1835
|
+
{ r: 238, g: 136, b: 102, a: 1 },
|
|
1836
|
+
{ r: 102, g: 204, b: 153, a: 1 },
|
|
1837
|
+
{ r: 204, g: 102, b: 204, a: 1 },
|
|
1838
|
+
{ r: 255, g: 200, b: 87, a: 1 },
|
|
1839
|
+
{ r: 138, g: 201, b: 222, a: 1 },
|
|
1840
|
+
{ r: 255, g: 153, b: 153, a: 1 },
|
|
1841
|
+
{ r: 170, g: 170, b: 170, a: 1 }
|
|
1842
|
+
];
|
|
1843
|
+
let parsedFillColor = null;
|
|
1844
|
+
if (fixedFill) {
|
|
1845
|
+
parsedFillColor = parseColorToRgba(fixedFill);
|
|
1846
|
+
}
|
|
1847
|
+
const sortedKeys = [...groupKeys].sort((a, b) => {
|
|
1848
|
+
const idxA = groups.get(a)?.index ?? 0;
|
|
1849
|
+
const idxB = groups.get(b)?.index ?? 0;
|
|
1850
|
+
return idxB - idxA;
|
|
1851
|
+
});
|
|
1852
|
+
for (const groupKey of sortedKeys) {
|
|
1853
|
+
const group = groups.get(groupKey);
|
|
1854
|
+
if (!group)
|
|
1855
|
+
continue;
|
|
1856
|
+
const groupIndex = group.index;
|
|
1857
|
+
const groupData = group.data;
|
|
1858
|
+
const sorted = [...groupData].sort((a, b) => {
|
|
1859
|
+
const ax = Number(a.x) || 0;
|
|
1860
|
+
const bx = Number(b.x) || 0;
|
|
1861
|
+
return ax - bx;
|
|
1862
|
+
});
|
|
1863
|
+
if (sorted.length < 2)
|
|
1864
|
+
continue;
|
|
1865
|
+
const baseline = plotTop + (groupIndex + 0.5) * ridgeBaseHeight;
|
|
1866
|
+
let fillColor;
|
|
1867
|
+
if (parsedFillColor) {
|
|
1868
|
+
fillColor = parsedFillColor;
|
|
1869
|
+
} else if ((aes.fill || aes.color) && scales.color) {
|
|
1870
|
+
const mappedColor = scales.color.map(groupKey);
|
|
1871
|
+
if (typeof mappedColor === "object" && "r" in mappedColor) {
|
|
1872
|
+
fillColor = mappedColor;
|
|
1873
|
+
} else {
|
|
1874
|
+
fillColor = defaultColors[groupIndex % defaultColors.length];
|
|
1875
|
+
}
|
|
1876
|
+
} else {
|
|
1877
|
+
fillColor = defaultColors[groupIndex % defaultColors.length];
|
|
1878
|
+
}
|
|
1879
|
+
const alphaFillColor = {
|
|
1880
|
+
r: Math.round(fillColor.r * alpha + 255 * (1 - alpha) * 0.1),
|
|
1881
|
+
g: Math.round(fillColor.g * alpha + 255 * (1 - alpha) * 0.1),
|
|
1882
|
+
b: Math.round(fillColor.b * alpha + 255 * (1 - alpha) * 0.1),
|
|
1883
|
+
a: 1
|
|
1884
|
+
};
|
|
1885
|
+
const maxRidgeHeight = ridgeBaseHeight * scaleFactor * 1.5;
|
|
1886
|
+
const outlinePoints = [];
|
|
1887
|
+
for (const row of sorted) {
|
|
1888
|
+
const xVal = Number(row.x);
|
|
1889
|
+
const scaled = Number(row.scaled) || 0;
|
|
1890
|
+
const px = Math.round(scales.x.map(xVal));
|
|
1891
|
+
const ridgeHeight = scaled * maxRidgeHeight;
|
|
1892
|
+
const py = Math.round(baseline - ridgeHeight);
|
|
1893
|
+
if (px < plotLeft || px > plotRight)
|
|
1894
|
+
continue;
|
|
1895
|
+
const fillTop = Math.max(plotTop, py);
|
|
1896
|
+
const fillBottom = Math.min(plotBottom, Math.round(baseline));
|
|
1897
|
+
for (let y = fillTop;y <= fillBottom; y++) {
|
|
1898
|
+
canvas.drawChar(px, y, "█", alphaFillColor);
|
|
1899
|
+
}
|
|
1900
|
+
if (showOutline) {
|
|
1901
|
+
outlinePoints.push({ x: px, y: Math.max(plotTop, py) });
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
if (showOutline && outlinePoints.length > 1) {
|
|
1905
|
+
const outlineColor = fixedColor ? parseColorToRgba(fixedColor) : { r: Math.min(255, fillColor.r + 40), g: Math.min(255, fillColor.g + 40), b: Math.min(255, fillColor.b + 40), a: 1 };
|
|
1906
|
+
for (let i = 0;i < outlinePoints.length - 1; i++) {
|
|
1907
|
+
const p1 = outlinePoints[i];
|
|
1908
|
+
const p2 = outlinePoints[i + 1];
|
|
1909
|
+
if (Math.abs(p2.x - p1.x) <= 1) {
|
|
1910
|
+
if (p1.y >= plotTop && p1.y <= plotBottom) {
|
|
1911
|
+
canvas.drawChar(p1.x, p1.y, "▄", outlineColor);
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
const last = outlinePoints[outlinePoints.length - 1];
|
|
1916
|
+
if (last.y >= plotTop && last.y <= plotBottom) {
|
|
1917
|
+
canvas.drawChar(last.x, last.y, "▄", outlineColor);
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1770
1922
|
function renderGeomTile(data, geom, aes, scales, canvas) {
|
|
1771
1923
|
const alpha = geom.params.alpha ?? 1;
|
|
1772
1924
|
const plotLeft = Math.round(scales.x.range[0]);
|
|
@@ -2015,7 +2167,7 @@ function renderGeomAbline(_data, geom, _aes, scales, canvas) {
|
|
|
2015
2167
|
const intercept = geom.params.intercept ?? 0;
|
|
2016
2168
|
const linetype = geom.params.linetype ?? "solid";
|
|
2017
2169
|
const lineChar = linetype === "dotted" ? "·" : linetype === "dashed" ? "╌" : "─";
|
|
2018
|
-
const color = geom.params.color
|
|
2170
|
+
const color = parseColorToRgba(geom.params.color);
|
|
2019
2171
|
const plotLeft = Math.round(scales.x.range[0]);
|
|
2020
2172
|
const plotRight = Math.round(scales.x.range[1]);
|
|
2021
2173
|
const plotTop = Math.round(Math.min(scales.y.range[0], scales.y.range[1]));
|
|
@@ -2205,6 +2357,10 @@ function renderGeom(data, geom, aes, scales, canvas, coordType) {
|
|
|
2205
2357
|
case "violin":
|
|
2206
2358
|
renderGeomViolin(data, geom, aes, scales, canvas);
|
|
2207
2359
|
break;
|
|
2360
|
+
case "ridgeline":
|
|
2361
|
+
case "joy":
|
|
2362
|
+
renderGeomRidgeline(data, geom, aes, scales, canvas);
|
|
2363
|
+
break;
|
|
2208
2364
|
case "tile":
|
|
2209
2365
|
case "raster":
|
|
2210
2366
|
case "bin2d":
|
|
@@ -3313,6 +3469,52 @@ function stat_ydensity(params = {}) {
|
|
|
3313
3469
|
}
|
|
3314
3470
|
};
|
|
3315
3471
|
}
|
|
3472
|
+
function stat_xdensity(params = {}) {
|
|
3473
|
+
return {
|
|
3474
|
+
type: "xdensity",
|
|
3475
|
+
compute(data, aes) {
|
|
3476
|
+
const groups = new Map;
|
|
3477
|
+
const groupOrder = [];
|
|
3478
|
+
for (const row of data) {
|
|
3479
|
+
const groupKey = String(row[aes.y] ?? "default");
|
|
3480
|
+
const xVal = row[aes.x];
|
|
3481
|
+
if (xVal === null || xVal === undefined)
|
|
3482
|
+
continue;
|
|
3483
|
+
const numX = Number(xVal);
|
|
3484
|
+
if (isNaN(numX))
|
|
3485
|
+
continue;
|
|
3486
|
+
if (!groups.has(groupKey)) {
|
|
3487
|
+
groups.set(groupKey, []);
|
|
3488
|
+
groupOrder.push(groupKey);
|
|
3489
|
+
}
|
|
3490
|
+
groups.get(groupKey).push(numX);
|
|
3491
|
+
}
|
|
3492
|
+
const result = [];
|
|
3493
|
+
let groupIndex = 0;
|
|
3494
|
+
for (const groupKey of groupOrder) {
|
|
3495
|
+
const xValues = groups.get(groupKey);
|
|
3496
|
+
if (xValues.length < 2) {
|
|
3497
|
+
groupIndex++;
|
|
3498
|
+
continue;
|
|
3499
|
+
}
|
|
3500
|
+
const tempData = xValues.map((v) => ({ x: v }));
|
|
3501
|
+
const densityResult = computeDensity(tempData, "x", params);
|
|
3502
|
+
for (const d of densityResult) {
|
|
3503
|
+
result.push({
|
|
3504
|
+
x: d.x,
|
|
3505
|
+
y: groupKey,
|
|
3506
|
+
yIndex: groupIndex,
|
|
3507
|
+
density: d.density,
|
|
3508
|
+
scaled: d.scaled,
|
|
3509
|
+
height: d.scaled
|
|
3510
|
+
});
|
|
3511
|
+
}
|
|
3512
|
+
groupIndex++;
|
|
3513
|
+
}
|
|
3514
|
+
return result;
|
|
3515
|
+
}
|
|
3516
|
+
};
|
|
3517
|
+
}
|
|
3316
3518
|
|
|
3317
3519
|
// src/stats/smooth.ts
|
|
3318
3520
|
function linearRegression(xs, ys) {
|
|
@@ -3790,6 +3992,124 @@ function stat_qq_line(params = {}) {
|
|
|
3790
3992
|
};
|
|
3791
3993
|
}
|
|
3792
3994
|
|
|
3995
|
+
// src/stats/density2d.ts
|
|
3996
|
+
function gaussian2d(dx, dy, hx, hy) {
|
|
3997
|
+
const ux = dx / hx;
|
|
3998
|
+
const uy = dy / hy;
|
|
3999
|
+
return Math.exp(-0.5 * (ux * ux + uy * uy)) / (2 * Math.PI * hx * hy);
|
|
4000
|
+
}
|
|
4001
|
+
function scottBandwidth2d(values) {
|
|
4002
|
+
const n = values.length;
|
|
4003
|
+
if (n < 2)
|
|
4004
|
+
return 1;
|
|
4005
|
+
const mean = values.reduce((a, b) => a + b, 0) / n;
|
|
4006
|
+
const variance = values.reduce((sum, v) => sum + (v - mean) ** 2, 0) / (n - 1);
|
|
4007
|
+
const std = Math.sqrt(variance);
|
|
4008
|
+
return std * Math.pow(n, -1 / 6);
|
|
4009
|
+
}
|
|
4010
|
+
function computeDensity2d(data, xField, yField, params = {}) {
|
|
4011
|
+
const points = [];
|
|
4012
|
+
const xValues = [];
|
|
4013
|
+
const yValues = [];
|
|
4014
|
+
for (const row of data) {
|
|
4015
|
+
const xVal = row[xField];
|
|
4016
|
+
const yVal = row[yField];
|
|
4017
|
+
if (xVal === null || xVal === undefined || yVal === null || yVal === undefined)
|
|
4018
|
+
continue;
|
|
4019
|
+
const x = Number(xVal);
|
|
4020
|
+
const y = Number(yVal);
|
|
4021
|
+
if (isNaN(x) || isNaN(y))
|
|
4022
|
+
continue;
|
|
4023
|
+
points.push({ x, y });
|
|
4024
|
+
xValues.push(x);
|
|
4025
|
+
yValues.push(y);
|
|
4026
|
+
}
|
|
4027
|
+
if (points.length < 3) {
|
|
4028
|
+
return [];
|
|
4029
|
+
}
|
|
4030
|
+
const n = params.n ?? 50;
|
|
4031
|
+
const nx = params.nx ?? n;
|
|
4032
|
+
const ny = params.ny ?? n;
|
|
4033
|
+
const adjust = params.adjust ?? 1;
|
|
4034
|
+
let hx, hy;
|
|
4035
|
+
if (Array.isArray(params.h)) {
|
|
4036
|
+
hx = params.h[0] * adjust;
|
|
4037
|
+
hy = params.h[1] * adjust;
|
|
4038
|
+
} else if (params.h !== undefined) {
|
|
4039
|
+
hx = params.h * adjust;
|
|
4040
|
+
hy = params.h * adjust;
|
|
4041
|
+
} else {
|
|
4042
|
+
hx = scottBandwidth2d(xValues) * adjust;
|
|
4043
|
+
hy = scottBandwidth2d(yValues) * adjust;
|
|
4044
|
+
}
|
|
4045
|
+
if (hx <= 0)
|
|
4046
|
+
hx = 1;
|
|
4047
|
+
if (hy <= 0)
|
|
4048
|
+
hy = 1;
|
|
4049
|
+
const xMin = Math.min(...xValues);
|
|
4050
|
+
const xMax = Math.max(...xValues);
|
|
4051
|
+
const yMin = Math.min(...yValues);
|
|
4052
|
+
const yMax = Math.max(...yValues);
|
|
4053
|
+
const xPad = 3 * hx;
|
|
4054
|
+
const yPad = 3 * hy;
|
|
4055
|
+
const gridXMin = xMin - xPad;
|
|
4056
|
+
const gridXMax = xMax + xPad;
|
|
4057
|
+
const gridYMin = yMin - yPad;
|
|
4058
|
+
const gridYMax = yMax + yPad;
|
|
4059
|
+
const xStep = (gridXMax - gridXMin) / (nx - 1);
|
|
4060
|
+
const yStep = (gridYMax - gridYMin) / (ny - 1);
|
|
4061
|
+
const results = [];
|
|
4062
|
+
const nPoints = points.length;
|
|
4063
|
+
for (let i = 0;i < nx; i++) {
|
|
4064
|
+
const gx = gridXMin + i * xStep;
|
|
4065
|
+
for (let j = 0;j < ny; j++) {
|
|
4066
|
+
const gy = gridYMin + j * yStep;
|
|
4067
|
+
let density = 0;
|
|
4068
|
+
for (const pt of points) {
|
|
4069
|
+
density += gaussian2d(gx - pt.x, gy - pt.y, hx, hy);
|
|
4070
|
+
}
|
|
4071
|
+
density /= nPoints;
|
|
4072
|
+
results.push({
|
|
4073
|
+
x: gx,
|
|
4074
|
+
y: gy,
|
|
4075
|
+
z: density,
|
|
4076
|
+
density,
|
|
4077
|
+
level: density
|
|
4078
|
+
});
|
|
4079
|
+
}
|
|
4080
|
+
}
|
|
4081
|
+
return results;
|
|
4082
|
+
}
|
|
4083
|
+
function stat_density_2d(params = {}) {
|
|
4084
|
+
return {
|
|
4085
|
+
type: "density_2d",
|
|
4086
|
+
compute(data, aes) {
|
|
4087
|
+
if (aes.color) {
|
|
4088
|
+
const groups = new Map;
|
|
4089
|
+
for (const row of data) {
|
|
4090
|
+
const group = String(row[aes.color] ?? "default");
|
|
4091
|
+
if (!groups.has(group)) {
|
|
4092
|
+
groups.set(group, []);
|
|
4093
|
+
}
|
|
4094
|
+
groups.get(group).push(row);
|
|
4095
|
+
}
|
|
4096
|
+
const result = [];
|
|
4097
|
+
for (const [group, groupData] of groups) {
|
|
4098
|
+
const density = computeDensity2d(groupData, aes.x, aes.y, params);
|
|
4099
|
+
for (const d of density) {
|
|
4100
|
+
result.push({
|
|
4101
|
+
...d,
|
|
4102
|
+
[aes.color]: group
|
|
4103
|
+
});
|
|
4104
|
+
}
|
|
4105
|
+
}
|
|
4106
|
+
return result;
|
|
4107
|
+
}
|
|
4108
|
+
return computeDensity2d(data, aes.x, aes.y, params);
|
|
4109
|
+
}
|
|
4110
|
+
};
|
|
4111
|
+
}
|
|
4112
|
+
|
|
3793
4113
|
// src/facets/index.ts
|
|
3794
4114
|
function as_labeller(labels) {
|
|
3795
4115
|
return (value) => labels[value] ?? value;
|
|
@@ -4067,6 +4387,14 @@ function applyStatTransform(data, geom, aes) {
|
|
|
4067
4387
|
adjust: geom.params.adjust
|
|
4068
4388
|
});
|
|
4069
4389
|
return ydensityStat.compute(data, aes);
|
|
4390
|
+
} else if (geom.stat === "xdensity") {
|
|
4391
|
+
const xdensityStat = stat_xdensity({
|
|
4392
|
+
bw: geom.params.bw,
|
|
4393
|
+
kernel: geom.params.kernel,
|
|
4394
|
+
n: geom.params.n,
|
|
4395
|
+
adjust: geom.params.adjust
|
|
4396
|
+
});
|
|
4397
|
+
return xdensityStat.compute(data, aes);
|
|
4070
4398
|
} else if (geom.stat === "smooth") {
|
|
4071
4399
|
const smoothStat = stat_smooth({
|
|
4072
4400
|
method: geom.params.method,
|
|
@@ -4108,6 +4436,15 @@ function applyStatTransform(data, geom, aes) {
|
|
|
4108
4436
|
drop: geom.params.drop
|
|
4109
4437
|
});
|
|
4110
4438
|
return bin2dStat.compute(data, aes);
|
|
4439
|
+
} else if (geom.stat === "density_2d") {
|
|
4440
|
+
const density2dStat = stat_density_2d({
|
|
4441
|
+
h: geom.params.bandwidth,
|
|
4442
|
+
n: geom.params.n,
|
|
4443
|
+
nx: geom.params.nx,
|
|
4444
|
+
ny: geom.params.ny,
|
|
4445
|
+
adjust: geom.params.adjust
|
|
4446
|
+
});
|
|
4447
|
+
return density2dStat.compute(data, aes);
|
|
4111
4448
|
}
|
|
4112
4449
|
return data;
|
|
4113
4450
|
}
|
|
@@ -4176,6 +4513,14 @@ function renderToCanvas(spec, options) {
|
|
|
4176
4513
|
scaleData = applyStatTransform(spec.data, geom, spec.aes);
|
|
4177
4514
|
scaleAes = { ...spec.aes, x: "x", y: "y", fill: "fill" };
|
|
4178
4515
|
break;
|
|
4516
|
+
} else if (geom.stat === "density_2d") {
|
|
4517
|
+
scaleData = applyStatTransform(spec.data, geom, spec.aes);
|
|
4518
|
+
scaleAes = { ...spec.aes, x: "x", y: "y" };
|
|
4519
|
+
break;
|
|
4520
|
+
} else if (geom.stat === "xdensity") {
|
|
4521
|
+
scaleData = applyStatTransform(spec.data, geom, spec.aes);
|
|
4522
|
+
scaleAes = { ...spec.aes, x: "x", y: "y" };
|
|
4523
|
+
break;
|
|
4179
4524
|
}
|
|
4180
4525
|
}
|
|
4181
4526
|
scaleData = applyCoordTransform(scaleData, scaleAes, spec.coord);
|
|
@@ -4212,6 +4557,10 @@ function renderToCanvas(spec, options) {
|
|
|
4212
4557
|
geomAes = { ...spec.aes, x: "x", y: "y", xend: "xend", yend: "yend" };
|
|
4213
4558
|
} else if (geom.stat === "bin2d") {
|
|
4214
4559
|
geomAes = { ...spec.aes, x: "x", y: "y", fill: "fill" };
|
|
4560
|
+
} else if (geom.stat === "density_2d") {
|
|
4561
|
+
geomAes = { ...spec.aes, x: "x", y: "y" };
|
|
4562
|
+
} else if (geom.stat === "xdensity") {
|
|
4563
|
+
geomAes = { ...spec.aes, x: "x", y: "y" };
|
|
4215
4564
|
}
|
|
4216
4565
|
geomData = applyCoordTransform(geomData, geomAes, spec.coord);
|
|
4217
4566
|
}
|
|
@@ -5134,8 +5483,32 @@ function geom_qq_line(options = {}) {
|
|
|
5134
5483
|
};
|
|
5135
5484
|
}
|
|
5136
5485
|
|
|
5486
|
+
// src/geoms/ridgeline.ts
|
|
5487
|
+
function geom_ridgeline(options = {}) {
|
|
5488
|
+
return {
|
|
5489
|
+
type: "ridgeline",
|
|
5490
|
+
stat: "xdensity",
|
|
5491
|
+
position: "identity",
|
|
5492
|
+
params: {
|
|
5493
|
+
scale: options.scale ?? 0.9,
|
|
5494
|
+
alpha: options.alpha ?? 0.8,
|
|
5495
|
+
fill: options.fill,
|
|
5496
|
+
color: options.color,
|
|
5497
|
+
adjust: options.adjust ?? 1,
|
|
5498
|
+
n: options.n ?? 128,
|
|
5499
|
+
outline: options.outline ?? true
|
|
5500
|
+
}
|
|
5501
|
+
};
|
|
5502
|
+
}
|
|
5503
|
+
var geom_joy;
|
|
5504
|
+
var init_ridgeline = __esm(() => {
|
|
5505
|
+
geom_joy = geom_ridgeline;
|
|
5506
|
+
});
|
|
5507
|
+
|
|
5137
5508
|
// src/geoms/index.ts
|
|
5138
|
-
var init_geoms = () => {
|
|
5509
|
+
var init_geoms = __esm(() => {
|
|
5510
|
+
init_ridgeline();
|
|
5511
|
+
});
|
|
5139
5512
|
|
|
5140
5513
|
// src/stats/index.ts
|
|
5141
5514
|
var init_stats = __esm(() => {
|
|
@@ -9644,6 +10017,7 @@ __export(exports_src, {
|
|
|
9644
10017
|
geom_smooth: () => geom_smooth,
|
|
9645
10018
|
geom_segment: () => geom_segment,
|
|
9646
10019
|
geom_rug: () => geom_rug,
|
|
10020
|
+
geom_ridgeline: () => geom_ridgeline,
|
|
9647
10021
|
geom_ribbon: () => geom_ribbon,
|
|
9648
10022
|
geom_rect: () => geom_rect,
|
|
9649
10023
|
geom_raster: () => geom_raster,
|
|
@@ -9655,6 +10029,7 @@ __export(exports_src, {
|
|
|
9655
10029
|
geom_linerange: () => geom_linerange,
|
|
9656
10030
|
geom_line: () => geom_line,
|
|
9657
10031
|
geom_label: () => geom_label,
|
|
10032
|
+
geom_joy: () => geom_joy,
|
|
9658
10033
|
geom_hline: () => geom_hline,
|
|
9659
10034
|
geom_histogram: () => geom_histogram,
|
|
9660
10035
|
geom_freqpoly: () => geom_freqpoly,
|
|
@@ -9890,6 +10265,7 @@ export {
|
|
|
9890
10265
|
geom_smooth,
|
|
9891
10266
|
geom_segment,
|
|
9892
10267
|
geom_rug,
|
|
10268
|
+
geom_ridgeline,
|
|
9893
10269
|
geom_ribbon,
|
|
9894
10270
|
geom_rect,
|
|
9895
10271
|
geom_raster,
|
|
@@ -9901,6 +10277,7 @@ export {
|
|
|
9901
10277
|
geom_linerange,
|
|
9902
10278
|
geom_line,
|
|
9903
10279
|
geom_label,
|
|
10280
|
+
geom_joy,
|
|
9904
10281
|
geom_hline,
|
|
9905
10282
|
geom_histogram,
|
|
9906
10283
|
geom_freqpoly,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/pipeline/pipeline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAA6C,QAAQ,EAAE,aAAa,EAAQ,MAAM,UAAU,CAAA;AACxG,OAAO,EAAE,cAAc,EAAgB,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/pipeline/pipeline.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAA6C,QAAQ,EAAE,aAAa,EAAQ,MAAM,UAAU,CAAA;AACxG,OAAO,EAAE,cAAc,EAAgB,MAAM,kBAAkB,CAAA;AAkB/D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE;QACP,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,QAAQ,EAAE;QACR,CAAC,EAAE,MAAM,CAAA;QACT,CAAC,EAAE,MAAM,CAAA;QACT,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;IACD,UAAU,CAAC,EAAE;QACX,CAAC,EAAE,MAAM,CAAA;QACT,CAAC,EAAE,MAAM,CAAA;QACT,KAAK,EAAE,MAAM,CAAA;QACb,MAAM,EAAE,MAAM,CAAA;KACf,CAAA;CACF;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,aAAa,GACrB,UAAU,CAgEZ;AA8ID;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,aAAa,GACrB,cAAc,CAsMhB;AAwcD;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,QAAQ,EACd,OAAO,EAAE,aAAa,GACrB,MAAM,CASR"}
|
|
@@ -81,6 +81,12 @@ export declare function renderGeomSegment(data: DataSource, geom: Geom, aes: Aes
|
|
|
81
81
|
* Data should be density curves grouped by x
|
|
82
82
|
*/
|
|
83
83
|
export declare function renderGeomViolin(data: DataSource, geom: Geom, _aes: AestheticMapping, scales: ScaleContext, canvas: TerminalCanvas): void;
|
|
84
|
+
/**
|
|
85
|
+
* Render geom_ridgeline (joy plot)
|
|
86
|
+
* Creates stacked density plots for comparing distributions across groups.
|
|
87
|
+
* Data should be density curves grouped by y (categorical)
|
|
88
|
+
*/
|
|
89
|
+
export declare function renderGeomRidgeline(data: DataSource, geom: Geom, aes: AestheticMapping, scales: ScaleContext, canvas: TerminalCanvas): void;
|
|
84
90
|
/**
|
|
85
91
|
* Render geom_tile (heatmap)
|
|
86
92
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-geoms.d.ts","sourceRoot":"","sources":["../../src/pipeline/render-geoms.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAQ,MAAM,UAAU,CAAA;AACxE,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"render-geoms.d.ts","sourceRoot":"","sources":["../../src/pipeline/render-geoms.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,UAAU,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AAI,EAAE,IAAI,EACV,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,cAAc,GACrB,IAAI,CA6BN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,cAAc,GACrB,IAAI,CAkCN;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,cAAc,GACrB,IAAI,CA4BN;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,cAAc,GACrB,IAAI,CAwFN;AA6BD;;GAEG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,cAAc,EACtB,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CAsFN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scales.d.ts","sourceRoot":"","sources":["../../src/pipeline/scales.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,IAAI,EACJ,KAAK,EACL,cAAc,EACf,MAAM,UAAU,CAAA;AAEjB;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,MAAM,GACZ,CAAC,MAAM,EAAE,MAAM,CAAC,CAsBlB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,cA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AC9C,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,GAAE,IAAI,EAAoB,GAChC,kBAAkB,CAYpB;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAChD,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EACxB,QAAQ,GAAE,IAAmC,EAAI,cAAc;AAC/D,SAAS,GAAE,IAAsC,GAChD,kBAAkB,CAepB;AAuBD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,YAAY,CAAA;IAClB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxB,GAAG,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAAA;CAC5B;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,GACvB,iBAAiB,CAgBnB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvB,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACxB;AAgCD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EACjE,UAAU,GAAE,KAAK,EAAO,EACxB,WAAW,CAAC,EAAE,WAAW,GACxB,YAAY,CA+Ld"}
|
package/dist/stats/density.d.ts
CHANGED
|
@@ -33,4 +33,9 @@ export declare function stat_density(params?: StatDensityParams): Stat;
|
|
|
33
33
|
* Groups data by x aesthetic (categorical) and computes density on y values
|
|
34
34
|
*/
|
|
35
35
|
export declare function stat_ydensity(params?: StatDensityParams): Stat;
|
|
36
|
+
/**
|
|
37
|
+
* Create stat_xdensity transformation for ridgeline plots
|
|
38
|
+
* Groups data by y aesthetic (categorical) and computes density on x values
|
|
39
|
+
*/
|
|
40
|
+
export declare function stat_xdensity(params?: StatDensityParams): Stat;
|
|
36
41
|
//# sourceMappingURL=density.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"density.d.ts","sourceRoot":"","sources":["../../src/stats/density.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAoB,UAAU,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAElE,MAAM,WAAW,iBAAiB;IAChC,mFAAmF;IACnF,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,yFAAyF;IACzF,MAAM,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,aAAa,CAAA;IACpD,6DAA6D;IAC7D,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AA8CD,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,iBAAsB,GAC7B,UAAU,CAkFZ;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,GAAE,iBAAsB,GAAG,IAAI,CAgCjE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,GAAE,iBAAsB,GAAG,IAAI,CA6ClE"}
|
|
1
|
+
{"version":3,"file":"density.d.ts","sourceRoot":"","sources":["../../src/stats/density.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAoB,UAAU,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAElE,MAAM,WAAW,iBAAiB;IAChC,mFAAmF;IACnF,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,yFAAyF;IACzF,MAAM,CAAC,EAAE,UAAU,GAAG,cAAc,GAAG,aAAa,CAAA;IACpD,6DAA6D;IAC7D,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AA8CD,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,iBAAsB,GAC7B,UAAU,CAkFZ;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,GAAE,iBAAsB,GAAG,IAAI,CAgCjE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,GAAE,iBAAsB,GAAG,IAAI,CA6ClE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,GAAE,iBAAsB,GAAG,IAAI,CAuDlE"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* stat_density_2d - 2D Kernel Density Estimation
|
|
3
|
+
*
|
|
4
|
+
* Computes a 2D density surface from scatter data using kernel density
|
|
5
|
+
* estimation. Output is suitable for contour visualization.
|
|
6
|
+
*/
|
|
7
|
+
import type { DataSource, Stat } from '../types';
|
|
8
|
+
export interface StatDensity2dParams {
|
|
9
|
+
/** Bandwidth for kernel density estimation (default: auto via Scott's rule) */
|
|
10
|
+
h?: number | [number, number];
|
|
11
|
+
/** Number of grid points in x direction (default: 50) */
|
|
12
|
+
n?: number;
|
|
13
|
+
/** Number of grid points in x direction */
|
|
14
|
+
nx?: number;
|
|
15
|
+
/** Number of grid points in y direction */
|
|
16
|
+
ny?: number;
|
|
17
|
+
/** Adjustment factor for bandwidth (default: 1) */
|
|
18
|
+
adjust?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface Density2dResult {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
z: number;
|
|
24
|
+
density: number;
|
|
25
|
+
level: number;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Compute 2D kernel density estimation
|
|
30
|
+
*/
|
|
31
|
+
export declare function computeDensity2d(data: DataSource, xField: string, yField: string, params?: StatDensity2dParams): Density2dResult[];
|
|
32
|
+
/**
|
|
33
|
+
* Create stat_density_2d transformation
|
|
34
|
+
*/
|
|
35
|
+
export declare function stat_density_2d(params?: StatDensity2dParams): Stat;
|
|
36
|
+
//# sourceMappingURL=density2d.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"density2d.d.ts","sourceRoot":"","sources":["../../src/stats/density2d.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAoB,UAAU,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAElE,MAAM,WAAW,mBAAmB;IAClC,+EAA+E;IAC/E,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,yDAAyD;IACzD,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,2CAA2C;IAC3C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AA4BD,MAAM,WAAW,eAAe;IAC9B,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;IACT,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,mBAAwB,GAC/B,eAAe,EAAE,CA6FnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,GAAE,mBAAwB,GAAG,IAAI,CAgCtE"}
|
package/dist/stats/index.d.ts
CHANGED
|
@@ -9,8 +9,10 @@ export { stat_count, computeCount } from './count';
|
|
|
9
9
|
export type { StatCountParams, CountResult } from './count';
|
|
10
10
|
export { stat_boxplot, computeBoxplotStats } from './boxplot';
|
|
11
11
|
export type { StatBoxplotParams, BoxplotResult } from './boxplot';
|
|
12
|
-
export { stat_density, stat_ydensity, computeDensity } from './density';
|
|
12
|
+
export { stat_density, stat_ydensity, stat_xdensity, computeDensity } from './density';
|
|
13
13
|
export type { StatDensityParams, DensityResult } from './density';
|
|
14
|
+
export { stat_density_2d, computeDensity2d } from './density2d';
|
|
15
|
+
export type { StatDensity2dParams, Density2dResult } from './density2d';
|
|
14
16
|
export { stat_smooth, computeSmooth } from './smooth';
|
|
15
17
|
export type { StatSmoothParams, SmoothResult } from './smooth';
|
|
16
18
|
export { stat_summary, computeSummary } from './summary';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stats/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AAC7C,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAErD,OAAO,EAAE,UAAU,EAAE,aAA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EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEvE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACrD,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE9D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AACxD,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE7E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AACtE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggterm/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "Grammar of Graphics engine for terminals",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"ggterm": "
|
|
10
|
-
"ggterm-plot": "
|
|
9
|
+
"ggterm": "dist/cli.js",
|
|
10
|
+
"ggterm-plot": "dist/cli-plot.js"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"repository": {
|
|
38
38
|
"type": "git",
|
|
39
|
-
"url": "https://github.com/shandley/ggterm.git",
|
|
39
|
+
"url": "git+https://github.com/shandley/ggterm.git",
|
|
40
40
|
"directory": "packages/core"
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/shandley/ggterm#readme",
|