Creating a Shiny dashboard

Shiny is a web application framework for R. It does not require the user to code HTML. There are normally two sets of code: the server and the user interface (UI). Both sets of code work on top of a Shiny server. A Shiny server can reside on one of your machines or in the cloud (via several hosting companies).

The Shiny server code set deals with accessing data, computing results, obtaining direction from the user, and interacting with other server code set to change results. The UI code set deals with layout of the presentation.

For example, if you had an application that produced a histogram of data the server set would obtain the data and produce results, display the results, and interact with the user to change the result—for example, it might change the number of buckets or range of data being displayed. The UI code set would strictly be concerned with layout.

Shiny code does not run under Jupyter. You can develop the coding using RStudio. RStudio is an integrated development environment (IDE) for developing R scripts.

With RStudio you can develop the code sets for the server.R and ui.R components and then run them. Running a Shiny application will:

  • Open a new browser window
  • Use the coding to generate the corresponding HTML for your coding
  • Display the generated HTML in the new browser window

Once your application is working you can also take the next step to deploy the application onto an R server on the internet, where you can share the associated URL to your application with other users.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.131.168