OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
853 stars 311 forks source link

[Feat] Add Jupyter-style Interactive Page for Enhanced Scripting and Visualization #4673

Open lindakarlovska opened 3 weeks ago

lindakarlovska commented 3 weeks ago

Overview Integrating a Jupyter-style interactive page directly into the GRASS GIS desktop application could significantly elevate the scripting, visualization, and documentation workflows for GRASS GIS users. By directly embedding the grass.jupyter library (thanks to the work of @chaedri ), this feature would allow users to run GRASS GIS commands interactively within the desktop environment, view real-time outputs, write Markdown-based notes and documentation, and export the interactive session to various formats, including Markdown, HTML, and potentially LaTeX. Ideally, this could be added as a new middle notebook page type, complementing existing options like map displays and the graphical modeler.

Related Issue: This builds on Issue #4237, which proposed a simpler “Notes” panel for static metadata and text. The Jupyter-style interactive page could serve a broader purpose, while the “Notes” panel might be suitable for lightweight, non-executable metadata and project notes.

Describe the solution you'd like - Basic Functionality of the Jupyter-Style Interactive Page

1. Automatic Jupyter Environment Initialization: Upon creating a new interactive page, initialize the Jupyter environment session with init() from grass.jupyter.

2. Look of Code cells:

3. Look of Markdown cells:

4. File Operations:

5. Run and management options

Advanced Functionality of the Jupyter-Style Interactive Page

Other things to think about

Inspiration RStudio’s R Markdown setup offers a helpful model for combining code and Markdown in an interactive format. The attached screenshots show how working with R Markdown looks like in Desktop application (it is very similar to the proposal in this Issue at least from visualization and conceptual aspect):

R Markdown project: rstudio_markdown

Visualization inside the project: visualization_rstudio

Possibility for knitting markdown to HTML page: rstudio_knit

HTML page: rstudio_html

petrasovaa commented 3 weeks ago

It sounds like you want to reimplement jupyter notebooks using wx. I would rather explore integrating notebooks directly using wx.html2.WebView.