```r
p <- ggplot(data = gapminder, 
            mapping = aes(x = gdpPercap, 
                          y = lifeExp))
p + geom_point() + 
    geom_smooth(method = "gam") + 
    scale_x_log10(labels = scales::dollar) +
    labs(
      x = "GDP per capita",
      y = "Life Expectancy in Years",
      title = "Economic growth and life expectancy",
      caption = "Source: Gapminder."
    )
```