qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.59k stars 3k forks source link

Create extension and connection with Jupyter Notebooks #54380

Open rodreras opened 1 year ago

rodreras commented 1 year ago

Feature description

Learning how to code is essential in the geospatial domain, specially when you have a lot of repetitive tasks. PyQGIS solves this problem very well, however, sometimes, it is tricky to learn from the PyQGIS Console, especially for newbies.

The Feature request here is focused on the development of jupyter notebook inside QGIS environment. With this, users could develop their applications line by line in a friendly way, and then change to the PyQGIS Console.

There are already some workaround for having PyQGIS library running in Jupyter notebooks, just like shown in this blog by Anitta Grasser, or this other approach by Thomas, but there are a lot of people who are afraid of perfoming such "configurations" due to the lack of expertise. That's why integrating notebooks would put QGIS in the next level.

Finally, this would bring one very powerful feature for the development of geospatial tasks, besides matching other softwares in the market, making QGIS more complete and dynamic.

Additional context

Example by Anitta Grasser of combining PyQGIS in VSCode

image

rodreras commented 1 year ago

Another article, this time by local press, showing another way of combining QGIS + Notebooks

haubourg commented 11 months ago

What is you request exactly ? Deliver Jupyter in QGIS environnement in Windows ? This is more a packaging issue since it is already doable.
Or provide documentation to have a jupyter environnement aware of QGIS env ? (Which is not something we can solve on QGIS's side ? ). Or embbed notebooks inside QGIS itself ?

rodreras commented 11 months ago

Sorry for not being more clear, but my suggestion was exactly embed notebooks inside QGIS itself. With this, we could have a better integration PyQGIS + Notebooks running it within QGIS environment. I think this would be a great feature, making it easier to learn PyQGIS with interactive cells, easy to deploy, and improving prototyping of PyQGIS is workflows. Besides that, it would be a nice way to provide Python & notebooks without the need of installing anaconda, python and other dependencies, since everything will be inside QGIS' environment.

haubourg commented 11 months ago

I might be wrong, but I don't think this will happen if it creates a dependency to jupyter project itself. QGIS is already a big beast and jupyter is a web framework, not a desktop one.

rodreras commented 11 months ago

What would fit the best then is a plug-in? In this case, QGIS would not have dependency to Jupyter.