dashboardHeader(title="Title"),
dashboardSidebar(sidebarMenu(
menuItem(" Data",tabName=" Data",icon =icon("dashboard"))
)),
dashboardBody(
tabItem(tabName="Data",
fluidRow(
box(title="Please choose a country,month and year (Selecting Multiple countries is possible)", width=12,status="warning",solidHeader=TRUE,
selectInput("Country","Country",choices=countries_list, multiple=FALSE),
selectInput("Month","Month",choices=month_list,multiple=FALSE),
selectInput("Year","Year",choices=year_list,multiple=FALSE),
downloadButton("DownloadData","Download Data as csv"))
),
fluidRow(
##box(title = "Grids",width=12,leafletOutput("Leafplot", height = 250),status = "primary",solidHeader = TRUE)
box(title="Grids",width=12,highchartOutput("Map",height=450),status="primary",solidHeader=TRUE)
)
)
)
)```
```server<-function(input,output){
#Interactive filters & download button tab
data1<-reactive(
{
req(input$Country)
req(input$Month)
req(input$Year)
data_filtered<-df_Main%>%filter(country %in% input$County)%>%filter(month_name %in% input$Month)%>%filter(year %in% input$Year)
}
)
#head(df_Main)
#browser()
output$Map <- renderHighchart({
req(input$Country)
req(input$Month)
req(input$Year)
data_filtered<-df_Main%>%filter(country %in% input$County)%>%filter(month_name %in% input$Month)%>%filter(year %in% input$Year)
highchart(type="map")%>%hc_add_series_map(worldgeojson,df=data_filtered,value="Value",joinBy=c("name","country"))
}
)
df_Main is the data frame that reads from excel where I have the coordinates for the grids
So far I have been able to visualize the select input buttons with a static image of the worldmap