In this exercise, you will learn how to use the Open Route Serice and Ohsome APIs using Python. Therefore, we need to set up the right python environment.
- Open the "Anaconda Prompt" from the Windows Menu.
- Navigat to the folder "env" of this repository.
- Create a new virtual environment:
conda env create -f ors_environment.yml
If you are asked to provide Admin credentials, just click 'No'.
- Activate the new virtual environment:
activate ors
If you successfully activated your new environment command prompt should look something like this with the name of the activate environment (ors) in brackets in front of your current path:
(ors) M:\git\OpenSourceGIS_06\env>
- Install the openrouteservice and geopy packages
pip install openrouteservice ortools geopy
In this exercise, we will use juypter notebook to work with Python. Here are the steps to start the jupyter notebook.
-
Make Firefox or Chrome your default Web Browser: For instructions on how to do that, see here.
-
Open the "Anaconda Prompt" and move to the main folder of this repository.
-
Activate the 'ors' Python environment:
activate ors
-
Start the Jupyter notebook server:
jupyter notebook
Your browser should open automatically directing you to localhost:8888/tree where your jupyter notebook server is running.
- Close the browser tabs
- In the "Anaconda Prompt" with your running jupyter notebook server, press CTRL + C to abort the process.