4

So I just deployed my movie recommendation on Shinyapps, but there's still one thing I want to change. Please see the pictures below. enter image description here

Since I didn't want to put "You might also like this" in another box, I don't really know how to adjust it in html/css format. To me, it's too close to the sidebar, I just want to make some spaces between it and the sidebar.

My code:

ui <- shinyUI(dashboardPage(skin="blue",

                            dashboardHeader(title = "Movies"),
                            dashboardSidebar(
                              sidebarMenu( 
                                menuItem(
                                  list( 
                                    selectInput("select", label = h5("Select 1 movie you like"),
                                                choices = as.character(movies$title[1:length(unique(movies$movieId))]),
                                                selectize = TRUE,
                                                selected = "Toy Story (1995)"),
                                    submitButton("Done")
                                  )
                                )
                              )
                            ),


                            dashboardBody( 
                              includeCSS("data/custom.css"),
                              fluidRow(
                                box(
                                  width=3,
                                  height=400,
                                  status = "primary", 
                                  title = "introduction",
                                  textOutput("name1"),
                                  #br(),  
                                  imageOutput("myImage",height="300px")
                                  #valueBoxOutput("tableRatings1")

                                ),

                                box(
                                  width=8,
                                  height=400,
                                  status = "primary",
                                  title = "Plot",
                                  textOutput("des1"),
                                  br(),
                                  h4("Ratings"),
                                  br(),
                                  valueBoxOutput("tableRatings1")
                                 )
                               ),

                              fluidRow(
                                h4("You might also like this"),
                                box(
                                  width=2,
                                  height=220,
                                  status = "danger",
                                  imageOutput("myImage1",height="150px"),
                                  textOutput("myreco1")
                                  #textOutput("myrate1")
                                ),
                                box(
                                  width=2,
                                  height=220,
                                  status = "danger",
                                  imageOutput("myImage2",height="150px"),
                                  textOutput("myreco2")
                                  #textOutput("myrate2")
                                ),
                                box(
                                  width=2,
                                  height=220,
                                  status = "danger",
                                  imageOutput("myImage3",height="150px"),
                                  textOutput("myreco3")
                                  #textOutput("myrate3")
                                ),
                                box(
                                  width=2,
                                  height=220,
                                  status = "danger",
                                  imageOutput("myImage4",height="150px"),
                                  textOutput("myreco4")
                                  #textOutput("myrate4")
                                ),
                                box(
                                  width=2,
                                  height=220,
                                  status = "danger",
                                  imageOutput("myImage5",height="150px"),
                                  textOutput("myreco5")
                                  #textOutput("myrate5")
                                )
                              )

                            )

)
)   

By the way, my shinyapps is running very slow now, I am not sure why. It used to run faster. And this application just costs total 4 hours at the moment. If I use free plan, every application have 25 hours right?

Makiyo
  • 441
  • 5
  • 23
  • It appears that you are using `shinydashboard`, you need to ensure your text is included inside a `fluidRow` or `column` and not standing alone. You should provide a [minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) so that we aren't guessing how to help you. – Kevin Arseneau Oct 03 '17 at 03:48
  • @KevinArseneau Hi! I just list it :) – Makiyo Oct 03 '17 at 03:54
  • your code is not reproducible. However, I would suggest you put your content into a column... `fluidRow(column(width = 2, h4("your text"), box(...)))` – Kevin Arseneau Oct 03 '17 at 04:09
  • @KevinArseneau Thank you! i will try it :) – Makiyo Oct 03 '17 at 04:21
  • I remember your question about showing Movie Cover images, How did you manage to do it? – amrrs Oct 03 '17 at 10:20
  • 1
    @amrrs if you use shiny dashboard as well, imageOutput("image") on ui.R and output$image <- renderImage({ list(src = paste0("data/photo/", "MovieName", ".png"))}, deleteFile = FALSE) on server.R. I hope this helps :) – Makiyo Oct 04 '17 at 11:13

1 Answers1

4
HTML("<h4>&nbsp; &nbsp; &nbsp; You might also like this</h4>")
Alex P
  • 1,574
  • 13
  • 28