10 "output_type": "stream",
18 "print(platform.python_version())"
23 "execution_count": 92,
31 "data_files = glob.glob(os.path.expanduser('~\\\\Data\\\\*.json'))\n"
36 "execution_count": null,
42 "for file in data_files:\n",
43 "\tprint(f\"{file}\", os.path.getsize(file))\n"
48 "execution_count": null,
52 "import pandas as pd\n",
56 "file = data_files[6]\n",
59 "f = open(file, encoding='utf-8')\n",
60 "df = pd.read_json(f)"
65 "execution_count": 94,
69 "import numpy as np\n",
70 "df['count'] = np.zeros(len(df))\n",
76 "execution_count": 95,
80 "closed_months = pd.to_datetime(df['closedAt'], format='ISO8601')\n",
81 "df['closed_month'] = closed_months.dt.month"
86 "execution_count": 97,
90 "df['mile'] = [d.get('title') if d else None for d in df.milestone]"
95 "execution_count": 98,
100 "grp_df = df.groupby(['mile', 'closed_month']).count().reset_index()"
105 "execution_count": null,
113 "cell_type": "markdown",
116 "#### Plot of closed issues by month and milestone for one project\n"
121 "execution_count": 99,
125 "import seaborn as sns\n",
126 "import matplotlib.pyplot as plt\n",
132 "execution_count": null,
136 "plt.figure(figsize=(10, 6))\n",
137 "sns.lineplot(x='closed_month', y='url', hue='mile', data=grp_df, marker='o', ci=None)\n",
138 "plt.xlabel('Closed Month')\n",
139 "plt.ylabel('ClosedAt')\n",
140 "plt.title('Stacked Line Chart: Milestone Effort by Issue Close Date')\n",
141 "plt.xticks(rotation=45)\n",
142 "plt.legend(title='Mile', loc='upper left')\n",
149 "display_name": "Python 3",
150 "language": "python",
158 "file_extension": ".py",
159 "mimetype": "text/x-python",
161 "nbconvert_exporter": "python",
162 "pygments_lexer": "ipython3",