# `Spatex.ESDA.JoinCountsLocal`
[🔗](https://github.com/CountlinkX-Solutions/spatex/blob/v0.2.1/lib/spatex/esda/join_counts_local.ex#L1)

Result of `Spatex.ESDA.join_counts_local/3`: univariate local join counts
(`esda.Join_Counts_Local`, Anselin and Li 2019).

Every per-site field is a list aligned with the graph's node order (`ids`).

  * `ljc` - number of neighbors with `y = 1` of every site with `y = 1` (0 elsewhere,
    islands included), as floats.
  * `p_sim` - pseudo p-value of the conditional randomization, `:nan` where `ljc` is 0 (as
    in esda); `sim` - the simulated counts, one list of `permutations` values per site
    (esda's `rjoins`). Both are `nil` with `permutations: 0`; `sim` is also `nil` with
    `keep_simulations: false`.

With `keep_simulations: :tensor`, `sim` is an `Nx.Tensor` of type `{:f, 64}` and shape
`{n, permutations}` instead of nested lists.

# `t`

```elixir
@type t() :: %Spatex.ESDA.JoinCountsLocal{
  alternative: atom(),
  ids: [term()] | nil,
  ljc: [float()],
  n: pos_integer(),
  p_sim: [float() | :nan] | nil,
  permutations: non_neg_integer(),
  seed: non_neg_integer() | nil,
  sim: [[float()]] | Nx.Tensor.t() | nil
}
```

---

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