This repository contains the code and data for the analyses described in the paper Regional Variations of Context-based Association Rules in OpenStreetMap by C.Ludwig, S. Fendrich and A. Zipf at the GIScience Research Group, Institute of Geography, Heidelberg University.
The code is licensed under BSD 3-Clause "New" or "Revised" License.
Running the analysis requires Python > 3.7 and all packages listed in ./requirements.txt
. To set up the environment using anaconda/miniconda run:
conda create -n osm_rules python=3.7
conda activate osm_rules
conda install --file requirements.txt
The results of the analysis can be reproduced using the two Jupyter notebooks and the extracted data provided in ./data
.
The notebook ./src/01-Exploratory_Data_Analysis.ipynb
contains the exploratory data analysis.
The notebook ./src/02-Association_Rule_Mining.ipynb
contains the association rule analysis.
If you would like to perform this analysis for another city, you may use the Python script ./src/00-Data_Extraction.py
to extract the data using the ohsome API. For this to run add the city to the configuration file ./config/parks.yaml
and adapt the city name in the Python file. To run the data extraction for multiple cities, you may use ./src/00-Data_Extraction_Batch.sh
.