This project is a Python workspace for creating a one-off map visualization of travel times, and population size living within x minutes travel time from the main university hospitals in Norway. The locations/travel times can easily be substituted. Common web APIs typically have a limitation on travel time < 60 minutes, and to circumvent this limitation the project uses the open source routing engine Valhalla.
The output will be a map of Norway with isochrones (travel time contours) and population size within each isochrone. After some post-processing it could look like this:
Docker running something other than apple silicon/arm (or run on a github codespace) pandas/numpy geopandas routingpy matplotlib
To get started with the project, follow these steps:
- Run project in a github codespace
- local devcontainer might work unless apple silicon/arm
- make all
Alternate untested instructions:
- Clone the repository to your local machine with docker installed.
- Create a virtual environment:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install the dependencies:
pip install -r requirements.txt
. - make all
If you need >120 minutes travel time, you may change the isochrone/max_time_contour
variable in VALHALLA/custom_files/valhalla.json
and restart the docker image (you need to run Valhalla at for the config file to be created)
This project is licensed under the MIT License - see the LICENSE file for details.