Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amy17519/8ce2bead9c62756b76b2687fc79a0218 to your computer and use it in GitHub Desktop.
Save amy17519/8ce2bead9c62756b76b2687fc79a0218 to your computer and use it in GitHub Desktop.
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|'))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment