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 required v15.0.0
    array

    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 v15.0.0
    value

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

  • categories v15.0.0
    array

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

  • radius (m) v15.0.0
    number

    Radius applied to every category. Empty uses 500.

  • filters v15.0.0
    object

    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 v15.0.0
    object

    Item count per category group or named filter.

  • total v15.0.0
    number

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

  • success v15.0.0
    condition

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

  • error v15.0.0
    value

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

Core Releases

v15.0.0 This block was introduced in v15.0.0, click here to see the release notes.
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