Qiusheng Wu uses Streamlit to build a popular geospatial application

Learn how Qiusheng created Earth Engine web apps with geemap

Posted in Case study, July 21 2022

In April 2020, Assistant Professor in the Department of Geography at the University of Tennessee Qiusheng Wu launched geemap, an open-source Python package for interactive mapping with Google Earth Engine and open-source mapping libraries (e.g., ipyleaflet, folium). It quickly became one of the most popular geospatial packages with over 2,000 GitHub stars.

“Before Google Earth Engine, generating a satellite timelapse like this could take hours or even days,” Qiusheng said. “You can now create satellite timelapses in minutes, but it can still take hundreds of lines of Earth Engine JavaScript.”

Jupyter environment wasn’t enough

Qiusheng wanted to apply geospatial big data, machine learning, and cloud computing to study environmental change (surface water, wetland inundation dynamics, etc.).

With geemap, users could explore large geospatial datasets, perform planetary-scale analysis, and create satellite timelapses with a few lines of code or a few clicks. But they still needed to install Python and run geemap in a Jupyter environment.

Qiusheng wanted his app to let anyone create satellite timelapses with no code. So he used VoilĂ  for turning notebooks into standalone web apps and dashboards.

Geemap got so popular, it maxed out free cloud hosting options

To make the notebooks public, Qiusheng needed to host them on a server.

“I’ve been using ngrok to turn a local computer into a secure web server and connect it to the ngrok cloud service, which accepts traffic on a public address,” Qiusheng said. “It’s one of the easiest ways to turn a Jupyter notebook into an app and it’s great for demos. But the downside of using a local computer as a public server is that it might be hacked.”

He switched to hosting it on a Heroku cloud server. Soon after, the app became so popular, and it used up the free monthly dyno hours.

“I had to shut down the app when it exceeded the free limit and restart it at the beginning of each month, which was inconvenient,” Qiusheng said.

Discovering Streamlit

Qiusheng first discovered Streamlit in October 2021. It quickly became his favorite package for developing and deploying interactive web apps. He used it for geemap because:

  • It was free.
  • It was open-source.
  • It had similar functionality to ipywidgets but was much easier to use (no need for a callback function).
  • He could deploy unlimited public apps from GitHub to Streamlit Community Cloud for free (no need for a server).
  • Deployment was automatic, so he could focus on coding.
  • The apps were publicly accessible.

Streamlit powers the new version of geemap — and makes it available to anyone

Soon after Qiusheng released the Streamlit Geospatial app for creating satellite timelapse animations for any location in less than 60 seconds, it got widely circulated on social media (check out the blog post, the video tutorial, and the repo code).

People all over the world made animations of environmental changes: urban growth, land reclamation, river dynamics, vegetation dynamics, coastal erosion, and volcanic eruptions (use hashtags #streamlit on Twitter and #BigRiverAnimation on LinkedIn to see examples).

There are now more than ten apps in Streamlit Geospatial, including the app for visualizing U.S. real estate data in 3D.

There is even an app for creating maps of hurricane tracks built with Streamlit and Tropycal (check out the repo code here).

To make it easier for users to make their own geospatial apps, Qiusheng created an app template based on Streamlit’s native support for multipage apps. Users can fork the repository and add more apps if needed. The app can be deployed to Streamlit Cloud, Heroku, or MyBinder (here is the repo code).

Wrapping up

“I’m an advocate of open science and reproducible research,” Qiusheng said. “I love sharing Streamlit apps and making geospatial technologies more accessible to everyone. I have developed several open-source packages for geospatial analysis and interactive mapping (e.g., geemap, leafmap, geospatial, pygis, lidar). You can see my open-source projects on GitHub and video tutorials on my YouTube channel.”

Thank you for reading Qiusheng’s story! If you have any questions, please leave them below in the comments or reach out to Qiusheng on Twitter, LinkedIn, or YouTube.

Happy coding and learning! 🧑‍💻


This is a companion discussion topic for the original entry at https://blog.streamlit.io/qiusheng-wu-uses-streamlit-to-build-a-popular-geospatial-application/
3 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.