@fiftyone/aggregations¶
Hooks¶
useAggregation¶
-
@fiftyone/aggregations.
useAggregation
(options)¶ - Arguments
options (AggregationParams) –
- Return type
Array<
any
>
A hook for aggregating data from the FiftyOne backend.
Aggregation Classes
JavaScript |
Python |
---|---|
Example
const [aggregate, points, loading] = foa.useAggregation({
dataset,
filters,
view,
});
React.useEffect(() => {
aggregate(
[
new foa.aggregations.Values({
fieldOrExpr: "id",
}),
new foa.aggregations.Values({
fieldOrExpr: `${path}.point.coordinates`,
}),
],
dataset.name
);
}, [dataset, filters, view, path]);
Types¶
Bounds¶
-
class
@fiftyone/aggregations.
Bounds
()¶
-
@fiftyone/aggregations.
new Bounds
(params)¶ - Arguments
params (BoundsParams) –
- Return type
plugins.fiftyone.aggregations.Bounds()
Count¶
-
class
@fiftyone/aggregations.
Count
()¶
-
@fiftyone/aggregations.
new Count
(params)¶ - Arguments
params (CountParams) –
- Return type
plugins.fiftyone.aggregations.Count()
CountValues¶
-
class
@fiftyone/aggregations.
CountValues
()¶
-
@fiftyone/aggregations.
new CountValues
(params)¶ - Arguments
params (CountValuesParams) –
- Return type
plugins.fiftyone.aggregations.CountValues()
Distinct¶
-
class
@fiftyone/aggregations.
Distinct
()¶
-
@fiftyone/aggregations.
new Distinct
(params)¶ - Arguments
params (DistinctParams) –
- Return type
plugins.fiftyone.aggregations.Distinct()
HistogramValues¶
-
class
@fiftyone/aggregations.
HistogramValues
()¶
-
@fiftyone/aggregations.
new HistogramValues
(params)¶ - Arguments
params (HistogramValuesParams) –
- Return type
plugins.fiftyone.aggregations.HistogramValues()
Mean¶
-
class
@fiftyone/aggregations.
Mean
()¶
-
@fiftyone/aggregations.
new Mean
(params)¶ - Arguments
params (MeanParams) –
- Return type
plugins.fiftyone.aggregations.Mean()
Std¶
-
class
@fiftyone/aggregations.
Std
()¶
-
@fiftyone/aggregations.
new Std
(params)¶ - Arguments
params (StdParams) –
- Return type
plugins.fiftyone.aggregations.Std()
Sum¶
-
class
@fiftyone/aggregations.
Sum
()¶
-
@fiftyone/aggregations.
new Sum
(params)¶ - Arguments
params (SumParams) –
- Return type
plugins.fiftyone.aggregations.Sum()
Values¶
-
class
@fiftyone/aggregations.
Values
()¶
-
@fiftyone/aggregations.
new Values
(params)¶ - Arguments
params (ValuesParams) –
- Return type
plugins.fiftyone.aggregations.Values()
-
class
@fiftyone/aggregations.
BoundsParams
()¶
BoundsParams¶
Name |
Type |
Description |
---|---|---|
BoundsParams.expr |
|
|
BoundsParams.fieldOrExpr |
|
|
BoundsParams.safe |
|
-
class
@fiftyone/aggregations.
CountParams
()¶
CountParams¶
Name |
Type |
Description |
---|---|---|
CountParams.expr |
|
|
CountParams.fieldOrExpr |
|
|
CountParams.safe |
|
-
class
@fiftyone/aggregations.
CountValuesParams
()¶
CountValuesParams¶
Name |
Type |
Description |
---|---|---|
CountValuesParams.expr |
|
|
CountValuesParams.fieldOrExpr |
|
|
CountValuesParams.safe |
|
-
class
@fiftyone/aggregations.
DistinctParams
()¶
DistinctParams¶
Name |
Type |
Description |
---|---|---|
DistinctParams.expr |
|
|
DistinctParams.fieldOrExpr |
|
|
DistinctParams.safe |
|
-
class
@fiftyone/aggregations.
HistogramValuesParams
()¶
HistogramValuesParams¶
Name |
Type |
Description |
---|---|---|
HistogramValuesParams.auto |
|
|
HistogramValuesParams.bins |
|
|
HistogramValuesParams.expr |
|
|
HistogramValuesParams.fieldOrExpr |
|
|
HistogramValuesParams.range |
|
-
class
@fiftyone/aggregations.
MeanParams
()¶
MeanParams¶
Name |
Type |
Description |
---|---|---|
MeanParams.expr |
|
|
MeanParams.fieldOrExpr |
|
|
MeanParams.safe |
|
-
class
@fiftyone/aggregations.
StdParams
()¶
StdParams¶
Name |
Type |
Description |
---|---|---|
StdParams.expr |
|
|
StdParams.fieldOrExpr |
|
|
StdParams.safe |
|
|
StdParams.sample |
|
-
class
@fiftyone/aggregations.
SumParams
()¶
SumParams¶
Name |
Type |
Description |
---|---|---|
SumParams.expr |
|
|
SumParams.fieldOrExpr |
|
|
SumParams.safe |
|
-
class
@fiftyone/aggregations.
ValuesParams
()¶
ValuesParams¶
Name |
Type |
Description |
---|---|---|
ValuesParams.expr |
|
|
ValuesParams.fieldOrExpr |
|
|
ValuesParams.missingValue |
|
|
ValuesParams.unwind |
|