Discussion: when is Shiny a good choice vs when is it not the right tool for the job?

Advocating for the RMarkdown approach -- I have also become a big fan of creating packages with RMarkdown templates as a way of letting less-technical users engage with data. I think this can provide as much structure/support as a GUI (especially in the amazing RStudio IDE) but be a lot more flexible. The flexibility is beneficial both to end-users as they become immersed in R and can add in their own functionalities, plus it decreases the overhead a ton for developers. I can focus more on writing useful functionalities instead of just maintaining a GUI or being handicapped by needing to change my layout for users to access different views.

Of course, it's a less formal approach and possibly a bit less protected from fat-fingering or misuse, but I definitely agree that for a lot of internal uses RMarkdown is an amazing middle ground.

(Plus, for end-users trying to do analysis through a tool -- parameters they chose in a Shiny app to generate a view are much harder to document and preserve for reproducible future analysis than RMarkdown code chunks.)

Yes, with mixed results and in the end still decided to just pay a huge contract to a commercial platform.

Specifically, I wanted a lightweight web app that handled user sign on, roles, and security. I also wanted a relational database tied to the app to be able to quickly load results instead of querying remote databases. This wasn't an original idea, but something I got inspired to do based on a talk from EARL London 2015: https://youtu.be/b9LJU9nx4gQ

What I started down was a Django app in python that would have views be shiny apps written in R. The MySQL database would store the data needed for the user logins and permission sets, and the actual data being displayed in the shiny apps. This would be a really powerful system if I could get the Django app to play nice with the shiny parameters, but I wasn't able to get to a point where the app automatically plugged in the correct parameters based on the user into the shiny app without the user having the ability to modify them via the url. I tried building the equivalent shiny apps using the django-dash module, but it was not the same. Instead I gave up and just have a lightweight web portal with links to the various shiny apps and giving everyone the same access. All the shiny apps that required more permissions were redone in the commercial platform.

(shameless package maintainer here) @pditty RInno installs a local Shiny app like any other software with a desktop icon and uninstall options etc. It does not require hosting, nor is it just a local file. It is a professional way to deliver a shiny app that will open in your browser, and requires zero R knowledge on the part of the user.

9 Likes

I'm definitely investigating your package as a potential solution for delivering apps. I expect to ship one this week to a client! Thanks for maintaining and building this package!

1 Like

That is great to hear. We have found that clients really enjoy continuous installations so that bug fixes and new features can be released without requiring a new installation. Let me know if you are interested in doing that, and I would be happy to help!

In the spirit of Dean's thread, shiny-based desktop apps are a bit clunky because of how many software dependencies they often have. However, it is hard to beat their ability to visualize and model data. I think it is often much easier to build analytics apps and dashboards with Shiny than it is to do even rudimentary statistics/modelling in other application frameworks. The only ones that come close are in the Python ecosystem (Django, Flask, Dash, etc.), and Dash is the only one that does not require true front-end development but it is much further behind Shiny in terms of functionality.

6 Likes

Using Shiny since version 0.1. Perfect for small to moderate programs

Problems

  • Structuring the code when the App grows. Having submodules that can be tested individually. The numeric-coding stuff can be put into the package, but for the logic it should be possible to do some boxing. I know there are modules, but they solve only a small part of the use-cases.
  • I know there is a shinytest package, and a Webinar on it coming. I never got happy with it's use. But I also never got happy with RSelenium. Maybe the UI is simply to much of a moving target.
  • Internationalization. I tried it before the package shiny.i18n was out, and it was a mess, so I gave up. Something like i18n should be more tightly integrated into shiny, so one can be sure that it has a future.
  • Just kidding: shinyJS is a great package, and I love many other contributions of the author, but it needs a rework. To many curly lines in my code because of missing parameters.
1 Like

Very interesting discussion. I have only used Shiny for one small hobby project ages a ago, but I have been thinking about suitability of Shiny for my next project. The goal is to develop tools for performing certain exploratory data mining and further modeling tasks in an interactive point-and-click fashion. Basically something like initial model -> plot features -> select features from the plot and modify some parameters-> run model again using selected features -> plot -> ... When I heard about this project my initial idea was to use R(&C++, the modelling phase is custom stuff) for modeling phase and integrate this with the visualization phase using ggplot&Shiny, but I'm not really familiar with all the capabilities of Shiny and related tools and if there are better tools for integrated modelling and visualization?

edit: Ooh, just found ggiraph! This looks super useful.

1 Like

The approach of the MLR guys might give some good inspiration for possibilities and directions one could go for this via shiny: http://mlr-org.github.io/shinyMlr/

