build_and_transform_weights
Construct and transform spatial weight matrices from point datasets. Supports contiguity (queen, rook), distance-based, and KNN methods with row, variance, binary, or other transformations.
Instructions
Build and transform spatial weights in one step.
Parameters:
data_path: Path to point shapefile or GeoPackage
method: 'queen', 'rook', 'distance_band', or 'knn'
id_field: Optional field name for IDs
threshold: Distance threshold (required if method='distance_band')
k: Number of neighbors (required if method='knn')
binary: True for binary weights, False for inverse distance (DistanceBand only)
transform_type: 'r', 'v', 'b', 'o', or 'd'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_path | Yes | ||
| method | No | queen | |
| id_field | No | ||
| threshold | No | ||
| k | No | ||
| binary | No | ||
| transform_type | No | r |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||