Home

Awesome

<p align="center"> <img height=200 src="https://github.com/oturns/geosnap/raw/main/docs/figs/geosnap_long.png" alt="geosnap"/> </p> <h2 align="center" style="margin-top:-10px">The Geospatial Neighborhood Analysis Package</h2>

Continuous Integration codecov PyPI - Python Version PyPI Conda (channel only) Conda GitHub commits since latest release (branch) DOI

geosnap provides a suite of tools for exploring, modeling, and visualizing the social context and spatial extent of neighborhoods and regions over time. It brings together state-of-the-art techniques from geodemographics, regionalization, spatial data science, and segregation analysis to support social science research, public policy analysis, and urban planning. It provides a simple interface tailored to formal analysis of spatiotemporal urban data.

<p align="center"> <img width='50%' src='https://github.com/oturns/geosnap/raw/main/docs/figs/Washington-Arlington-Alexandria_DC-VA-MD-WV.gif' alt='DC Transitions' style=' display: block; margin-left: auto; margin-right: auto; max-height: 540px'/> </p>

Main Features

Why

Understanding neighborhood context is critical for social science research, public policy analysis, and urban planning. The social meaning, formal definition, and formal operationalization of "neighborhood" depends on the study or application, however, so neighborhood analysis and modeling requires both flexibility and adherence to a formal pipeline. Maintaining that balance is challenging for a variety of reasons:

To address those challenges, geosnap incorporates tools from the PySAL ecosystem and scikit-learn along with internal data-wrangling that helps keep inputs and outputs simple for users. It operates on long-form geodataframes and includes logic for common transformations, like harmonizing geographic boundaries over time, and standardizing variables within their time-period prior to conducting pooled geodemographic clustering.

This means that while geosnap has native support for commonly-used datasets like the Longitudinal Tract Database (LTDB), or the Neighborhood Change Database (NCDB), it can also incorporate a wide variety of datasets, at any spatial resolution, as long as the user understands the implications of the interpolation process.

Research Questions

The package supports social scientists examining questions such as:

Installation

We recommend installing geosnap via a package manager that supports installing conda packages from conda-forge. Installing directly from the Python Package Index (PyPI) is also supported.

Installation via Miniforge

mamba install -c conda-forge geosnap

Installation via Pixi

Installation via pixi is supported, excluding pixi global install:

pixi init name_of_my_project
cd name_of_my_project
pixi add geosnap

Installation via pip

pip install geosnap

Installation via uv

uv pip install geosnap

User Guide

See the User Guide for a gentle introduction to using geosnap for neighborhood research

API Documentation

See the API docs for a thorough explanation of geosnap's core functionality

Development

geosnap development is hosted on github

To get started with the development version, clone this repository or download it manually then cd into the directory and run the following commands:

conda env create -f environment.yml
conda activate geosnap 
pip install -e . --no-deps

This will download the appropriate dependencies and install geosnap in its own conda environment.

Bug reports

To search for or report bugs, please see geosnap’s issues

License information

See the file “LICENSE.txt” for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.

Citation

For a generic citation of geosnap, we recommend the following:

@misc{Knaap2019,
author = {Knaap, Elijah and Kang, Wei and Rey, Sergio and Wolf, Levi John and Cortes, Renan Xavier and Han, Su},
doi = {10.5281/ZENODO.3526163},
title = {{geosnap: The Geospatial Neighborhood Analysis Package}},
url = {https://zenodo.org/record/3526163},
year = {2019}
}

If you need to cite a specific release of the package, please find the appropriate version on Zenodo

Funding

<img src="docs/figs/nsf_logo.jpg" width=100 /> This project is supported by NSF Award #1733705, Neighborhoods in Space-Time Contexts