Shiny lets you build interactive dashboards and websites without knowing HTML, CSS, or Javascript. Create tools for yourself, or share your data, analysis, and visualizations with the world through simple apps and interfaces. This workshops introduces Shiny for Python (yes Python!). You will learn how to build and deploy a basic Shiny app, with multiple figures and a user interface containing widgets that control the figure content.
I originally developed some materials for this workshop in my disasterShinyPy GitHub repo. You can also read about my initial experience with Python + Shiny on my blog post here.
In this workshop, we will build an app that is similar to this version on shinyapps.io.
Earthquake data come from the USGS and were downloaded here, and volcano data come The Simithsonian Institute and were downloaded from here.
You can access the presentation on Google Slides here.
If you want to run the examples locally, you can clone this repo and follow these steps:
-
I recommend creating a conda environment.
conda create --name shinyTest python shiny pandas matplotlib cartopy conda activate shinyTest
If
shiny
is not available for you onconda
(e.g., it may not be available for mac users yet). Please removeshiny
from theconda
command above, and then after activating the environment, installshiny
withpip
using the commandpip install shiny
. -
Withing the
examples/
directory run the app withshiny run --reload example1.py
(and replace
example1.py
with the file that you want to run) -
Point your browser to http://127.0.0.1:8000/ to view your app.