Skip to content

Instantly share code, notes, and snippets.

@kristiker
Created July 1, 2022 13:54
Show Gist options
  • Save kristiker/a6f4b110ba62b0a8a3c768b77924c203 to your computer and use it in GitHub Desktop.
Save kristiker/a6f4b110ba62b0a8a3c768b77924c203 to your computer and use it in GitHub Desktop.
library("rvest")
library("anytime")
# From https://steamdb.info/app/730/patchnotes/
patchnotes <- read_html("C:/Users/kristi/Documents/Counter-Strike_ Global Offensive (App 730) · Patches and Updates · SteamDB.html")
update_timestamps <- patchnotes %>%
html_nodes("tbody") %>%
.[[2]] %>%
html_elements("tr") %>%
html_attr("data-date") %>%
as.integer()
# break by months
hist(anydate(update_timestamps), breaks="month", freq=TRUE, main="CS:GO Update Frequency", xlab="Month", ylab="Updates", las=1, border="orange")
#library("ggplot2")
# break into 70 pieces
#qplot(anytime(update_timestamps), bins=30, alpha=I(.2), col=I("red"), main="CS:GO Update Frequency")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment