Skip to content

Commit

Permalink
Merge pull request #1 from wincowgerDEV/master
Browse files Browse the repository at this point in the history
sunburst plots and dropdown fixed
  • Loading branch information
hannahhapich authored Jul 25, 2023
2 parents e5e5727 + 3ec8065 commit 45d3672
Show file tree
Hide file tree
Showing 5 changed files with 1,248 additions and 8 deletions.
1 change: 1 addition & 0 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openai.txt
1,140 changes: 1,140 additions & 0 deletions data/item_embeddings_new.csv

Large diffs are not rendered by default.

88 changes: 88 additions & 0 deletions data/material_embeddings_new.csv

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ library(ggforce)
library(skimr)
library(ggdark)

setwd("/Users/hannahhapich/Documents/R_Scripts/TrashTaxonomy-master")

#Build cleaning functions
cleantext <- function(x) {
x <- tolower(gsub("[[:space:]]", "", x))
Expand Down Expand Up @@ -759,12 +757,11 @@ server <- function(input,output,session) {

#Plot new merged data as sunburst plots
##Material Sunburst Plot ----

plot_materials <- reactive({
output$plot1 <- renderPlotly({
req(input$df_)
req(input$d_f_)

Material_DF <- dataframe %>%
Material_DF <- dataframe() %>%
rename(Count = count) %>%
group_by(material) %>%
summarise(Count = n()) %>%
Expand All @@ -782,9 +779,8 @@ server <- function(input,output,session) {

material_grouped <- grouped_uncertainty(DF_group = Material_DF_group, Group_Alias = MaterialsAlias, Group_Hierarchy = MaterialsHierarchy, type = "material")

Materials_Plot <- sunburstplot(df_join_boot = material_grouped)

output$plot1 <- renderPlotly(Materials_Plot)
sunburstplot(df_join_boot = material_grouped)

})


Expand Down
15 changes: 15 additions & 0 deletions ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ ui <- fluidPage(
}
"))
),
tags$head(tags$style(HTML("
.form-group.shiny-input-container select {
background-color: #000000; /* Black background color */
color: #ffffff; /* White font color */
margin: 0; /* Remove margins */
padding: 0; /* Remove padding */
display: inline-block; /* Add this to allow vertical-align to take effect */
vertical-align: middle; /* Align the dropdown vertically in the middle */
width: 100%; /* Set width to 100% of containing element */
}
table.dataTable tbody td {
vertical-align: middle; /* Align the content of the cells vertically in the middle */
text-align: center;
}
"))),

#About ----
tabsetPanel(
Expand Down

0 comments on commit 45d3672

Please sign in to comment.