This repository contains the material associated to the Python demo done by César Herrera during 2023 June session of Brisbane Geospatial Community
To run this notebook in MyBinder.org please click the Binder badge at the top.
You can also run this notebook on the ARDC Jupyter service
You can run this repository locally in your own computer. To do so you have to clone it. You will also need to make sure you have installed Python and Jupyter Notebook/Labs. You can also install R and the IRKernel if wanting to use R using notebooks as IDE. Python package and environment managing is done using Conda, so you will need to install Conda too, and then create a virtual environment and install all Python packages. This can be done using the following command in the Terminal/Console from the repository top level directory:
conda env create -n geoenv --file .binder/environment.yml # Environment named geoenv
Note that because Conda can take a significant amount of time resolving conflicts among packages, I use PIP (package manager for Python) within Conda for installing all packages (equivalent to using pip install -r requirements.txt
). I do recommend avoiding this practice in most instances. In this case, because this environment is meant with the only purpose of doing a demonstration, my intention is to provide a rapid environment setup.
Once all dependencies are installed, you can launch Notebook IDE from the Terminal/Console. Navigate to the repository top level directory, activate the virtual environment (conda activate geoenv
) and run the command jupyter lab
. This command would open a webpage in your default browser with the Jupyter Lab IDE.
You can launch any of the notebooks (extension .ipynb) by clicking on their names.
A docker file and docker compose example are included. If you are using Docker, this can be used to build and run an image using;
docker compose up
This will start jupyter running on http://localhost:81/.
Copy just the token from the terminal into the field Password or token:
and click Log in
.
During this demo I will use public data from the City of Gold Coast, QLD, Australia. Download links are provided below. I will use data from Shapefile format, but data is also available as .csv
, .kml
, GeoJSON, etc.
Datasets:
- Seating in Gold Coast Parks: this layer shows the location of seating in Gold Coast parks.
- Parks in Gold Coast: shows the location of parks within the CoGC area.
- Gold Coast Electoral Division 2020: Local government division boundaries in Gold Coast.
- Urban forest Gold Coast: Shows the location and associated details of trees within urban areas of Gold Coast