Skip to content

Commit 8ad3d4f

Browse files
committed
barplot of type of data storage used at work added
1 parent 366c7b0 commit 8ad3d4f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

SurveyAnalysisWebApp/server.R

+16
Original file line numberDiff line numberDiff line change
@@ -446,5 +446,21 @@ server<-function(input,output)
446446
#what is the type of Data storage at work
447447
output$DataStorageWork<-renderHighchart({
448448

449+
DataStoragedf<-SurveyDf %>% select(EmployerIndustry,WorkDataStorage) %>%
450+
filter(EmployerIndustry==input$industry8) %>%
451+
group_by(WorkDataStorage) %>%
452+
summarise(Count = n()) %>%
453+
mutate(Percentage = round((Count/sum(Count))*100,digits = 2)) %>%
454+
top_n(15) %>%
455+
arrange(desc(Percentage))
456+
457+
DataStoragedf[1,]<-NA
458+
459+
hchart(na.omit(DataStoragedf),hcaes(x=WorkDataStorage,y=Percentage),type="column",name="Percentage % ",color="#C70039") %>%
460+
hc_exporting(enabled = TRUE) %>%
461+
hc_title(text="Bar plot what type of data storge is used at work",align="center") %>%
462+
hc_add_theme(hc_theme_ffx())
463+
464+
449465
})
450466
}

0 commit comments

Comments
 (0)