1 Like

I work in Higher Education in a Faculty level very data-centric role that blends curriculum development, instructional design and data science. I guess educational data science is a thing, but whatever.

I use shiny to make dashboards and apps to provide access to data, visualizations, analyses and services to faculty, students, staff and administrators to help improve teaching and learning. It's fantastic for that purpose and I built the use case to purchase shiny server pro on a few simple apps.

For my situation shiny is great for making these custom applications to engage and educate, do so in a tailored and meaningful way that reflects their culture and provide easy to use accessible solutions.

2 Likes

@dmenne FYI those errors that rstudio shows because of missing parameters - I'm planning on fixing that for the next CRAN release (when shinyjs first came out rstudio didn't have diasnostics yet so it wasn't an issue). If you have any other issues with the package please do let me know

2 Likes

You might want to look into R Connect as it makes it easy for users to share their analysis (RMarkdown, Shiny Apps, etc) inside an organization without the technical know-how of opening markdown files.

No, if you want to be able to view a Tableau file; it can be opened with Tableau's free viewer. :slight_smile:

1 Like

Since I'm always interested in using the right tools for the right project; thus I've taken the liberty to summarize the pros and cons of using Shiny in projects from the discussion thus far by you wonderful people. I'll update this as more discussion occurs.

Pros

  • great for fast prototyping and fairly easy to use for someone who’s not a programmer
  • Shiny is also great for dashboards, where you have some data (such as in a database or a file) and you want to show have a page where you show all sorts of metrics in an interactive way.
  • Great for simple data entry
  • Great for more complex statistical modeling and its visualization
  • Create windows executables with the RInno package

Cons

  • Not great at multi-page apps
  • No async support (but in progress)
  • Challenging to use for gathering and saving data to the database.
  • Traditional IT support skills may be limited
  • Cost of maintaining an application
  • Many software dependencies in certain applications
  • Code structure when the app grows
  • Internationalization issues
11 Likes

It's in all my apps, and otherwise perfect

1 Like

@Dripdrop12 Is there a newer walk through on how to setup and use RInno? Should I run these line on every user's machine to install RInno for them to use the shiny app? Please clarify.

install.packages("RInno")
require(RInno)
RInno::install_inno()

create_app(app_name = "myapp", app_dir = "path/to/myapp")
compile_iss()

Thanks!

This is a huge problem for us as well! Especially when many of our long-term clients prefer to receive deliverables as Excel files...and only one person left on our team familiar with VBA. I'd love to be able to promote Shiny as an interactive alternative to our Excel-based simulators but there just doesn't seem to be a way to do it for them.

2 Likes

Nope, that is still how you would do it, but it produces an installation file that you can share with everyone. This is the main advantage of using RInno. Users do not need to know how to use R to use your Shiny app. They can easily install it themselves, and after the installation, there will be an icon on their desktop which will open the Shiny app in their browser. If your users don't have R installed, add this to your create_app call include_R = TRUE. I'm working on adding Chrome as well because it has a nice feature called "app mode" which makes it look like a true, stand-alone desktop application.

RInno is a great way to do this. We did it with multiple clients before I developed the R package, and now we have used the package with a few more. It turns Shiny into a desktop app that anyone can install even if they do not have R installed (just add include_R = TRUE to create_app). We've created multiple what-if analysis and visualization tools for financial risk clients, and we connect to on-premise databases. So there are not as many security concerns.

3 Likes

Thanks, will try as described.

Great thread! A large part of what I do in my current job is build data reporting tools / dashboards for clients (usually teams that don't have in-house analysts/developers or are without a company wide BI solution).

I'm using R for the majority of my data cleaning/wrangling work, but would like to be able to use shiny more often as the final deliverable.

We have built a few shiny apps for clients that are hosted via shinyapps.io with authentication, and I've also been looking into open-source shiny server options with authentication (has anyone tried Shiny Proxy?)

However, as mentioned above, many clients don't like their data being hosted outwith their internal servers. With that in mind I'm definitely going to look into RInno.

I'd also be curious to know how anyone else out there doing shiny-based consultancy/freelance work (@daattali?) go about deploying the final product to clients that don't have any in-house R server support (shiny server pro, Rstudio connect etc).

Cheers!

2 Likes

I am equally interested in anyone with experience using Shiny Proxy. It looks like a cool project, but I have not had much time to dig into it.

Let me know if you have any questions about RInno. I'd be happy to help you get setup, and there is a basic how-to guide on FI Labs that might be useful.

5 Likes