Anton Drasbæk Schiønning (@drasbaek) and Mina Almasi (@MinaAlmasi)
Spatial Analytics | Cultural Data Science
Aarhus University (June 2023)
This repository contains the code used to design and deploy the tool Aarhus RentMapper
along with the geospatial analysis used within it.
The tool can be accessed from the link below (NB. optimized for computer browser only!):
https://aarhus-rentmap.streamlit.app/
To reproduce the code, please refer to the section Technical Pipeline. For any further information regarding the project or its reproducibility, contact the authors (see Authors).
rentmapper.mov
The repository is structured as such:
Description | |
---|---|
app |
Folder with all relevant scripts to build and deploy the Aarhus RentMapper tool (see app/README.md) |
data |
Folder with scraped rental data, the geodata and the merged datafile complete_data.csv with rental data containing geospatial information (see data/README.md). |
results |
Folder with aggregated results. |
plots |
Folder with plots used in the paper. |
src |
Folder with scripts used for cleaning scraped data, combining rental data with geodata, performing data analysis and plotting (see src/README.md). |
run.sh |
Run entire analysis pipeline (except for cartograms) |
setup.sh |
Run to install create Python virtual environment env and install necessary packages within it |
The code was mainly developed in Python
(3.9.13) on a Macbook Pro ‘13 (2020, 2 GHz Intel i5, 16GB of ram). Whether it will work on Windows cannot be guaranteed. Python's venv needs to be installed for the setup to work.
Firstly, this repository must be cloned to your device as such:
git clone https://github.com/MinaAlmasi/aarhus-rentmapper.git
To be able to reproduce the code, type the following in the terminal:
bash setup.sh
The script creates a new virtual environment (env
) and installs the necessary packages within it.
To run the entire analysis pipeline, which laid the foundation for deploying the tool, type in your bash/zsh
terminal while being located in the main repository folder (cd aarhus-rentmapper
):
bash run.sh
As no Python packages supported plotting cartograms easily, this plot was created in R
(4.2.3). To run this seperate analysis, ensure that you have R and RScript installed. Type in your terminal while being located in the main repository folder (cd aarhus-rentmapper
):
RScript src/plot_cartogram.R
For testing and development purposes, the Aarhus RentMapper
tool can be deployed locally by typing:
streamlit run app/app.py
Note that you need:
- To activate the virtual environment first (
source env/bin/activate
in the terminal) - To ensure that you are located in the main folder (
cd aarhus-rentmapper
)
This code repository was a joint effort by Anton Drasbæk Sciønning (@drasbaek) and Mina Almasi (@MinaAlmasi).
For any questions regarding the reproducibility or project in general, you can contact us:
- drasbaek@post.au.dk (Anton)
- mina.almasi@post.au.dk (Mina)