Webapp R Shiny Help

VarunVankineni
VarunVankineni Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 3 ✭✭✭

Hi, I am very new to DSS and I am facing multiple difficulties trying to get a shiny webapp running, would be great if someone could answer/elaborate on the following,

  • Is there any way I can get access to a console while editing the app, the log is pretty much useless and the preview gives very little info (or am I doing something wrong here that I should be editing elsewhere)
  • How do I use code from the library (or global library) in my webapp
  • Any other inputs/experiences on how you would develop a shiny app in dataiku (or is it not recommended)

Best Answer

  • Sarina
    Sarina Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 317 Dataiker
    edited July 17 Answer ✓

    Hi @VarunVankineni
    ,

    For debugging, you can add print statements in your server code if you want to inspect data, and the print statements will be reflected in the webapp "Log" tab. The full logs are also available on the right-hand sidebar "Logs" selection. Note that you do have to click the "refresh" button to see updated logs if you performed some actions in the UI and then want to see the updated logs as a result of your actions.

    Screen Shot 2021-08-27 at 5.46.46 PM.png

    That said, it may be easier to debug at least some of your code in a notebook and then port it over to a webapp after you have it working as expected.

    For using a code file in a webapp, do you mean something like an R project library? If so, you can call R project library code from within a webapp. For example, if I have the following R library file that contains a function:

    Screen Shot 2021-08-27 at 5.57.52 PM.png

    In my shiny webapp server tab I can import the library like so:

    library(dataiku)
    dkuSourceLibR("myLibrary.R")
    


    And then call my function within the webapp. You can read more about this here: Sharing R code within a project

    However, if I am misunderstanding what type of code file you are looking to use, please let me know.

    Thanks,
    Sarina

Answers

  • CoreyS
    CoreyS Dataiker Alumni, Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 1,150 ✭✭✭✭✭✭✭✭✭

    Hello @VarunVankineni
    and welcome to both Dataiku and the Dataiku Community. Since you mentioned that you are very new to Dataiku here are a few resources that you may find helpful, if you haven't accessed them already, while you wait for a more complete response:

    1. Visualization (Dataiku Academy): This includes a Hands-On: Shiny Webapp section
    2. Hands-On: Shiny Webapp (Knowledge Base): This is the Hands-On referenced above

    I hope this helps!

  • VarunVankineni
    VarunVankineni Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 3 ✭✭✭

    Hi Corey,

    I did go through the hands on.

    It doesn't showcase how one can use a code file in the library into the shiny webapp. It is also very hard to develop in the webapp without an actual console, which does exist when we are working on code recipes.

    Could you help me out with these issues.

  • VarunVankineni
    VarunVankineni Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 3 ✭✭✭

    I think you answered my questions accurately. This is the kind of file I wanted to import into the webapp.

    Thanks!

Setup Info
    Tags
      Help me…