Skip to content

Instantly share code, notes, and snippets.

@wisnunugroho21
Created September 26, 2018 08:30
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 wisnunugroho21/781530da6cb0cf1ae483c7b3e5fd949f to your computer and use it in GitHub Desktop.
Save wisnunugroho21/781530da6cb0cf1ae483c7b3e5fd949f to your computer and use it in GitHub Desktop.
#install library gapminder dan tidyverse jika belum diinstall
#install.packages("gapminder")
#install.packages("tidyverse)
library(tidyverse)
library(gapminder)
gapminder_subset <- gapminder %>%
filter(year == 2007)
ggplot(gapminder_subset, aes(x = lifeExp, y = gdpPercap, color = continent,
size = pop)) + geom_point() + scale_y_log10() +
scale_x_log10() + labs(title = "Grafik data negara tahun 2007")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment