I'm trying to make a dashboard where my data have around 7-8 columns and 1500-2000 entries. There are two columns which are numeric on which I want to do summation. Rest of the columns I want to use for slicing the data(creating subset by adding filters or slicing it according to entries of other columns).
I wanted to make dashboard where anyone can create bar charts or summary tables on the go. I was able to achieve this using rpivottable
.
My second step is to show data that is being mapped in those charts. This won't make much sense if chart is at a basic level i.e 1.5k-2k entries but as i slice the data further and further based on filters from rest of the columns. I'll come to a point where only 80 or 100 rows are satisfying a list of filters. I want to show these rows in the shiny dashboard itself.
I'm using this code to create below dashboard but the data is all the data that I have read.
library(shiny)
library(DT)
library(rpivotTable)
data <-read.csv("Book1.csv")
ui = fluidPage(
rpivotTableOutput("test"),DT::dataTableOutput('table'))
server = function(input, output) {
output$test <- renderRpivotTable({
rpivotTable(data = data) })
output$table <- renderDataTable(
data, options = list(
pageLength = 100
)
)
I'm able to create the charts and table using rpivottable
and DT
package but is there a way to link both of these ? Since Data table now is simply showing all the data that was read originally.
As in, If I want to see data that constitutes the orange bar in second picture and i click on the orange bar is there a way for the table to show data that make up the orange bar?