7/13/2023 0 Comments Rstudio shiny appAny time the user manipulates the province selection or date picker, this variable is re-evaluated. In the same way, input$date and input$date represent the selected start and end date in the date picker.įirst, we create a reactive variable for the filtered data. The server function requires the input and output parameters where input refers to the input ids of the ui, for example, input$provinces denotes the current selection of provinces. Similarly, the DT::dataTableOutput() makes the data table interactive so that you can sort by column, search for values, and show a selection of the data. The plotlyOutput turns a static plot into an interactive one in which you can select data points, zoom in and out, view tooltips, and download a chart image. On the right, there is a mainPanel() that shows the plot, figure description, and table. Depending on the widget, you may need to specify additional parameters such as choices (list of selections in dropdown), selected (the default choice), multiple (whether only one or more selections are allowed), or the start and end values of the date picker. The label is the text you see above each control. Each of these controls has an input id which is an identifier that the server part of our app recognizes. Shiny apps support a variety of control widgets such as dropdown menus, radio buttons, text fields, number selectors, and sliders. In our app, we have a left sidebarPanel() with a header, category, province, date range selector, and download button.
0 Comments
Leave a Reply. |