# `GeoFrame.Kino.SpatialJoinCell`
[🔗](https://github.com/CountlinkX-Solutions/geoframe/blob/v0.3.4/lib/geo_frame/kino/spatial_join_cell.ex#L2)

A Livebook Smart Cell that joins two `GeoFrame.GeoDataFrame` variables spatially.

Add it from the Livebook cell menu (**Smart** > **Spatial join**). The left and right
selectors list the `GeoFrame.GeoDataFrame` variables of the notebook, refreshed whenever
a cell is evaluated. It is registered when the `:geoframe` application starts and Kino is
available.

Fields:

  * **Left** and **Right** - the frames to join.
  * **Mode** - `predicate` calls `GeoFrame.sjoin/3`; `nearest` calls
    `GeoFrame.sjoin_nearest/3`.
  * **Predicate** - any of `GeoFrame.GeoSeries.sindex_valid_query_predicates/0`, read as
    `left.predicate(right)`. `dwithin` also needs a **Distance**.
  * **How** - `inner`, `left` or `right`.
  * **Max distance** and **Distance column** - the `sjoin_nearest/3` options of the same
    name, both optional.
  * **Assign to** - the variable that receives the result (default `joined`).
  * **Show map** - ends the cell with `GeoFrame.Kino.deck/2`.

The cell generates code such as:

    joined = GeoFrame.sjoin(points, zones, how: :inner, predicate: :within)
    GeoFrame.Kino.deck(joined)

# `child_spec`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
