vgplot 0.34.2__tar.gz → 0.35.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: vgplot
3
- Version: 0.34.2
3
+ Version: 0.35.0
4
4
  Summary: A Python API for authoring Mosaic vgplot visualizations
5
5
  Project-URL: homepage, https://github.com/uwdata/mosaic
6
6
  Requires-Python: >=3.11
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vgplot-python",
3
- "version": "0.34.2",
3
+ "version": "0.35.0",
4
4
  "private": true,
5
5
  "scripts": {
6
6
  "prerelease": "uv run ruff check && uv run ruff format --check",
@@ -61,6 +61,25 @@ def count(col: TransformArg | UNSET = UNSET, **options: Any) -> dict[str, Any]:
61
61
  return _transform("count", (col,), options)
62
62
 
63
63
 
64
+ def cpc_estimate(sketch: TransformArg, **options: Any) -> dict[str, Any]:
65
+ """Return the estimated distinct count of a Compressed Probabilistic Counting (CPC) sketch."""
66
+ return _transform("cpcEstimate", (sketch,), options)
67
+
68
+
69
+ def cpc_sketch(
70
+ col: TransformArg, lg_k: TransformArg | UNSET = UNSET, **options: Any
71
+ ) -> dict[str, Any]:
72
+ """Compute a Compressed Probabilistic Counting (CPC) sketch for approximate distinct counting."""
73
+ return _transform("cpcSketch", (col, lg_k), options)
74
+
75
+
76
+ def cpc_union(
77
+ sketch: TransformArg, lg_k: TransformArg | UNSET = UNSET, **options: Any
78
+ ) -> dict[str, Any]:
79
+ """Merge CPC sketches into a single sketch."""
80
+ return _transform("cpcUnion", (sketch, lg_k), options)
81
+
82
+
64
83
  def cume_dist(**options: Any) -> dict[str, Any]:
65
84
  """Compute the cumulative distribution value over an ordered window partition."""
66
85
  return {"cume_dist": None, **options}
@@ -101,6 +120,42 @@ def geojson(col: TransformArg, **options: Any) -> dict[str, Any]:
101
120
  return _transform("geojson", (col,), options)
102
121
 
103
122
 
123
+ def hll_estimate(sketch: TransformArg, **options: Any) -> dict[str, Any]:
124
+ """Return the estimated distinct count of a HyperLogLog (HLL) sketch."""
125
+ return _transform("hllEstimate", (sketch,), options)
126
+
127
+
128
+ def hll_sketch(
129
+ col: TransformArg, lg_k: TransformArg | UNSET = UNSET, **options: Any
130
+ ) -> dict[str, Any]:
131
+ """Compute a HyperLogLog (HLL) sketch for approximate distinct counting."""
132
+ return _transform("hllSketch", (col, lg_k), options)
133
+
134
+
135
+ def hll_union(
136
+ sketch: TransformArg, lg_k: TransformArg | UNSET = UNSET, **options: Any
137
+ ) -> dict[str, Any]:
138
+ """Merge HyperLogLog (HLL) sketches into a single sketch."""
139
+ return _transform("hllUnion", (sketch, lg_k), options)
140
+
141
+
142
+ def kll_quantile(
143
+ sketch: TransformArg,
144
+ rank: TransformArg,
145
+ inclusive: TransformArg | UNSET = UNSET,
146
+ **options: Any,
147
+ ) -> dict[str, Any]:
148
+ """Return the estimated quantile value of a KLL sketch at the provided normalized rank between 0 and 1."""
149
+ return _transform("kllQuantile", (sketch, rank, inclusive), options)
150
+
151
+
152
+ def kll_sketch(
153
+ col: TransformArg, k: TransformArg | UNSET = UNSET, **options: Any
154
+ ) -> dict[str, Any]:
155
+ """Compute a KLL sketch for approximate quantile estimation, or merge input KLL sketches."""
156
+ return _transform("kllSketch", (col, k), options)
157
+
158
+
104
159
  def lag(
105
160
  col: TransformArg,
106
161
  offset: TransformArg | UNSET = UNSET,
@@ -223,6 +278,9 @@ __all__ = [
223
278
  "centroid_y",
224
279
  "column",
225
280
  "count",
281
+ "cpc_estimate",
282
+ "cpc_sketch",
283
+ "cpc_union",
226
284
  "cume_dist",
227
285
  "date_day",
228
286
  "date_month",
@@ -231,6 +289,11 @@ __all__ = [
231
289
  "first",
232
290
  "first_value",
233
291
  "geojson",
292
+ "hll_estimate",
293
+ "hll_sketch",
294
+ "hll_union",
295
+ "kll_quantile",
296
+ "kll_sketch",
234
297
  "lag",
235
298
  "last",
236
299
  "last_value",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes