<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Jupyter Blog - Matt Fisher</title><link href="https://jasongrout.github.io/medium-archive/pelican/" rel="alternate"/><link href="https://jasongrout.github.io/medium-archive/pelican/feeds/author-matt-fisher.atom.xml" rel="self"/><id>https://jasongrout.github.io/medium-archive/pelican/</id><updated>2023-08-02T16:51:00+00:00</updated><subtitle>The Project Jupyter blog: news, releases, and community stories, archived from blog.jupyter.org.</subtitle><entry><title>Desktop GIS software in the cloud with JupyterHub: A QGreenland workshop success story</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2023/desktop-gis-software-in-the-cloud-with-jupyterhub/" rel="alternate"/><published>2023-08-02T16:23:00+00:00</published><updated>2023-08-02T16:51:00+00:00</updated><author><name>Matt Fisher</name></author><id>tag:jasongrout.github.io,2023-08-02:/medium-archive/pelican/posts/2023/desktop-gis-software-in-the-cloud-with-jupyterhub/</id><summary type="html">&lt;p&gt;A QGreenland workshop success story&lt;/p&gt;
</summary><content type="html">&lt;p&gt;👋 We are Trey Stafford and Matt Fisher, co-authors of the &lt;a href="https://github.com/nsidc/qgreenland"&gt;QGreenland&lt;/a&gt; data package’s source code. This year, we had the pleasure of running a hands-on geospatial data and open science &lt;a href="http://qgreenland-workshop-2023-researcher.github.io/"&gt;QGreenland Researcher Workshop&lt;/a&gt;. It was important for attendees to participate in the workshop in a hands-on way while minimizing the negative impacts of installing software, requiring expensive personal computers, and troubleshooting unique computer configurations. We felt a &lt;a href="https://jupyter.org/hub"&gt;JupyterHub&lt;/a&gt; was a good fit for our workshop for this reason, if it could accommodate our need for running QGIS — a desktop application.&lt;/p&gt;
&lt;p&gt;In this blog post, we will introduce QGreenland, describe our experience using JupyterHub in the cloud for our workshop’s computing environment, and discuss challenges we overcame to enable our attendees to use QGIS in a cloud graphical desktop environment. Finally, we will highlight some workshop outcomes and discuss opportunities for enhancement based on new developments in the Jupyter ecosystem.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In our workshop, 25–30 international learners (including from Germany, India, France, Canada, Poland, and the United States) used &lt;em&gt;QGIS&lt;/em&gt; in a &lt;em&gt;JupyterHub&lt;/em&gt;’s browser-based Linux desktop environment to collaboratively test, explore, visualize, and process Earth science data simultaneously with the same user experience they expect from using &lt;em&gt;QGIS&lt;/em&gt; on their personal computers! Better yet, getting started was as simple as logging in.&lt;/strong&gt; Our workshop was a success story not just in education, but also in open source and collaborative development, and we want to share what we learned.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="A map depicting Greenland is displayed within QGIS software running in a cloud-based desktop environment. A visualization of September 2012 Arctic sea ice concentration is overlaid." src="https://jasongrout.github.io/medium-archive/pelican/posts/2023/desktop-gis-software-in-the-cloud-with-jupyterhub/images/001-1_ZG76hcKdS3-4PppQ6lSnuQ.jpg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Note the browser tabs at the top of this screenshot; this is a full desktop-based GIS environment running QGreenland in the cloud!&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The JupyterHub used by the QGreenland 2023 Researcher Workshop was generously provided by the &lt;a href="https://cryointhecloud.com/"&gt;NASA CryoCloud&lt;/a&gt; team, whose mission is to help researchers transition to cloud-based collaboration.&lt;/p&gt;
&lt;h2 id="about-qgreenland"&gt;About QGreenland&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://qgreenland.org/"&gt;QGreenland&lt;/a&gt; is an open-source Greenland-focused geospatial data package for &lt;a href="https://qgis.org/en/site/"&gt;QGIS&lt;/a&gt;, a community-owned graphical Geographic Information System (GIS) platform. Researchers and members of the public leverage QGreenland’s ready-to-use interdisciplinary datasets to do field planning, teach about glaciers, and much more.&lt;/p&gt;
&lt;p&gt;QGreenland’s MIT-licensed &lt;a href="https://github.com/nsidc/qgreenland/"&gt;source code&lt;/a&gt; uses community-maintained open software like &lt;a href="https://gdal.org/index.html"&gt;GDAL&lt;/a&gt; and &lt;a href="https://qgis.org/pyqgis/latest"&gt;PyQGIS&lt;/a&gt; to automate data normalization and populate the QGIS project with important information like data provenance and the order of layers in the QGIS Layers Panel. Check out &lt;a href="https://qgreenland.readthedocs.io"&gt;our documentation&lt;/a&gt; to learn more! QGreenland also has a &lt;a href="https://www.youtube.com/@qgreenland/videos"&gt;YouTube channel&lt;/a&gt; with tutorials produced by &lt;a href="https://cires.colorado.edu/outreach/programs/qgreenland"&gt;CIRES Education and Outreach&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="A map depicting Greenland is displayed within QGIS software running in a cloud-based desktop environment. Visualizations of bathymetric depth, Greenland ice sheet thickness, and Arctic sea routes are overlaid." src="https://jasongrout.github.io/medium-archive/pelican/posts/2023/desktop-gis-software-in-the-cloud-with-jupyterhub/images/002-0__t2MDU659mlYEvxD.jpg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;&lt;em&gt;Once QGIS is installed, opening QGreenland is as easy as double-clicking the included “.qgs” file. Here, a representative view of QGreenland v3 alpha in QGIS is displayed with newly updated layers: Arctic sea routes (National Geospatial Intelligence Agency), bathymetric depth (General Bathymetric Chart of the Oceans (GEBCO)), and ice thickness (IceBridge BedMachine Greenland v5) layers.&lt;/em&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Based on user research, QGreenland has enabled:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the public to more easily access data gathered by researchers visiting Greenland: &lt;em&gt;“In Greenland, people are often asking, ‘how can we find the data the foreign scientists bring back from Greenland?’ Now we can directly utilize much of it.”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;researchers to plan field work: &lt;em&gt;“Being able to use QGreenland at our field station was critical to our research process!”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;educators to develop interactive lessons about Greenland and climate change: &lt;em&gt;“…using QGreenland for presentations because it is presentation quality already.”&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="qgreenlands-2023-researcher-workshop"&gt;QGreenland’s 2023 researcher workshop&lt;/h2&gt;
&lt;p&gt;One of the QGreenland team’s most important forms of direct user interaction and support is facilitating workshops. Most recently, we hosted a 3-day (total of 9 hours) virtual workshop for researchers focused on working with geospatial data in an open science framework. All of the &lt;a href="https://qgreenland-workshop-2023-researcher.github.io/content/materials.html"&gt;materials&lt;/a&gt; covered in the workshop were built &lt;a href="https://qgreenland-workshop-2023-researcher.github.io/content/built-with-open-source.html"&gt;using open-source tools&lt;/a&gt; and are MIT-licensed and &lt;a href="https://github.com/qgreenland-workshop-2023-researcher/qgreenland-workshop-2023-researcher.github.io"&gt;published on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="a-personal-computer-in-the-cloud"&gt;A “personal computer” in the cloud&lt;/h3&gt;
&lt;p&gt;We decided early on that we wanted to use JupyterHub to solve the diverse problems that come with “bring your own device” workshops. We experimented with administering our own &lt;a href="http://z2jh.jupyter.org"&gt;JupyterHub on Kubernetes&lt;/a&gt;, but the setup overhead was too high for our short workshop. CryoCloud’s JupyterHub enabled us to avoid this overhead and focus on serving our participants. Because the software that comprises CryoCloud is open-source and developed in collaboration with the communities CryoCloud serves, we could directly contribute to curating a computing environment ideal for our participants.&lt;/p&gt;
&lt;p&gt;JupyterHub is known for providing access to Jupyter Notebooks via JupyterLab, but it turns out it can also be used to host pretty much any interactive web based application! The &lt;a href="https://github.com/jupyterhub/jupyter-server-proxy/"&gt;jupyter-server-proxy&lt;/a&gt; project enables this, and there are additional packages that make running specific applications easier. &lt;a href="https://github.com/jupyterhub/jupyter-rsession-proxy"&gt;jupyter-rsession-proxy&lt;/a&gt; makes it easy to run &lt;a href="https://posit.co/download/rstudio-server/"&gt;RStudio&lt;/a&gt; inside JupyterHub, &lt;a href="https://github.com/betatim/vscode-binder/"&gt;jupyter-vscode-proxy&lt;/a&gt; allows running code-server (fully open source self-hosted version of Visual Studio Code) inside a JupyterHub, etc. Pertinent to our use case is &lt;a href="https://github.com/jupyterhub/jupyter-remote-desktop-proxy"&gt;jupyter-remote-desktop-proxy&lt;/a&gt;, which lets you run a complete Linux desktop environment inside your JupyterHub! This was critical for our workshop, as it allowed us to use QGIS — purely desktop software, not adapted for the web — from inside a web browser. Workshop participants did not need to install anything. This enabled participants to focus on the &lt;em&gt;content&lt;/em&gt; of our workshop rather than the logistics of setting up and debugging tools on their varied machines.&lt;/p&gt;
&lt;p&gt;The CryoCloud JupyterHub enabled each of our workshop participants to provision their own compute environment (JupyterLab + Linux Desktop) with all of our workshop’s dependencies pre-installed. It also set everyone on equitable footing — someone accessing the workshop on a 10 year old laptop would get the same computing resources as someone on a brand new MacBook Pro.&lt;/p&gt;
&lt;h3 id="challenges-scaling-qgreenland"&gt;Challenges scaling QGreenland&lt;/h3&gt;
&lt;p&gt;The CryoCloud JupyterHub already had &lt;em&gt;jupyter-remote-desktop-proxy&lt;/em&gt; and &lt;em&gt;QGIS&lt;/em&gt; installed, so we could validate this approach to our workshop quickly. However, to use &lt;em&gt;QGreenland&lt;/em&gt; at this scale, we needed to solve a couple of usability problems. The first issue was a user experience problem: the operating system did not have appropriate file type associations for &lt;em&gt;QGIS&lt;/em&gt;, so files like the &lt;em&gt;QGreenland&lt;/em&gt; project file would not open in &lt;em&gt;QGIS&lt;/em&gt; when double-clicked in the desktop file browser. We quickly discovered a solution and integrated it with a &lt;a href="https://github.com/CryoInTheCloud/hub-image/pull/59"&gt;simple pull request&lt;/a&gt; to the Docker image we were using.&lt;/p&gt;
&lt;p&gt;The second problem was a performance problem: QGIS would take several minutes to open QGreenland from the hub’s shared storage drive. After some investigation, it turned out this was due to us loading multiple GB of data from an NFS share! While a long term solution might involve getting QGIS to load data directly from cloud object storage (like S3), we instead decided to go a different route — provision each user a small, fast and temporary &lt;a href="https://aws.amazon.com/ebs/"&gt;Elastic Block Store&lt;/a&gt; disk. At the start of the workshop, we provided all users a small script that would copy the dataset from NFS to this faster disk once, and this drastically reduced load times from about 5 minutes to under 3 seconds! You can follow our debugging process &lt;a href="https://github.com/CryoInTheCloud/hub-image/issues/60"&gt;on this issue&lt;/a&gt;, and find the JupyterHub config used to provision these disks &lt;a href="https://github.com/2i2c-org/infrastructure/blob/5078e5b6e2115930468f910f3095a9ffd1261eb3/helm-charts/basehub/values.yaml#L616"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By overcoming these challenges, we created a smooth, intuitive, and performant computing experience for all of our participants, most of whom had never been exposed to this sort of collaborative computing environment.&lt;/p&gt;
&lt;h3 id="outcomes"&gt;Outcomes&lt;/h3&gt;
&lt;p&gt;The workshop participants engaged in small group work to complete various exercises, group discussions, and data scenarios. Each group produced Jupyter Notebooks and GitHub Discussions posts as deliverables. We created an &lt;a href="https://qgreenland-workshop-2023-researcher.github.io/outcomes/"&gt;outcomes&lt;/a&gt; webpage to summarize our participants’ accomplishments. One highlight was &lt;a href="https://github.com/orgs/qgreenland-workshop-2023-researcher/discussions/categories/fair-care"&gt;participants’ insightful commentary on FAIR &amp;amp; CARE principles.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Based on these outcomes, we consider our workshop a success. While we put in a significant amount of time creating our materials, CryoCloud’s cloud costs and our time investment in preparing computing resources were relatively small. For approximately 25 people, our cloud costs break down to roughly &lt;strong&gt;$1/person/day&lt;/strong&gt;!&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;The CryoCloud JupyterHub met our workshop needs and provided a delightful experience for administrators and participants alike, and we are excited for what’s next. JupyterLab 4 and jupyter_collaboration v1.0.0, a real-time collaboration extension, were &lt;a href="/posts/2023/jupyterlab-4-0-is-here/"&gt;just announced&lt;/a&gt;, and the CryoCloud team is currently working to integrate these new releases into their hub. Real-time collaboration will enable exciting cloud use cases, like small groups working together on the same notebook without a screen share, or organizers providing technical support in a live notebook. We anticipate running this workshop again. We are excited to use JupyterHub again and look forward to experimenting with these new features!&lt;/p&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;h3 id="reviewers"&gt;Reviewers&lt;/h3&gt;
&lt;p&gt;In alphabetical order, thanks to Twila Moon, Yuvi Panda, Tasha Snow, and Alyse Thurber for their time contributing to this post!&lt;/p&gt;
&lt;h3 id="cryocloud"&gt;CryoCloud&lt;/h3&gt;
&lt;p&gt;Snow, Tasha, Millstein, Joanna, Scheick, Jessica, Sauthoff, Wilson, Leong, Wei Ji, Colliander, James, Pérez, Fernando, James Munroe, Felikson, Denis, Sutterley, Tyler, &amp;amp; Siegfried, Matthew. (2023). CryoCloud JupyterBook (2023.01.26). Zenodo.&lt;a href="https://doi.org/10.5281/zenodo.7576602"&gt;https://doi.org/10.5281/zenodo.7576602&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="2i2c"&gt;2i2c&lt;/h3&gt;
&lt;p&gt;2i2c is a non-profit organization that runs open-source &lt;a href="https://github.com/2i2c-org/infrastructure"&gt;infrastructure&lt;/a&gt; for collaborative computing, and maintains the CryoCloud JupyterHub used in this workshop. You can see the complete configuration of this JupyterHub in this &lt;a href="https://github.com/CryoInTheCloud/hub-image"&gt;public repository&lt;/a&gt;.&lt;/p&gt;
</content><category term="accessibility"/><category term="cloud computing"/><category term="education"/><category term="events"/><category term="geoscience"/><category term="JupyterHub"/><category term="science"/><category term="workshops"/></entry></feed>