ajpelu / respine

MIT License
0 stars 0 forks source link

Despliegue app Ventana de la Ciencia #19

Closed ajpelu closed 6 years ago

ajpelu commented 7 years ago

He creado una nueva folder con una réplica de la app y he includo algunos de los cambios que hemos acordado con Mario del PC para su correcta visualización sobre maqueta. Algunas de las cuestiones realizadas:

ajpelu commented 7 years ago

Para aumentar el tamaño de los plotOutpus, dendro de plotOutput(), incluir el argumento height=. Como el tamaño será igual para todos los plots, he definido una variable al inicio llamada h_plots y le he asignado el valor 1000.

ajpelu commented 7 years ago

Para eliminar el box de los levelplot, hay que ajustar varios parámetros:

ajpelu commented 7 years ago

UPDATE, tamaño. Vamos a utilizar un solo panel para los mapas, por tanto el height se define igualmente en el plotOutput, pero en este caso lo hacemos en server.R ya que todos los plotOutputs se trasladan allí.

ajpelu commented 7 years ago

Se han incluido los spinners de load. Se incluyen en los plotOutputs() en el server.

ajpelu commented 7 years ago

Add buttons for each plot. He seguido las directrices de este ejemplo:

library(shiny)
ui=shinyUI(
  fluidPage(
    sidebarLayout(
      sidebarPanel(
        hr(),
        actionButton("button1", label = "Button 1"),
        hr(),
        actionButton("button2", label = "Button 2"),
        width = 2
      ),
      mainPanel(

        wellPanel(

          uiOutput("plots")
        )

      )
    )
  )
)

server=shinyServer(function(input, output) {

  observeEvent(input$button1, {
    output$plots=renderUI({plotOutput("plot")})
    output$plot <- renderPlot({
      plot(1:10)
    })

  })

  observeEvent(input$button2, {
    output$plots=renderUI({plotOutput("plotly")})
    output$plotly <- renderPlot({
      plot(20:30)
    })
  })

})

shinyApp(ui,server)
ajpelu commented 7 years ago

Se han creado infoBox con valores de riqueza. Faltaría incluir titulo a los info BOx

ajpelu commented 7 years ago

Para separar un poco la colorkey (legend) de los plots, utilizar el list() dentro del par.settings de levelplot(), del siguiente modo:

layout.heights = list(xlab.key.padding= 12) 

Esto se ha hecho en los temas definidos al inicio y en el par setting del paisaje inicial