Created
June 7, 2021 08:29
-
-
Save geekygirldawn/a7d3feb5fef7497e793c6b83ffc7eb06 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import pandas as pd | |
import matplotlib | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
pr_all['diff'] = pr_all.first_response_time - pr_all.pr_created_at | |
pr_all['yearmonth'] = pr_all['pr_created_at'].dt.strftime('%Y-%m') | |
pr_all['diff_days'] = pr_all['diff'] / datetime.timedelta(days=1) | |
year_month_list = pr_all.yearmonth.unique() | |
year_month_list.sort() | |
first_response_median = pr_all.groupby(['repo_name', 'yearmonth'], as_index=False).median()[['repo_name', 'yearmonth', 'diff_days']] | |
sns.set_style('ticks') | |
sns.set(style="whitegrid", font_scale=2) | |
fig, ax = plt.subplots() | |
fig.set_size_inches(24, 8) | |
title = "\nTimely Responses:" | |
my_plot = sns.boxplot(x='yearmonth', y='diff_days', data=pr_all, ax=ax, order=year_month_list, showfliers = False, whis=3).set_title(title, fontsize=30, color=title_color) | |
Author
geekygirldawn
commented
Jun 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment