diff --git a/dev/github_extraire.R b/dev/github_extraire.R index bca208041658c4f0ad328f59e07d8d7d5dca3900..3f96c5a382cefba47d42c4cac4b6283e97b41502 100644 --- a/dev/github_extraire.R +++ b/dev/github_extraire.R @@ -123,4 +123,5 @@ get_github_issues <- function(repo) { combined_data <- rename(combined_data, "updated_at" = 'last_updated') # Afficher les premières lignes du tableau combiné date_datamart <-format.Date(Sys.Date(), '%d/%m/%Y') -save.image("github.RData") +#save.image("github.RData") +save(combined_data, file = "github.RData") diff --git a/dev/gitlab_classique.R b/dev/gitlab_classique.R index 4aa920f4452f9b4065b591369480e340db003e62..0dd21fce1a995949a2ec9105616bf62256e301aa 100644 --- a/dev/gitlab_classique.R +++ b/dev/gitlab_classique.R @@ -176,4 +176,5 @@ project_ids <- c(41600697, 19859695, 49118792, 21138017, 18439010, 44145525, 184 all_data_gitlab <- get_data_from_multiple_projects(base_url, project_ids, private_token) all_data_gitlab <- rename(all_data_gitlab, "type" = 'data_type',"message" = 'discussion') # Afficher un aperçu des données combinées -save.image("gitlab.RData") +# save.image("gitlab.RData") +save(all_data_gitlab, file = "gitlab.RData") diff --git a/dev/gitlab_forge.R b/dev/gitlab_forge.R index f6694fc5657019bc9a888f462b978d471f9eb31a..d1688d3b1655fd2d80e62cbbfac825917a8209ae 100644 --- a/dev/gitlab_forge.R +++ b/dev/gitlab_forge.R @@ -235,5 +235,6 @@ all_data_forge <- all_data_forge %>% mutate(project_name = name) %>% select(-name) %>% dplyr::distinct() # Afficher un aperçu des données combinées -save.image("gitlab_forge.RData") +# save.image("gitlab_forge.RData") +save(all_data_forge, file = "gitlab_forge.RData") diff --git a/dev/script_routine.R b/dev/script_routine.R index c5ebf7bc9856c60932dbb72b4c5049a4a5add663..e145d0307b409c001c8e00edf2e7c998afda9bfd 100644 --- a/dev/script_routine.R +++ b/dev/script_routine.R @@ -7,4 +7,4 @@ source(file = "dev/github_extraire.R") source(file = "dev/gitlab_classique.R") source(file = "dev/gitlab_forge.R") -source(file = "dev/deploiment_sur_dataviz.R") +source(file = "dev/deploiment_sur_dataviz.R", verbose = TRUE) diff --git a/server.R b/server.R index 5caca22a380b5fd53c6f60d1d51ade78e25bee8d..868b4c930418c592f0b2d522cd4e77a6317c6122 100644 --- a/server.R +++ b/server.R @@ -101,9 +101,15 @@ # Retourner les liens avec un saut de ligne après chacun do.call(tagList, c(links, list(br()))) + }) }) + filteredData2 <- reactive({ + req(input$idprojet) + filteredData() %>% dplyr::filter(project_name %in% input$idprojet ) + }) + output$filteredPlot <- plotly::renderPlotly({ p <- ggplot2::ggplot(filteredData(), ggplot2::aes(x = updated_at, y = as.factor(project_name))) + ggplot2::geom_jitter(ggplot2::aes(color = type, text = paste(updated_at, message, sep = "\n")), @@ -120,6 +126,25 @@ gouvdown::scale_color_gouv_discrete(palette = "pal_gouv_qual2") + plotly::ggplotly(p, tooltip = "text") + }) + + output$filteredPlot2 <- plotly::renderPlotly({ + p <- ggplot2::ggplot(filteredData2(), ggplot2::aes(x = updated_at, y = as.factor(project_name))) + + ggplot2::geom_jitter(ggplot2::aes(color = type, text = paste(updated_at, message, sep = "\n")), + size = 3, alpha = 0.5, + height = 0, width = 0.75 + ) + + ggplot2::labs(shape = "Type", color = "Type", x = "") + + ggplot2::scale_x_datetime(date_labels = "%d/%m", timezone = "Europe/Paris") + + gouvdown::theme_gouv() + + ggplot2::theme( + axis.text.x = ggplot2::element_text(angle = 0, hjust = 1), + axis.title.y = ggplot2::element_blank() + ) + + gouvdown::scale_color_gouv_discrete(palette = "pal_gouv_qual2") + + plotly::ggplotly(p, tooltip = "text") }) } diff --git a/ui.R b/ui.R index cc2e5ab4b176c861de90b05b635a2fb85fdf87e7..174198b3c242ed6c137659a93fe412bd99a99bd6 100644 --- a/ui.R +++ b/ui.R @@ -48,12 +48,24 @@ ui <- shinygouv::navbarPage_dsfr( # header & footer ------ selectizeInput(inputId = "idprojet",label = "Projet : ", choices = NULL, multiple = TRUE)), column_dsfr(2), - shinygouv::column_dsfr(12,uiOutput("lien"),extra_class = "fr-my-6w") + column_dsfr(3), + shinygouv::column_dsfr(9,uiOutput("lien"),extra_class = "fr-my-6w") ), + tabsetPanel_dsfr("tableau_proj", + tabPanel_dsfr(id = "graphe_total", title = "×“ÝÆ©ÞD╝É¥®Æ║₣♬∫☼∰", shinygouv::fluidRow_dsfr( shinygouv::column_dsfr(12, plotly::plotlyOutput("filteredPlot", height = "700px"), extra_class = "fr-my-1w" ) ) - ) -) + ), + tabPanel_dsfr(id = "graph_input", title = "graphique par choix", + shinygouv::fluidRow_dsfr( + shinygouv::column_dsfr(12, plotly::plotlyOutput("filteredPlot2", height = "700px"), + extra_class = "fr-my-1w" + ) + ) + ) + )#↑ tableau_proj + )# ↑ Navbar +)# ↑ UI