8/14/2020

Gapminder Data Analysis

Codes

library(plotly)
library(gapminder)
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"
            )
        )

Scatter Plot