library(plotly)
library(gapminder)
This Simple analysis based on the gapminder dataset.
plot_ly(gapminder, y = ~lifeExp, color = ~continent, type = "box")
fig <- plot_ly(gapminder,
x = ~gdpPercap,
y = ~lifeExp,
size = ~pop,
color = ~continent,
frame = ~year,
text = ~country,
hoverinfo = "text",
type = 'scatter',
mode = 'markers'
)
fig <- fig %>% layout(
xaxis = list(
type = "log"
)
)
fig