]> us-delaporte.pagekite.me Git - dotfiles.git/commitdiff
Add ability to exclude milestones to allow focus on bigger ones
authorEdward Delaporte <delaport@illinois.edu>
Fri, 16 Feb 2024 21:04:01 +0000 (15:04 -0600)
committerEdward Delaporte <delaport@illinois.edu>
Fri, 16 Feb 2024 21:04:01 +0000 (15:04 -0600)
data/issues.ipynb

index 7608fd74725e3d5037de9943f4c5765fdc252ef7..011beec2ea3144c44dfd250c94619c3e28411f66 100644 (file)
@@ -90,8 +90,8 @@
    "outputs": [],
    "source": [
     "\n",
    "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"
    ]
   },
   {
    ]
   },
   {
    "outputs": [],
    "source": [
     "\n",
    "outputs": [],
    "source": [
     "\n",
-    "print(grp_df)"
+    "print(dfg)"
    ]
   },
   {
    ]
   },
   {
     "#### Plot of closed issues by month and milestone for one project\n"
    ]
   },
     "#### 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,
   {
    "cell_type": "code",
    "execution_count": null,
    "outputs": [],
    "source": [
     "plt.figure(figsize=(10, 6))\n",
    "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",
     "plt.xlabel('Closed Month')\n",
     "plt.ylabel('ClosedAt')\n",
     "plt.title('Stacked Line Chart: Milestone Effort by Issue Close Date')\n",