Skip to content

Instantly share code, notes, and snippets.

@aammd
Created September 26, 2017 12:54
Show Gist options
  • Save aammd/f596d41f02739aeffa00681f6669a0e8 to your computer and use it in GitHub Desktop.
Save aammd/f596d41f02739aeffa00681f6669a0e8 to your computer and use it in GitHub Desktop.
library(pageviews)
require(lubridate)
today <- pageview_timestamps()
earlysept <- pageview_timestamps(lubridate::ymd("2017-09-01"))
korsmit <- pageviews::article_pageviews("en.wikipedia", "Roy_Kortsmit", start = earlysept, end = today)
korsmit %>%
ggplot(aes(x = date, y = views)) + theme_minimal() + geom_line() + geom_point() +
labs(title = "Roy Kortsmit wikipedia pageviews", subtitle = "Before and after he made 4 saves in 5s.")
ggsave("~/Desktop/goalie.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment