|
16 | 16 | },
|
17 | 17 | {
|
18 | 18 | "cell_type": "code",
|
19 |
| - "execution_count": null, |
| 19 | + "execution_count": 1, |
20 | 20 | "metadata": {},
|
21 |
| - "outputs": [], |
| 21 | + "outputs": [ |
| 22 | + { |
| 23 | + "data": { |
| 24 | + "text/html": [ |
| 25 | + "Installed package Octokit version 0.32.0" |
| 26 | + ] |
| 27 | + }, |
| 28 | + "metadata": {}, |
| 29 | + "output_type": "display_data" |
| 30 | + }, |
| 31 | + { |
| 32 | + "data": { |
| 33 | + "text/html": [ |
| 34 | + "Installed package NodaTime version 2.4.6" |
| 35 | + ] |
| 36 | + }, |
| 37 | + "metadata": {}, |
| 38 | + "output_type": "display_data" |
| 39 | + } |
| 40 | + ], |
22 | 41 | "source": [
|
23 | 42 | "#r \"nuget:Octokit, 0.32.0\"\n",
|
24 | 43 | "#r \"nuget:NodaTime, 2.4.6\"\n",
|
|
38 | 57 | },
|
39 | 58 | {
|
40 | 59 | "cell_type": "code",
|
41 |
| - "execution_count": null, |
| 60 | + "execution_count": 2, |
42 | 61 | "metadata": {},
|
43 | 62 | "outputs": [],
|
44 | 63 | "source": [
|
|
57 | 76 | },
|
58 | 77 | {
|
59 | 78 | "cell_type": "code",
|
60 |
| - "execution_count": null, |
| 79 | + "execution_count": 3, |
61 | 80 | "metadata": {},
|
62 | 81 | "outputs": [],
|
63 | 82 | "source": [
|
|
74 | 93 | },
|
75 | 94 | {
|
76 | 95 | "cell_type": "code",
|
77 |
| - "execution_count": null, |
| 96 | + "execution_count": 4, |
78 | 97 | "metadata": {},
|
79 | 98 | "outputs": [],
|
80 | 99 | "source": [
|
|
95 | 114 | },
|
96 | 115 | {
|
97 | 116 | "cell_type": "code",
|
98 |
| - "execution_count": null, |
| 117 | + "execution_count": 5, |
99 | 118 | "metadata": {},
|
100 | 119 | "outputs": [],
|
101 | 120 | "source": [
|
|
125 | 144 | },
|
126 | 145 | {
|
127 | 146 | "cell_type": "code",
|
128 |
| - "execution_count": null, |
| 147 | + "execution_count": 6, |
129 | 148 | "metadata": {},
|
130 | 149 | "outputs": [],
|
131 | 150 | "source": [
|
|
143 | 162 | },
|
144 | 163 | {
|
145 | 164 | "cell_type": "code",
|
146 |
| - "execution_count": null, |
| 165 | + "execution_count": 7, |
147 | 166 | "metadata": {},
|
148 | 167 | "outputs": [],
|
149 | 168 | "source": [
|
|
173 | 192 | },
|
174 | 193 | {
|
175 | 194 | "cell_type": "code",
|
176 |
| - "execution_count": null, |
| 195 | + "execution_count": 8, |
177 | 196 | "metadata": {},
|
178 |
| - "outputs": [], |
| 197 | + "outputs": [ |
| 198 | + { |
| 199 | + "data": { |
| 200 | + "text/html": [ |
| 201 | + "<div id=\"7cb88ccf-7a31-4c45-96ba-16a72873def9\" style=\"width: 900px; height: 500px;\"></div>\r\n", |
| 202 | + "<script type=\"text/javascript\">\r\n", |
| 203 | + "\r\n", |
| 204 | + "var renderPlotly = function() {\r\n", |
| 205 | + " var xplotRequire = requirejs.config({context:'xplot-3.0.1',paths:{plotly:'https://cdn.plot.ly/plotly-1.49.2.min'}});\r\n", |
| 206 | + " xplotRequire(['plotly'], function(Plotly) {\r\n", |
| 207 | + "\n", |
| 208 | + " var data = [{\"type\":\"scatter\",\"x\":[\"2020-01-31T00:00:00\",\"2019-11-21T00:00:00\"],\"y\":[2,1]}];\n", |
| 209 | + " var layout = {\"title\":\"Daily Issues\"};\n", |
| 210 | + " Plotly.newPlot('7cb88ccf-7a31-4c45-96ba-16a72873def9', data, layout);\n", |
| 211 | + " \r\n", |
| 212 | + "});\r\n", |
| 213 | + "};\r\n", |
| 214 | + "if ((typeof(requirejs) !== typeof(Function)) || (typeof(requirejs.config) !== typeof(Function))) { \r\n", |
| 215 | + " var script = document.createElement(\"script\"); \r\n", |
| 216 | + " script.setAttribute(\"src\", \"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\"); \r\n", |
| 217 | + " script.onload = function(){\r\n", |
| 218 | + " renderPlotly();\r\n", |
| 219 | + " };\r\n", |
| 220 | + " document.getElementsByTagName(\"head\")[0].appendChild(script); \r\n", |
| 221 | + "}\r\n", |
| 222 | + "else {\r\n", |
| 223 | + " renderPlotly();\r\n", |
| 224 | + "}\r\n", |
| 225 | + "</script>\r\n" |
| 226 | + ] |
| 227 | + }, |
| 228 | + "metadata": {}, |
| 229 | + "output_type": "display_data" |
| 230 | + } |
| 231 | + ], |
179 | 232 | "source": [
|
180 | 233 | "var createdThisMonthByDay = createdThisMonth.GroupBy(i => new DateTime(i.CreatedAt.Year,i.CreatedAt.Month, i.CreatedAt.Day)); \n",
|
181 | 234 | "var lineChart = Chart.Line(createdThisMonthByDay.Select(g => new Tuple<DateTime,int>(g.Key, g.Count())));\n",
|
|
185 | 238 | },
|
186 | 239 | {
|
187 | 240 | "cell_type": "code",
|
188 |
| - "execution_count": null, |
| 241 | + "execution_count": 9, |
189 | 242 | "metadata": {},
|
190 |
| - "outputs": [], |
| 243 | + "outputs": [ |
| 244 | + { |
| 245 | + "data": { |
| 246 | + "text/html": [ |
| 247 | + "<table><thead><tr><th><i>index</i></th><th>CreatedAt</th><th>Title</th><th>State</th><th>Number</th></tr></thead><tbody><tr><td>0</td><td>2020-01-31 23:21:54Z</td><td>Support sending input_request and receiving input_reply messages via the stdin channel</td><td>open</td><td>107</td></tr><tr><td>1</td><td>2020-01-31 22:23:47Z</td><td>make kernel server honor `--log-path` and listen to kernel logging events</td><td>open</td><td>106</td></tr><tr><td>2</td><td>2019-11-21 20:07:55Z</td><td>zsh: command not found: jupyter - Workarounds </td><td>open</td><td>34</td></tr></tbody></table>" |
| 248 | + ] |
| 249 | + }, |
| 250 | + "metadata": {}, |
| 251 | + "output_type": "display_data" |
| 252 | + } |
| 253 | + ], |
191 | 254 | "source": [
|
192 | 255 | "display(openSoFar.Select(i => new {i.CreatedAt, i.Title, State = i.State.StringValue, i.Number}).OrderByDescending(d => d.CreatedAt));"
|
193 | 256 | ]
|
194 | 257 | },
|
195 | 258 | {
|
196 | 259 | "cell_type": "code",
|
197 |
| - "execution_count": null, |
| 260 | + "execution_count": 10, |
198 | 261 | "metadata": {},
|
199 |
| - "outputs": [], |
| 262 | + "outputs": [ |
| 263 | + { |
| 264 | + "data": { |
| 265 | + "text/html": [ |
| 266 | + "<div id=\"cfac8c1e-2b3f-4793-9585-686a6ef682ea\" style=\"width: 900px; height: 500px;\"></div>\r\n", |
| 267 | + "<script type=\"text/javascript\">\r\n", |
| 268 | + "\r\n", |
| 269 | + "var renderPlotly = function() {\r\n", |
| 270 | + " var xplotRequire = requirejs.config({context:'xplot-3.0.1',paths:{plotly:'https://cdn.plot.ly/plotly-1.49.2.min'}});\r\n", |
| 271 | + " xplotRequire(['plotly'], function(Plotly) {\r\n", |
| 272 | + "\n", |
| 273 | + " var data = [{\"type\":\"scatter\",\"x\":[\"2019-11-01T00:00:00\",\"2020-01-01T00:00:00\"],\"y\":[1,2]}];\n", |
| 274 | + " var layout = {\"title\":\"Issues still opened grouped by month\"};\n", |
| 275 | + " Plotly.newPlot('cfac8c1e-2b3f-4793-9585-686a6ef682ea', data, layout);\n", |
| 276 | + " \r\n", |
| 277 | + "});\r\n", |
| 278 | + "};\r\n", |
| 279 | + "if ((typeof(requirejs) !== typeof(Function)) || (typeof(requirejs.config) !== typeof(Function))) { \r\n", |
| 280 | + " var script = document.createElement(\"script\"); \r\n", |
| 281 | + " script.setAttribute(\"src\", \"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\"); \r\n", |
| 282 | + " script.onload = function(){\r\n", |
| 283 | + " renderPlotly();\r\n", |
| 284 | + " };\r\n", |
| 285 | + " document.getElementsByTagName(\"head\")[0].appendChild(script); \r\n", |
| 286 | + "}\r\n", |
| 287 | + "else {\r\n", |
| 288 | + " renderPlotly();\r\n", |
| 289 | + "}\r\n", |
| 290 | + "</script>\r\n" |
| 291 | + ] |
| 292 | + }, |
| 293 | + "metadata": {}, |
| 294 | + "output_type": "display_data" |
| 295 | + } |
| 296 | + ], |
200 | 297 | "source": [
|
201 | 298 | "var lineChart = Chart.Line(openByMonthOfCreation.Select(g => new Tuple<DateTime, int>(new DateTime(g.Date.Year, g.Date.Month, 1),g.Count)));\n",
|
202 | 299 | "lineChart.WithTitle(\"Issues still opened grouped by month\");\n",
|
|
205 | 302 | },
|
206 | 303 | {
|
207 | 304 | "cell_type": "code",
|
208 |
| - "execution_count": null, |
| 305 | + "execution_count": 11, |
209 | 306 | "metadata": {},
|
210 |
| - "outputs": [], |
| 307 | + "outputs": [ |
| 308 | + { |
| 309 | + "data": { |
| 310 | + "text/html": [ |
| 311 | + "<div id=\"3bc2c504-2310-4e3c-91e6-5d190c4ee03f\" style=\"width: 900px; height: 500px;\"></div>\r\n", |
| 312 | + "<script type=\"text/javascript\">\r\n", |
| 313 | + "\r\n", |
| 314 | + "var renderPlotly = function() {\r\n", |
| 315 | + " var xplotRequire = requirejs.config({context:'xplot-3.0.1',paths:{plotly:'https://cdn.plot.ly/plotly-1.49.2.min'}});\r\n", |
| 316 | + " xplotRequire(['plotly'], function(Plotly) {\r\n", |
| 317 | + "\n", |
| 318 | + " var data = [{\"type\":\"scattergl\",\"x\":[\"2019-11-01T00:00:00\",\"2020-01-01T00:00:00\"],\"y\":[1,1],\"name\":\"Idle\"},{\"type\":\"scattergl\",\"x\":[\"2020-01-01T00:00:00\"],\"y\":[1],\"name\":\"Active\"}];\n", |
| 319 | + " var layout = {\"title\":\"Idle and active open issue report\"};\n", |
| 320 | + " Plotly.newPlot('3bc2c504-2310-4e3c-91e6-5d190c4ee03f', data, layout);\n", |
| 321 | + " \r\n", |
| 322 | + "});\r\n", |
| 323 | + "};\r\n", |
| 324 | + "if ((typeof(requirejs) !== typeof(Function)) || (typeof(requirejs.config) !== typeof(Function))) { \r\n", |
| 325 | + " var script = document.createElement(\"script\"); \r\n", |
| 326 | + " script.setAttribute(\"src\", \"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\"); \r\n", |
| 327 | + " script.onload = function(){\r\n", |
| 328 | + " renderPlotly();\r\n", |
| 329 | + " };\r\n", |
| 330 | + " document.getElementsByTagName(\"head\")[0].appendChild(script); \r\n", |
| 331 | + "}\r\n", |
| 332 | + "else {\r\n", |
| 333 | + " renderPlotly();\r\n", |
| 334 | + "}\r\n", |
| 335 | + "</script>\r\n" |
| 336 | + ] |
| 337 | + }, |
| 338 | + "metadata": {}, |
| 339 | + "output_type": "display_data" |
| 340 | + } |
| 341 | + ], |
211 | 342 | "source": [
|
212 | 343 | "var idleByMonth = openSoFar.Where( i => i.Comments == 0).GroupBy(i => new DateTime( i.CreatedAt.Year, i.CreatedAt.Month, 1))\n",
|
213 | 344 | " .Select(g => new {Date = g.Key, Count = g.Count()}).ToArray();\n",
|
|
236 | 367 | },
|
237 | 368 | {
|
238 | 369 | "cell_type": "code",
|
239 |
| - "execution_count": null, |
| 370 | + "execution_count": 12, |
240 | 371 | "metadata": {},
|
241 |
| - "outputs": [], |
| 372 | + "outputs": [ |
| 373 | + { |
| 374 | + "data": { |
| 375 | + "text/html": [ |
| 376 | + "<div id=\"7da87575-6d7f-44ff-b427-a1976e186da9\" style=\"width: 900px; height: 500px;\"></div>\r\n", |
| 377 | + "<script type=\"text/javascript\">\r\n", |
| 378 | + "\r\n", |
| 379 | + "var renderPlotly = function() {\r\n", |
| 380 | + " var xplotRequire = requirejs.config({context:'xplot-3.0.1',paths:{plotly:'https://cdn.plot.ly/plotly-1.49.2.min'}});\r\n", |
| 381 | + " xplotRequire(['plotly'], function(Plotly) {\r\n", |
| 382 | + "\n", |
| 383 | + " var data = [{\"type\":\"scattergl\",\"x\":[\"2019-11-01T00:00:00\",\"2020-01-01T00:00:00\"],\"y\":[1,2],\"name\":\"Created\"},{\"type\":\"scattergl\",\"x\":[\"2020-01-01T00:00:00\",\"2020-02-01T00:00:00\"],\"y\":[70,7],\"name\":\"Closed\"},{\"type\":\"scattergl\",\"x\":[\"2019-07-01T00:00:00\",\"2019-08-01T00:00:00\",\"2019-09-01T00:00:00\",\"2019-10-01T00:00:00\",\"2019-11-01T00:00:00\",\"2019-12-01T00:00:00\",\"2020-01-01T00:00:00\",\"2020-02-01T00:00:00\"],\"y\":[113,112,108,102,91,78,74,42],\"name\":\"Open\"}];\n", |
| 384 | + " var layout = {\"title\":\"Issue report for the current year\"};\n", |
| 385 | + " Plotly.newPlot('7da87575-6d7f-44ff-b427-a1976e186da9', data, layout);\n", |
| 386 | + " \r\n", |
| 387 | + "});\r\n", |
| 388 | + "};\r\n", |
| 389 | + "if ((typeof(requirejs) !== typeof(Function)) || (typeof(requirejs.config) !== typeof(Function))) { \r\n", |
| 390 | + " var script = document.createElement(\"script\"); \r\n", |
| 391 | + " script.setAttribute(\"src\", \"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\"); \r\n", |
| 392 | + " script.onload = function(){\r\n", |
| 393 | + " renderPlotly();\r\n", |
| 394 | + " };\r\n", |
| 395 | + " document.getElementsByTagName(\"head\")[0].appendChild(script); \r\n", |
| 396 | + "}\r\n", |
| 397 | + "else {\r\n", |
| 398 | + " renderPlotly();\r\n", |
| 399 | + "}\r\n", |
| 400 | + "</script>\r\n" |
| 401 | + ] |
| 402 | + }, |
| 403 | + "metadata": {}, |
| 404 | + "output_type": "display_data" |
| 405 | + } |
| 406 | + ], |
242 | 407 | "source": [
|
243 | 408 | "var openDataPoints = openByMonthOfCreation\n",
|
244 | 409 | " .Select(g => new { y = g.Count, x = new DateTime(g.Date.Year, g.Date.Month, 1)} )\n",
|
|
289 | 454 | },
|
290 | 455 | {
|
291 | 456 | "cell_type": "code",
|
292 |
| - "execution_count": null, |
| 457 | + "execution_count": 13, |
293 | 458 | "metadata": {},
|
294 | 459 | "outputs": [],
|
295 | 460 | "source": [
|
|
298 | 463 | },
|
299 | 464 | {
|
300 | 465 | "cell_type": "code",
|
301 |
| - "execution_count": null, |
| 466 | + "execution_count": 14, |
302 | 467 | "metadata": {},
|
303 |
| - "outputs": [], |
| 468 | + "outputs": [ |
| 469 | + { |
| 470 | + "data": { |
| 471 | + "text/html": [ |
| 472 | + "<div id=\"6d4b8f8a-bcc3-4336-a6d0-e259505160c7\" style=\"width: 900px; height: 500px;\"></div>\r\n", |
| 473 | + "<script type=\"text/javascript\">\r\n", |
| 474 | + "\r\n", |
| 475 | + "var renderPlotly = function() {\r\n", |
| 476 | + " var xplotRequire = requirejs.config({context:'xplot-3.0.1',paths:{plotly:'https://cdn.plot.ly/plotly-1.49.2.min'}});\r\n", |
| 477 | + " xplotRequire(['plotly'], function(Plotly) {\r\n", |
| 478 | + "\n", |
| 479 | + " var data = [{\"type\":\"scattergl\",\"x\":[\"2020-01-22T00:00:00\",\"2020-01-23T00:00:00\",\"2020-01-24T00:00:00\",\"2020-01-25T00:00:00\",\"2020-01-27T00:00:00\"],\"y\":[2,2,2,1,2],\"name\":\"created by month\"},{\"type\":\"scattergl\",\"x\":[\"2020-01-22T00:00:00\",\"2020-01-23T00:00:00\",\"2020-01-24T00:00:00\",\"2020-01-25T00:00:00\",\"2020-01-27T00:00:00\"],\"y\":[2,4,6,7,9],\"name\":\"running total\"},{\"type\":\"scattergl\",\"x\":[\"2020-01-22T00:00:00\",\"2020-01-24T00:00:00\",\"2020-01-25T00:00:00\",\"2020-01-27T00:00:00\",\"2020-01-31T00:00:00\",\"2020-02-03T00:00:00\",\"2020-02-04T00:00:00\"],\"y\":[1,2,1,2,1,1,1],\"name\":\"last update by month\"}];\n", |
| 480 | + " var layout = {\"title\":\"Fork activity\"};\n", |
| 481 | + " Plotly.newPlot('6d4b8f8a-bcc3-4336-a6d0-e259505160c7', data, layout);\n", |
| 482 | + " \r\n", |
| 483 | + "});\r\n", |
| 484 | + "};\r\n", |
| 485 | + "if ((typeof(requirejs) !== typeof(Function)) || (typeof(requirejs.config) !== typeof(Function))) { \r\n", |
| 486 | + " var script = document.createElement(\"script\"); \r\n", |
| 487 | + " script.setAttribute(\"src\", \"https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js\"); \r\n", |
| 488 | + " script.onload = function(){\r\n", |
| 489 | + " renderPlotly();\r\n", |
| 490 | + " };\r\n", |
| 491 | + " document.getElementsByTagName(\"head\")[0].appendChild(script); \r\n", |
| 492 | + "}\r\n", |
| 493 | + "else {\r\n", |
| 494 | + " renderPlotly();\r\n", |
| 495 | + "}\r\n", |
| 496 | + "</script>\r\n" |
| 497 | + ] |
| 498 | + }, |
| 499 | + "metadata": {}, |
| 500 | + "output_type": "display_data" |
| 501 | + } |
| 502 | + ], |
304 | 503 | "source": [
|
305 | 504 | "var forkCreateByMonth = forks.GroupBy(f => new DateTime(f.CreatedAt.Year, f.CreatedAt.Month, f.CreatedAt.Day) )\n",
|
306 | 505 | " .Select(g => new {Date = g.Key, Count = g.Count()}).OrderBy(g => g.Date).ToArray();\n",
|
|
0 commit comments