Shiny by Example
I’ve found the best way to learn Shiny is by example. When I started working with Shiny, I could look at previous projects on my team. Since this is no longer an option, I’ve found some instructive examples to learn from below.
Example 1: Solid Shiny Dashboard
This example (source) uses Shiny Dashboard and efficiently makes an elegant dashboard.
It’s also a good demonstration of Leaflet, which I always recommend for anything mapping related.
Example 2: Shiny S&P 500 Dashboard
This dashboard was made by Zhe Yang. Clone this repository and try to run it. Installing all the dependencies can take awhile but it’s worth it. There are a number of things to like about this dashboard:
- It’s a good example of a standard Shiny Dashboard App.
- The Time Series Tab is especially insightful.
- The organization of all the different features is great. The main functionality is all in the sidebar and more specific feature sets are tabs within the main pane.
- Once you install all the dependencies, it just works.
In addition to the examples above, here are some resources I’ve found useful.
Shiny Components:the official documentation on shiny components is very useful.
shinydashboard makes it easy to structure your Shiny App. This Page has everything that you need to know to get started.
Reactive Programming: The hardest thing about shiny programming is properly understanding reactive programming. Read this to understand how reactivity in Shiny works. This is also useful for learning about
vue.js in the future.
- Shiny Material for making
- For calling Python code from R, you can use Falcon to build a REST API in Python. Other popular choices
- DT for interactive tables and pretty tables.
- Leaflet For Mapping
- Official Showcase of Examples has the bux example and many more.
- Dashboard Themes would be fun to experiment with. Note: I haven’t tried this one personally.
- I’ve used plotly in the past for any type of visualization that requies more interactivity than ggplot.
- This is a good example of Plotly in action.
Feel free to share!