RStudio Connect - Shiny Facelift for Corporate Use

    Enough time has passed since the mention in a previous publication about the use of RStudio Connect in combat conditions in order to share the results. A brief summary - “give two!”. And think about optimizing the analytics department. See below for details.

    As an additional reading, I recommend taking a look at the detailed publication “Data at GDS (Government Digital Service). Reproducible Analytical Pipeline ” on the UK Government Services Analytical Blog on a similar topic.

    What is RStudio Connect?

    RStudio Connect is a slightly paid product for the publication of analytical information both within the company and for the rest of the world. Analytical processing and preparation of reporting submissions is carried out using R. The server runs on-premise on a * nix platform, which automatically eliminates 3 headaches: no clouds, no Win Server licensing (and even suddenly SQL), and no problems with Unicode.

    I deliberately wrote “analytical information”, because the views generated by R + RStudio Connect are very far from classical reports like Jasper \ BO ... The main practically useful published results (reports) can be attributed to three main classes:

    • Interactive html reports;
    • Static pdf reports;
    • Shiny apps.



    html and pdf documents are generated in the literate programming paradigm from R Markdown source files containing a text description and code inclusion for dynamic calculation and visualization of the results of these calculations in the form of tables, figures and interactive js widgets. In the latest release of RStudio Connect, reports can be parameterized (until there was a need to check), which adds additional flexibility.

    The advantages of this approach are obvious:

    • Various forms of representation are obtained from one source .Rmd file, which eliminates repeated duplication of source and intermediate data, calculations and representations;
    • manual copy-paste and the associated labor and unreliable results are completely eliminated;
    • the results are reproducible and can be performed on demand \ schedule;
    • dynamic js-elements allow in a compact form to provide detailed information. Examples of htmlwidgets available in R can be viewed here .

    Since RStudio Connect is enterprise-oriented, the database has all the required functions:

    • User authorization with the ability to bind to LDAP;
    • Flexible system of rights;
    • Scheduled report generation;
    • E-mail notifications;
    • Self-diagnosis and monitoring tools;
    • Load management;
    • Action logging;
    • Creation of local repositories of R packages for each application;
    • Publish documents from the RStudio IDE in a single click;
    • Support for versioning of published documents;
    • and so forth

    Each published document may have different access rights. Starting from "only the author" and ending with "viewing to everyone who knows the link."

    And that's why the term “reports” is used in quotation marks. An interesting conclusion that follows from the bundle of functions is that scheduled launch + literate programming + e-mail notifications is as follows:
    in fact, we can schedule any R scripts that are embedded with executable blocks in .Rmd files. These scripts can perform absolutely any actions, for example, take data from files \ databases, do web scrapping, conduct calculations, publish data to external systems \ run external scripts, etc., with a detailed "story-log" in the form combinations of text, tables, graphs. And this "story-log" upon completion of work can be automatically sent to interested parties. Those. the system in the now popular genre of "comics" can report on the results of very complex processes!

    In fact, an ideal tool for the practical implementation of the concept of operational analytics.


    I attach the PDF file itself . Busi letters are found in Adobe Reader and in tables created by inserting the R-code, and in the figures and in the text.

    From a technical point of view, a pdf version is being prepared using the R markdown → LaTeX → PDF chain. So the result is a print-quality document with huge customization capabilities.

    Apps and Dashboards

    Everything is simple here. Built-in Shiny Server with enterprise features. Everything that was written about Shiny was previously available in full.

    And publishing applications in one-click allows you to easily and easily make all kinds of dashboards, interactive applications, including online analytics on the server and custom presentations for any employee to suit his current needs.

    There are no restrictions on the number of published applications. No admin needed to publish. No need to register in the queue to the developers. Take it, do it.


    Moreover, integration with corporate LDAP makes it easy to manage the visibility of these applications.

    Despite the fact that the product was recently released, it is essentially an enterprise wrapper for the tried and tested Shiny + RMarkdown + R + LaTeX blocks.

    In industrial operation, he proved to be excellent. Moreover, the question “why do we now need the other n + 1 established 'reporting systems'” to which no convincing answers have been found hangs in the air.


    1. All screenshots shown are taken from the test bench and basically do not contain real business indicators.
    2. The publication is informational, not educational. As practice shows, there is not enough time to understand the essence of the mass of interesting and useful things. RStudio Connect deserves to get to know him, at least briefly. If you cook correctly, then you can greatly reduce the company's current costs for the analytical unit.

    Previous post: “The Fifth Element in the R. WYSIWYG Ecosystem ecosystem for analysts”

    Also popular now: