facet counts by places

This block is part of the places group and was last modified in core v15.0.0.

facet counts by places v15.0.0

Counts how many items in a list are near each category : “412 objects near a hospital” in one node. Counts items, not places: an item with three hospitals nearby counts once, which is what a facet over an inventory means. Pass categories with a shared radius, or filters for a named filter per facet.

In pins 5
  • items array required v15.0.0

    The list to process. Either an array of geo points, or an array of objects with point path naming where the coordinate sits.

  • point path value v15.0.0

    Dotted path to the geo point inside each item, e.g. general.location. Leave empty when the items are geo points themselves.

  • categories array v15.0.0

    Category groups to count, each using radius. Either this or filters is required.

  • radius (m) number v15.0.0

    Radius applied to every category. Empty uses 500.

  • filters object v15.0.0

    Named filters, as {facet name: filter}, for facets that need different radii or negation. Combined with categories if both are given.

Out pins 4
  • counts object v15.0.0

    Item count per category group or named filter.

  • total number v15.0.0

    Items that had a usable coordinate and were evaluated. Compare against the input length to spot missing coordinates.

  • success condition v15.0.0

    True when the query ran. An empty result is still a success.

  • error value v15.0.0

    Error code when the query could not run: PLACES_NOT_AVAILABLE, CATEGORIES_REQUIRED.

A typical wiring for facet counts by places: with values feeds the items pin; the counts out pin feeds custom field.

Studio canvas example for the facet counts by places block: typical wiring for facet counts by places.

Used in these guides

These documentation pages use or explain this block:

Version history

Introduced in v15.0.0.


Back to places Return to the main group to view all sub-groups Back to Places Return to the group to view all blocks within this group