amy17519
8/22/2016 - 4:09 AM

Starbucks | R Shiny | Server | Collectible Editions and Countries of Origin

  output$plotedition <- renderPlotly({
    plot_ly(data = popular_editions, x = Popularity , y = Scarcity, mode = "markers",
            text= paste(Name, "<br>Edition: ", Edition, "<br>Country: ", Country,
                        "<br>City: ",City, "<br>Owner: ",Owner,"<br>Seeker: ",
                        Seeker,"<br>Trader: ",Trader, "<br>Difficulty: ",Difficulty),
            color = Edition, 
            colors = c('olivedrab3','navyblue','indianred2','darkgoldenrod1')) %>%
      layout(title='Collectible Editions: Scarcity vs. Popularity',
             xaxis=list(title='Popularity: Seeker/max(Seeker)'),
             yaxis=list(title='Scarcity: |Owner/max(Owner)-1|'))
  })
      
  output$plotcountry <- renderPlotly({
    plot_ly(data = popular_country, x = Popularity , y = Scarcity, mode = "markers",
            text= paste(Name, "<br>Edition: ", Edition, "<br>Country: ", Country,
                        "<br>City: ",City, "<br>Owner: ",Owner,"<br>Seeker: ",
                        Seeker,"<br>Trader: ",Trader, "<br>Difficulty: ",Difficulty),
            color = Country, 
            colors = c('#F16745','#404040','#7BC8A4','#4CC3D9',"#93648D","#FFC65D")) %>%
      layout(title='Collectible Countries: Scarcity vs. Popularity',
             xaxis=list(title='Popularity: Seeker/max(Seeker)'),
             yaxis=list(title='Scarcity: |Owner/max(Owner)-1|'))
  })