Morphometric modules of the EuroFab project
-
Clone this repository.
-
Run
pixi install, thenpixi run buildand optionallypixi run tests. These commands setup the enviroment and all the required packages.- Alternatively you can manually install the conda-forge dependencies, but you have to still run the pixi build and tests commands:
pixi add momepy umap-learn fast_hdbscan jupyterlab pyarrow matplotlib lonboard folium mapclassify datashader dask pip sidecar glasbey scikit-image colorcet pandas holoviews bokeh=3.1 esda pytest hdbscan
- Alternatively you can manually install the conda-forge dependencies, but you have to still run the pixi build and tests commands:
-
To run jupyter use either
pixi run jupyter labor pass extra arguments likepixi run jupyter lab --port 8888. -
To run the analysis on the whole dataset - first, make sure you have the correct folder structure and the target label data in place. Then, run:
notebooks/1_download_data.ipynbto download all the Microsoft building footprints, split them into regions, and then download the overture streets.notebooks/2_process_regions.ipynbto run the entire processing pipeline from building, street preprocessing, element generation and characters calculations.notebooks/3_assign_targets.ipynbto assign target labels to each generated element.notebooks/4_assign_buildings_to_h3.ipynbto assign buildings to h3 hexagons, in preparation for train/test splitting.notebooks/5_train_test_split.ipynbto split the data into 5 training and test sets, based on the country of origin.notebooks/6_single_model_training.ipynbto train and test a specific model. Alternatively, you can run thegenerate_predictions.pyfile.notebooks/7_figures_and_tables.ipynbto generate paper/report figures and tables.notebooks/interactive_exploration.ipynbto interactively explore the morphometric characters.