Skip to content

Implement a JGIS workflow to streamline the "QGIS bounce" pattern #513

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mfisher87 opened this issue Mar 3, 2025 · 3 comments · Fixed by #340
Closed

Implement a JGIS workflow to streamline the "QGIS bounce" pattern #513

mfisher87 opened this issue Mar 3, 2025 · 3 comments · Fixed by #340
Labels
hackathon Let's hack on this together! workflow A story that enables a new workflow

Comments

@mfisher87
Copy link
Member

A common pattern for geospatial practitioners is to check results at each step of an analysis using QGIS:

  1. Change the analysis
  2. Write out a data file
  3. Copy the dataset from cloud environment, e.g. JupyterHub (unless working locally)
  4. Open QGIS
  5. Create a new project
  6. Add a basemap
  7. Add data from (2) to QGIS project
  8. Check the data
  9. Repeat from 1

This should be achievable with JGIS instead with significantly fewer steps. Our first iteration might look like:

  1. Change the analysis
  2. Write out the data
  3. Pass the data to JGIS with one line of code, e.g. from jupytergis_lab import geo_debug; geo_debug("my_data.tif")
  4. Check the data in JGIS (e.g. in a sidecar/tab/split view panel)
  5. Repeat from 1

We could do even better eventually, making this process (close to?) frictionless:

  1. Change the analysis
  2. Pass the data to JGIS with one line of code, e.g. from jupytergis_lab import geo_debug; geo_debug(my_geodataframe) (or my_data_array, or ...)
  3. Check the data in JGIS (e.g. in a sidecar/tab/split view panel)
  4. Repeat from 1
@mfisher87 mfisher87 added the hackathon Let's hack on this together! label Mar 3, 2025
@mfisher87 mfisher87 linked a pull request Mar 3, 2025 that will close this issue
10 tasks
@mfisher87
Copy link
Member Author

mfisher87 commented Mar 25, 2025

So far, looks like so:

jgis_bounce_demo2_cropped.mp4

Some problems:

  1. The sidecar uses the right panel, so we can't see identified features at the same time as the map. I'd like to use a real JupyterLab panel instead of sidecar.
  2. Implicitly creates a file debug.jgis. I'd like the JGIS project to be ephemeral by default, and only saved if the user decides to.
  3. Every time geo_debug is called, it adds a basemap and the requested layer to the project; should be a new project every time.
  4. Don't want to require the user to write out a file; this should be a one-liner passing in a geodataframe.

@mfisher87
Copy link
Member Author

mfisher87 commented Mar 26, 2025

The sidecar uses the right panel, so we can't see identified features at the same time as the map. I'd like to use a real JupyterLab panel instead of sidecar.

This sounds valuable for many use cases. Especially thinking forward to #569. This has been discussed since 2018, but seems to have died down in 2021. Perhaps we can revive the discussion and perhaps implement a system for opening new UI elements from JS/Python.

jupyterlab/jupyterlab#3692
jupyterlab/jupyterlab#4080

@mfisher87 mfisher87 added the workflow A story that enables a new workflow label Mar 28, 2025
@mfisher87
Copy link
Member Author

mfisher87 commented Mar 31, 2025

Sidecar has had this feature since just after those threads died down. Requested they be closed as resolved. I was able to use it PR #340 to open JGIS in a full-fledged JupyterLab "window" (Sidecar(anchor="split-right")).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hackathon Let's hack on this together! workflow A story that enables a new workflow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant