|
27 | 27 | }, |
28 | 28 | { |
29 | 29 | "cell_type": "code", |
30 | | - "execution_count": 13, |
| 30 | + "execution_count": 3, |
31 | 31 | "metadata": {}, |
32 | 32 | "outputs": [], |
33 | 33 | "source": [ |
|
49 | 49 | }, |
50 | 50 | { |
51 | 51 | "cell_type": "code", |
52 | | - "execution_count": 3, |
| 52 | + "execution_count": 4, |
53 | 53 | "metadata": {}, |
54 | 54 | "outputs": [ |
55 | 55 | { |
|
119 | 119 | }, |
120 | 120 | { |
121 | 121 | "cell_type": "code", |
122 | | - "execution_count": 44, |
| 122 | + "execution_count": 9, |
123 | 123 | "metadata": {}, |
124 | 124 | "outputs": [ |
125 | 125 | { |
|
128 | 128 | "'2018-1'" |
129 | 129 | ] |
130 | 130 | }, |
131 | | - "execution_count": 44, |
| 131 | + "execution_count": 9, |
132 | 132 | "metadata": {}, |
133 | 133 | "output_type": "execute_result" |
134 | 134 | } |
|
140 | 140 | " dt = datetime.strptime(date_str, '%a, %d %b %Y %H:%M:%S')\n", |
141 | 141 | " return f'{dt.year}-{dt.month}'\n", |
142 | 142 | " \n", |
143 | | - "yymm = convert_to_datetime('Sun, 07 Jan 2018 12:00:00 +0100')\n", |
| 143 | + "yymm = get_year_month('Sun, 07 Jan 2018 12:00:00 +0100')\n", |
144 | 144 | "yymm" |
145 | 145 | ] |
146 | 146 | }, |
147 | 147 | { |
148 | 148 | "cell_type": "code", |
149 | | - "execution_count": 18, |
| 149 | + "execution_count": 10, |
150 | 150 | "metadata": {}, |
151 | 151 | "outputs": [], |
152 | 152 | "source": [ |
|
176 | 176 | }, |
177 | 177 | { |
178 | 178 | "cell_type": "code", |
179 | | - "execution_count": 21, |
| 179 | + "execution_count": 11, |
180 | 180 | "metadata": {}, |
181 | 181 | "outputs": [ |
182 | 182 | { |
|
198 | 198 | " '2018-1': 3})" |
199 | 199 | ] |
200 | 200 | }, |
201 | | - "execution_count": 21, |
| 201 | + "execution_count": 11, |
202 | 202 | "metadata": {}, |
203 | 203 | "output_type": "execute_result" |
204 | 204 | } |
|
211 | 211 | }, |
212 | 212 | { |
213 | 213 | "cell_type": "code", |
214 | | - "execution_count": 23, |
| 214 | + "execution_count": 12, |
215 | 215 | "metadata": {}, |
216 | 216 | "outputs": [ |
217 | 217 | { |
|
224 | 224 | " ('guest', 5)]" |
225 | 225 | ] |
226 | 226 | }, |
227 | | - "execution_count": 23, |
| 227 | + "execution_count": 12, |
228 | 228 | "metadata": {}, |
229 | 229 | "output_type": "execute_result" |
230 | 230 | } |
|
238 | 238 | }, |
239 | 239 | { |
240 | 240 | "cell_type": "code", |
241 | | - "execution_count": 24, |
| 241 | + "execution_count": 13, |
242 | 242 | "metadata": {}, |
243 | 243 | "outputs": [ |
244 | 244 | { |
|
251 | 251 | " ('tips', 65)]" |
252 | 252 | ] |
253 | 253 | }, |
254 | | - "execution_count": 24, |
| 254 | + "execution_count": 13, |
255 | 255 | "metadata": {}, |
256 | 256 | "output_type": "execute_result" |
257 | 257 | } |
|
288 | 288 | }, |
289 | 289 | { |
290 | 290 | "cell_type": "code", |
291 | | - "execution_count": 31, |
| 291 | + "execution_count": 14, |
292 | 292 | "metadata": {}, |
293 | 293 | "outputs": [ |
294 | 294 | { |
|
311 | 311 | " (3, 11, 12, 13, 13, 19, 23, 19, 22, 23, 25, 20, 27, 13)]" |
312 | 312 | ] |
313 | 313 | }, |
314 | | - "execution_count": 31, |
| 314 | + "execution_count": 14, |
315 | 315 | "metadata": {}, |
316 | 316 | "output_type": "execute_result" |
317 | 317 | } |
|
336 | 336 | ] |
337 | 337 | }, |
338 | 338 | { |
339 | | - "cell_type": "code", |
340 | | - "execution_count": 36, |
| 339 | + "cell_type": "markdown", |
341 | 340 | "metadata": {}, |
342 | | - "outputs": [ |
343 | | - { |
344 | | - "data": { |
345 | | - "text/html": [ |
346 | | - "<script>requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min']},});if(!window.Plotly) {{require(['plotly'],function(plotly) {window.Plotly=plotly;});}}</script>" |
347 | | - ], |
348 | | - "text/vnd.plotly.v1+html": [ |
349 | | - "<script>requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min']},});if(!window.Plotly) {{require(['plotly'],function(plotly) {window.Plotly=plotly;});}}</script>" |
350 | | - ] |
351 | | - }, |
352 | | - "metadata": {}, |
353 | | - "output_type": "display_data" |
354 | | - } |
355 | | - ], |
356 | 341 | "source": [ |
357 | 342 | "plotly.offline.init_notebook_mode(connected=True)" |
358 | 343 | ] |
359 | 344 | }, |
360 | 345 | { |
361 | 346 | "cell_type": "code", |
362 | | - "execution_count": 41, |
| 347 | + "execution_count": 19, |
363 | 348 | "metadata": {}, |
364 | 349 | "outputs": [ |
365 | 350 | { |
|
403 | 388 | } |
404 | 389 | ], |
405 | 390 | "layout": {} |
406 | | - }, |
407 | | - "text/html": [ |
408 | | - "<div id=\"063fb6da-0c8c-4f88-90d3-1f84e30a3c31\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"063fb6da-0c8c-4f88-90d3-1f84e30a3c31\", [{\"type\": \"bar\", \"x\": [\"2018-1\", \"2017-12\", \"2017-11\", \"2017-10\", \"2017-9\", \"2017-8\", \"2017-7\", \"2017-6\", \"2017-5\", \"2017-4\", \"2017-3\", \"2017-2\", \"2017-1\", \"2016-12\"], \"y\": [3, 11, 12, 13, 13, 19, 23, 19, 22, 23, 25, 20, 27, 13]}], {}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" |
409 | | - ], |
410 | | - "text/vnd.plotly.v1+html": [ |
411 | | - "<div id=\"063fb6da-0c8c-4f88-90d3-1f84e30a3c31\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"063fb6da-0c8c-4f88-90d3-1f84e30a3c31\", [{\"type\": \"bar\", \"x\": [\"2018-1\", \"2017-12\", \"2017-11\", \"2017-10\", \"2017-9\", \"2017-8\", \"2017-7\", \"2017-6\", \"2017-5\", \"2017-4\", \"2017-3\", \"2017-2\", \"2017-1\", \"2016-12\"], \"y\": [3, 11, 12, 13, 13, 19, 23, 19, 22, 23, 25, 20, 27, 13]}], {}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" |
412 | | - ] |
| 391 | + } |
413 | 392 | }, |
414 | 393 | "metadata": {}, |
415 | 394 | "output_type": "display_data" |
|
422 | 401 | ] |
423 | 402 | }, |
424 | 403 | { |
425 | | - "cell_type": "raw", |
| 404 | + "cell_type": "markdown", |
426 | 405 | "metadata": {}, |
427 | 406 | "source": [ |
428 | 407 | "https://plot.ly/create/?fid=bbelderbos:5" |
429 | 408 | ] |
430 | 409 | }, |
| 410 | + { |
| 411 | + "cell_type": "markdown", |
| 412 | + "metadata": {}, |
| 413 | + "source": [ |
| 414 | + "<img src=\"images/plot1.png\">" |
| 415 | + ] |
| 416 | + }, |
431 | 417 | { |
432 | 418 | "cell_type": "markdown", |
433 | 419 | "metadata": {}, |
|
437 | 423 | }, |
438 | 424 | { |
439 | 425 | "cell_type": "code", |
440 | | - "execution_count": 42, |
| 426 | + "execution_count": 16, |
441 | 427 | "metadata": {}, |
442 | 428 | "outputs": [ |
443 | 429 | { |
|
463 | 449 | } |
464 | 450 | ], |
465 | 451 | "layout": {} |
466 | | - }, |
467 | | - "text/html": [ |
468 | | - "<div id=\"0f4a24f9-8a46-475e-b338-847ff0815cc6\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"0f4a24f9-8a46-475e-b338-847ff0815cc6\", [{\"type\": \"pie\", \"labels\": [\"challenge\", \"article\", \"news\", \"special\", \"guest\"], \"values\": [89, 89, 55, 5, 5]}], {}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" |
469 | | - ], |
470 | | - "text/vnd.plotly.v1+html": [ |
471 | | - "<div id=\"0f4a24f9-8a46-475e-b338-847ff0815cc6\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"0f4a24f9-8a46-475e-b338-847ff0815cc6\", [{\"type\": \"pie\", \"labels\": [\"challenge\", \"article\", \"news\", \"special\", \"guest\"], \"values\": [89, 89, 55, 5, 5]}], {}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" |
472 | | - ] |
| 452 | + } |
473 | 453 | }, |
474 | 454 | "metadata": {}, |
475 | 455 | "output_type": "display_data" |
|
488 | 468 | "https://plot.ly/create/?fid=bbelderbos:7" |
489 | 469 | ] |
490 | 470 | }, |
| 471 | + { |
| 472 | + "cell_type": "markdown", |
| 473 | + "metadata": {}, |
| 474 | + "source": [ |
| 475 | + "<img src=\"images/plot2.png\">" |
| 476 | + ] |
| 477 | + }, |
491 | 478 | { |
492 | 479 | "cell_type": "markdown", |
493 | 480 | "metadata": {}, |
|
497 | 484 | }, |
498 | 485 | { |
499 | 486 | "cell_type": "code", |
500 | | - "execution_count": 43, |
| 487 | + "execution_count": 20, |
501 | 488 | "metadata": {}, |
502 | 489 | "outputs": [ |
503 | 490 | { |
|
553 | 540 | } |
554 | 541 | ], |
555 | 542 | "layout": {} |
556 | | - }, |
557 | | - "text/html": [ |
558 | | - "<div id=\"44d1d1b1-211e-4ca1-9c01-d55616c9897e\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"44d1d1b1-211e-4ca1-9c01-d55616c9897e\", [{\"type\": \"pie\", \"labels\": [\"python\", \"learning\", \"twitter\", \"codechallenges\", \"tips\", \"news\", \"flask\", \"django\", \"code\", \"github\", \"automation\", \"pybites\", \"data science\", \"apis\", \"machine learning\", \"books\", \"jupyter\", \"api\", \"regex\", \"pandas\"], \"values\": [84, 80, 72, 72, 65, 57, 54, 40, 27, 25, 24, 23, 23, 21, 20, 20, 19, 19, 18, 18]}], {}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" |
559 | | - ], |
560 | | - "text/vnd.plotly.v1+html": [ |
561 | | - "<div id=\"44d1d1b1-211e-4ca1-9c01-d55616c9897e\" style=\"height: 525px; width: 100%;\" class=\"plotly-graph-div\"></div><script type=\"text/javascript\">require([\"plotly\"], function(Plotly) { window.PLOTLYENV=window.PLOTLYENV || {};window.PLOTLYENV.BASE_URL=\"https://plot.ly\";Plotly.newPlot(\"44d1d1b1-211e-4ca1-9c01-d55616c9897e\", [{\"type\": \"pie\", \"labels\": [\"python\", \"learning\", \"twitter\", \"codechallenges\", \"tips\", \"news\", \"flask\", \"django\", \"code\", \"github\", \"automation\", \"pybites\", \"data science\", \"apis\", \"machine learning\", \"books\", \"jupyter\", \"api\", \"regex\", \"pandas\"], \"values\": [84, 80, 72, 72, 65, 57, 54, 40, 27, 25, 24, 23, 23, 21, 20, 20, 19, 19, 18, 18]}], {}, {\"showLink\": true, \"linkText\": \"Export to plot.ly\"})});</script>" |
562 | | - ] |
| 543 | + } |
563 | 544 | }, |
564 | 545 | "metadata": {}, |
565 | 546 | "output_type": "display_data" |
|
578 | 559 | "https://plot.ly/create/?fid=bbelderbos:9" |
579 | 560 | ] |
580 | 561 | }, |
| 562 | + { |
| 563 | + "cell_type": "markdown", |
| 564 | + "metadata": {}, |
| 565 | + "source": [ |
| 566 | + "<img src=\"images/plot3.png\">" |
| 567 | + ] |
| 568 | + }, |
581 | 569 | { |
582 | 570 | "cell_type": "markdown", |
583 | 571 | "metadata": {}, |
|
0 commit comments