<commit_before>PlotActiveUserCohorts <- function(data) {
	#cohortData <- read.csv("2010-cohorts.csv")

	# Convert the sign up month cohorts ("2015-01", etc) to
	# dates so they can be used in in the ggplot below
	data$signed.up <- as.Date(paste(data$signed.up, "-01", sep = ""))
	graph <- ggplot(data,
		aes(x = signed.up, y = active.users, fill = active))
	graph <- graph + geom_area()
	graph <- graph + labs(x = "Sign Up Month", y = "Active Users")
	graph <- graph + guides(fill = FALSE)

	# Call print so that the graph is rendered in RStudio
	print(graph)
}

activities <- read.csv("test-data.csv", sep = "\t",
	col.names = c("user.id", "date"), header = FALSE)
activities$date <- as.Date(activities$date)
activities$cohort <- format(activities$date, "%Y-%m")

# We determine which cohort each user belongs to based on his first activity
users <- aggregate(cohort ~ user.id, activities, min)

# Figure out all of the cohorts that we need to analyze
# TODO: What happens if there is month without any data?
cohorts <- sort(unique(users$cohort))

# Construct a data frame that we can supply to ggplot
signed.up <- vector()<commit_msg>Update test file name to account for new test data path<commit_after>PlotActiveUserCohorts <- function(data) {
	#cohortData <- read.csv("2010-cohorts.csv")

	# Convert the sign up month cohorts ("2015-01", etc) to
	# dates so they can be used in in the ggplot below
	data$signed.up <- as.Date(paste(data$signed.up, "-01", sep = ""))
	graph <- ggplot(data,
		aes(x = signed.up, y = active.users, fill = active))
	graph <- graph + geom_area()
	graph <- graph + labs(x = "Sign Up Month", y = "Active Users")
	graph <- graph + guides(fill = FALSE)

	# Call print so that the graph is rendered in RStudio
	print(graph)
}

activities <- read.csv("data/test-data.csv", sep = "\t",
	col.names = c("user.id", "date"), header = FALSE)
activities$date <- as.Date(activities$date)
activities$cohort <- format(activities$date, "%Y-%m")

# We determine which cohort each user belongs to based on his first activity
users <- aggregate(cohort ~ user.id, activities, min)

# Figure out all of the cohorts that we need to analyze
# TODO: What happens if there is month without any data?
cohorts <- sort(unique(users$cohort))

# Construct a data frame that we can supply to ggplot
signed.up <- vector()
{'fraction_non_alphanumeric': 0.1366968520914187, 'fraction_numerical': 0.01034928848641656, 'mean_word_length': 4.178571428571429, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3648588', 'n_tokens_mistral': 819, 'n_tokens_neox': 734, 'n_words': 269}