5. Create a Stage Volume Curve using PyQGIS without QGIS GUI

For many purposes of automisation it would also be very useful to be able to use PyQGIS in scripts without starting the QGIS graphical user interface.

We're going to explore this and dive deeper in the code that was used before using a Jupyter Notebook.

  1. Open a new Miniforge prompt and activate the tutorials environment.
    mamba activate tutorials
  2. We need to install the Pandas library for this tutorial. Run the following command:
    mamba install pandas
  3. Go to the folder where you want to download the subdirectory with the tutorial.
  4. In the webbrowser go to https://github.com/jvdkwast/PyQGISTutorials
  5. Go to Code and copy the https url.
  6. Download the tutorial and data with git:
    git clone https://github.com/jvdkwast/PyQGISTutorials.git
  7. Go to the subdirectory \PyQGISTutorials and run:
    jupyter lab
  8. In the browser go to the subdirectory StageVolumeCurve and double click on PyQGISStageVolume.ipynb to follow the tutorial.