macroneighborhoods
macroneighborhoods is a research-oriented Python package for constructing
larger spatial regions, called macro-neighborhoods, from georeferenced
observations.
The package generates local micro-neighborhoods, determines spatial adjacency, and merges neighboring regions based on feature similarity. It can also compute spatial autocorrelation outputs using Global Moran's I and Local Indicators of Spatial Association (LISA).
The package is intended to support reproducible research workflows in geospatial data mining, environmental informatics, remote sensing, climate analysis, urban analytics, and related fields.
Why use macro-neighborhoods?
Spatial datasets often contain many point observations, grid cells, or small local regions. Although these fine-scale units preserve detail, they can be difficult to analyze and interpret collectively.
macroneighborhoods helps organize these units into larger, spatially
connected regions that reflect both geographic adjacency and similarity in
selected attributes.
Main capabilities
- Generate Voronoi-based micro-neighborhoods from spatial observations
- Determine spatial adjacency among local regions
- Compare neighboring regions using selected feature variables
- Merge adjacent and similar micro-neighborhoods into macro-neighborhoods
- Export reusable GeoJSON files
- Generate PNG maps for visual inspection
- Optionally compute Global Moran's I
- Optionally generate LISA cluster outputs for a selected feature
Installation
Install the package from PyPI:
pip install macroneighborhoods
For local development from the project repository:
pip install -e .
Command-line usage
Display the available command-line options:
macro-nbds --help
A general command follows this structure:
macro-nbds \
--input path/to/input_data.parquet \
--output path/to/output_macro_neighborhoods.geojson \
--lisa-feature feature_name
Replace the input path, output path, and feature name with values appropriate for your dataset.
Repository demonstration
When working from the project repository, the included satellite snowmelt demonstration can be run using:
macro-nbds \
--input demo_data/SATELLITE_with_smlt.parquet \
--output outputs/live_satellite_snowmelt_demo.geojson \
--lisa-feature smlt
Outputs
Depending on the selected options, the package can produce:
- a micro-neighborhood map and GeoJSON file;
- a macro-neighborhood map and GeoJSON file;
- a LISA cluster map and GeoJSON file when a feature is specified;
- spatial autocorrelation statistics for the selected feature.
PNG outputs support quick visual inspection. GeoJSON outputs can be opened in QGIS, ArcGIS, GeoPandas, or other geospatial analysis environments.
Research and reproducibility
The resulting macro-neighborhoods depend on the input data, coordinate reference system, selected feature variables, preprocessing decisions, and similarity settings.
Researchers should document these choices when reporting results so that the analysis can be interpreted and reproduced.
Citation
When using this package in academic research, please cite:
- the
macroneighborhoodspackage; - the specific software version used;
- the associated publication or archived software record, when available.
Development status
macroneighborhoods is early-stage research software and is under active
development.
Version 0.0.2 improves the package documentation and PyPI metadata. Future
development may include additional tests, expanded examples, threshold
sensitivity summaries, and broader documentation.
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 macroneighborhoods-0.0.2.tar.gz.
File metadata
- Download URL: macroneighborhoods-0.0.2.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f1d6459f3b09a564b981c4b7d91661162e0d475255557766213691f3df9408b
|
|
| MD5 |
dfec152770a93c1c4f0ee35cbca5e05c
|
|
| BLAKE2b-256 |
4dd88fc8de46a6512b1a43c25e51f561eb5496527897131b9ee732903e79e424
|
File details
Details for the file macroneighborhoods-0.0.2-py3-none-any.whl.
File metadata
- Download URL: macroneighborhoods-0.0.2-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
455c126b8a6bf164a4ec90e9ed96f6eb8a2cd1f8ea6d5ce0233f9dec036c72fc
|
|
| MD5 |
7171d29850d3e57aec849feedf6fa736
|
|
| BLAKE2b-256 |
114d3d4696958ba28ba937e309f0361fa63d65d920816923c6377ccb16e98283
|