Spatial modeling based on scikit-learn.
Project description
spatial ML
Spatial modeling based on scikit-learn.
The aim of the package is to provide implementations of spatially-explicit modelling.
Features
At the moment, spatialml provides a framework for prototyping geographically weighted extensions of
regression and classification models based on scikit-learn and libpysal.graph and a
subset of models implemented on top of this framework. For example, you can run
geographically weighted linear regression in a following manner.
import geopandas as gpd
from geodatasets import get_path
from spatialml.linear_model import GWLinearRegression
gdf = gpd.read_file(get_path('geoda.guerry'))
adaptive = GWLinearRegression(
bandwidth=25,
fixed=False,
kernel='bisquare'
)
adaptive.fit(
gdf[['Crm_prp', 'Litercy', 'Donatns', 'Lottery']],
gdf["Suicids"],
geometry=gdf.representative_point(),
)
For details, see the documentation.
Status
Current development status is beta. The core API of the package should not change without a warning and a proper deprecation cycle. However, minor breaking changes may still occur.
Installation
You can install spatial ML from PyPI or from conda-forge using the tool of your choice:
pip install spatialml
Or from conda-forge:
conda install spatialml -c conda-forge
Bug reports
To search for or report bugs, please see the Github issue tracker.
Get in touch
If you have a question regarding spatialml, feel free to open an issue or join a chat on
Discord.
License
The package is licensed under BSD 3-Clause License (Copyright (c) 2025, Martin Fleischmann & PySAL Developers)
Funding
Charles University’s Primus programme through the project "Influence of Socioeconomic and Cultural Factors on Urban Structure in Central Europe", project reference PRIMUS/24/SCI/023.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spatialml-0.2.1.tar.gz.
File metadata
- Download URL: spatialml-0.2.1.tar.gz
- Upload date:
- Size: 2.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
882b462125915653769c12fd66918f09f40f89043e0cdb6e5d6c4c1caae32edb
|
|
| MD5 |
cc4557179e721652d8b3071c5bd8e52f
|
|
| BLAKE2b-256 |
642d8e521c9fa55f3ce378aa0150ce3273878c339cf4a9183cf5cccb4c6fb907
|
Provenance
The following attestation bundles were made for spatialml-0.2.1.tar.gz:
Publisher:
release.yml on pysal/spatialml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spatialml-0.2.1.tar.gz -
Subject digest:
882b462125915653769c12fd66918f09f40f89043e0cdb6e5d6c4c1caae32edb - Sigstore transparency entry: 1793487673
- Sigstore integration time:
-
Permalink:
pysal/spatialml@8491702f7f4058dd470eb2cefba3719dc6249dd0 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/pysal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8491702f7f4058dd470eb2cefba3719dc6249dd0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file spatialml-0.2.1-py3-none-any.whl.
File metadata
- Download URL: spatialml-0.2.1-py3-none-any.whl
- Upload date:
- Size: 53.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4f68911c51a9927be48eaf39e7d948bd94c2b7da74d521dae882f6be401e26f
|
|
| MD5 |
79a3bcaccf04db959db33d9867dd5794
|
|
| BLAKE2b-256 |
d63be790694dbcfba5a8a692c2a4f489425e1e619021f3b3892439ad91817963
|
Provenance
The following attestation bundles were made for spatialml-0.2.1-py3-none-any.whl:
Publisher:
release.yml on pysal/spatialml
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spatialml-0.2.1-py3-none-any.whl -
Subject digest:
e4f68911c51a9927be48eaf39e7d948bd94c2b7da74d521dae882f6be401e26f - Sigstore transparency entry: 1793487747
- Sigstore integration time:
-
Permalink:
pysal/spatialml@8491702f7f4058dd470eb2cefba3719dc6249dd0 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/pysal
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8491702f7f4058dd470eb2cefba3719dc6249dd0 -
Trigger Event:
push
-
Statement type: