Created
October 13, 2016 15:36
-
-
Save dgrtwo/59fa7e1feb8c910907d882567b06cda1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(lubridate) | |
questions <- readr::read_csv("~/Repositories/stacklite/questions.csv.gz") | |
question_tags <- readr::read_csv("~/Repositories/stacklite/question_tags.csv.gz") | |
r_questions <- question_tags %>% | |
filter(Tag == "r") | |
r_questions_by_month <- questions %>% | |
semi_join(r_questions, by = "Id") %>% | |
mutate(Month = round_date(CreationDate, "month")) | |
r_questions_by_month %>% | |
count(Deleted = !is.na(DeletionDate), Month) %>% | |
mutate(Percent = n / sum(n)) %>% | |
ggplot(aes(Month, Percent, color = Deleted)) + | |
geom_line() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment