Skip to content

Commit

Permalink
cairn
Browse files Browse the repository at this point in the history
  • Loading branch information
benjyazoulay committed Nov 4, 2021
1 parent b9aa4e2 commit 008e1f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
13 changes: 4 additions & 9 deletions gallicanet/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ library(ggnetwork)
library(htmlwidgets)
library(shinybusy)

httr::set_config(config(ssl_verifypeer = 0L))

Plot<-function(input,tableau){
show_modal_spinner()
tableau<-tableau[tableau$base2>=input$plancher,]
Expand Down Expand Up @@ -101,11 +103,7 @@ prepare_data<-function(input,liste){
liste$requete<-str_replace_all(liste$requete," ","%20")
liste$requete<-iconv(liste$requete,from="UTF-8",to="ASCII//TRANSLIT")

if(input$source==3){
url<-"https://www.cairn.info/resultats_recherche.php?src1=Tx&word1=fran%C3%A7ois+mauriac&exact1=1&operator1=&nparams=1&submitAdvForm=Chercher"
print(RETRY("GET",url,times = 3, add_headers(.headers = c("Host"= "www.cairn.info","User-Agent"="PARIS-SACLAY-Benjamin-Gallicanet"))))
}


progress$set(message = "Patience...", value = 0)

liste$base<-NA
Expand Down Expand Up @@ -285,10 +283,7 @@ shinyServer(function(input, output, session){
output$mot<-renderUI({selectizeInput("mot","Coeur du réseau",choices=sort(unique(c(tableau$ecrivain_1,tableau$ecrivain_2))),selected=mot_select )})
output$plot<-renderPlotly(Plot(input,tableau))
})
# observeEvent(input$update,
# {
# output$plot<-renderPlotly(Plot(input,tableau))
# })


output$downloadData <- downloadHandler(
filename = function() {
Expand Down
1 change: 0 additions & 1 deletion gallicanet/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ shinyUI(navbarPage("Gallicanet",
uiOutput("mot"),
div(style="display: inline-block;vertical-align:bottom;width: 45%;",numericInput("plancher","Nombre minimum de mentions pour chaque terme",100,step = 10)),
div(style="display: inline-block;vertical-align:bottom;width: 45%;",numericInput("seuil","Seuil définissant un lien entre deux termes",0.03,min = 0,max=1,step = 0.01))#,
#actionButton("update","Mettre à jour le graphe")
)),
column(4,
wellPanel(
Expand Down

0 comments on commit 008e1f5

Please sign in to comment.