The materials for the SDSS 2025 workshop on Urban Morphology with Python conducted by Martin Fleischmann and James D. Gaboardi.
The easiest way to follow the workshop it to open the notebook in Google Colab:
If you are a git user, you can get the workshop materials by cloning this repo:
git clone https://github.com/martinfleis/sdss2025.git
cd sdss2025Otherwise, to download the repository to your local machine as a zip-file, click the
download ZIP on the repository page https://github.com/martinfleis/sdss2025 (green
button "Code"). After the download, unzip on the location you prefer within your user
account (e.g. My Documents, not C:\).
You can set the environment to run the notebook in a few ways - Pixi (recommended) uv (also recommended1), Conda/Mamba, pip.
If you'd like to run the notebook, you can create an environment using Pixi. See the Pixi installation instructions.
With Pixi installed, open a command line and start Jupyter Lab from the included Pixi environment. Pixi will automatically install all required dependencies and start the Jupyter Lab IDE with the notebook.
pixi run jupyter lab workshop.ipynbIf you'd like to run the notebook, you can create an environment using
uv. See the uv
installation instructions.
With uv installed, open a command line, and start Jupyter Lab from the included uv
environment. uv will automatically install all required dependencies and start the
Jupyter Lab IDE with the notebook.
uv run jupyter lab workshop.ipynbIf you prefer to use conda-based solutions (conda, mamba, anaconda, micromamba), you can create a conda environment using attached environment.yml file.
Using conda, we recommend to create a new environment with all packages using the following commands (after cloning or downloading this GitHub repo and navigating to the directory, see above):
# setting the configuation so all packages come from the conda-forge channel
conda config --add channels conda-forge
conda config --set channel_priority strict
# mamba provides a faster implementation of conda
conda install mamba
# creating the environment
mamba env create --file environment.yml
# activating the environment
conda activate sdss2025Then you can start the notebook.
jupyter lab workshop.ipynbYou can also install the necessary dependencies from PyPI using pip. The instructions
can be used both locally and within Google Colab.
pip install momepy scikit-learn numba osmnx geopy matplotlib mapclassify folium spopt fast_hdbscan geoplanar neatnetIf you are working locally (not using Google Colab), you may want to install Jupyter Lab as well.
pip install jupyterlabThen you can start the notebook.
jupyter lab workshop.ipynbThis repository contains a subset of data retrieved from the open data portal of CSO. CC-BY 4.0 (c) Český statistický úřad.
- Copyright: This manuscript has been authored in part by UT-Battelle, LLC under
Contract No. DE-AC05-00OR22725 with the U.S. Department of Energy. The United States
Government retains and the publisher, by accepting the article for publication,
acknowledges that the United States Government retains a non-exclusive, paid-up,
irrevocable, world-wide license to publish or reproduce the published form of this
manuscript, or allow others to do so, for United States Government purposes. The
Department of Energy will provide public access to these results of federally
sponsored research in accordance with the DOE Public Access Plan
(
http://energy.gov/downloads/doe-public-access-plan).
Footnotes
-
I prefer Pixi as it installs packages from conda-forge which are using same binaries of compiled dependencies. uv installs from PyPI, so each package will bring its own version. ↩