From: Edward Delaporte Date: Fri, 16 Feb 2024 21:04:01 +0000 (-0600) Subject: Add ability to exclude milestones to allow focus on bigger ones X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/commitdiff_plain/39aa091f5951f7dde7ae65831749d9c5d03b8b51?hp=f2562a307496028edbcb6c337bc5fcd69ca2ffc2 Add ability to exclude milestones to allow focus on bigger ones --- diff --git a/data/issues.ipynb b/data/issues.ipynb index 7608fd7..011beec 100644 --- a/data/issues.ipynb +++ b/data/issues.ipynb @@ -90,8 +90,8 @@ "outputs": [], "source": [ "\n", - "grp_df = df.groupby(['mile', 'closed_month']).count().reset_index()\n", - "grp_df.drop(columns=['milestone', 'title', 'url'], inplace=True)" + "dfg = df.groupby(['mile', 'closed_month']).count().reset_index()\n", + "dfg.drop(columns=['milestone', 'title', 'url'], inplace=True)\n" ] }, { @@ -101,7 +101,7 @@ "outputs": [], "source": [ "\n", - "print(grp_df)" + "print(dfg)" ] }, { @@ -111,6 +111,19 @@ "#### Plot of closed issues by month and milestone for one project\n" ] }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [], + "source": [ + "exclude_from_chart = [\n", + "\t'Job Aid Ideas']\n", + "\n", + "for ex in exclude_from_chart:\n", + "\tdfg = dfg[dfg['mile'] != ex]\n" + ] + }, { "cell_type": "code", "execution_count": null, @@ -129,7 +142,7 @@ "outputs": [], "source": [ "plt.figure(figsize=(10, 6))\n", - "sns.barplot(x='closed_month', y='url', hue='mile', data=grp_df)\n", + "sns.barplot(x='closed_month', y='count', hue='mile', data=dfg)\n", "plt.xlabel('Closed Month')\n", "plt.ylabel('ClosedAt')\n", "plt.title('Stacked Line Chart: Milestone Effort by Issue Close Date')\n",