Compute correlation between two layers
correlate_layersSpatially join two existing workspace layers and return the Pearson correlation coefficient r, sample size n, two-sided p-value approximation, plus human-readable strength and direction labels. Pure read — no layer is added, no op is committed, no credit charge. Use this when you want a numeric answer without rendering; use add_fusion_layer when the user wants the visualization. Required: map_id, layer_a_id, layer_b_id, rationale.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map_id | Yes | ||
| rationale | Yes | Short audit-log label (≤300 chars) stating the user-facing goal this call serves, e.g. "add wildfire layer for the user's California query". Required on every call. Stored in the operations log so map edits stay traceable — we never see your chat history. | |
| layer_a_id | Yes | ||
| layer_b_id | Yes | ||
| value_field_a | No | ||
| value_field_b | No |