diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/README.md b/9-data-analysis-python/4-page-view-time-series-visualizer/README.md new file mode 100644 index 0000000..9b96017 --- /dev/null +++ b/9-data-analysis-python/4-page-view-time-series-visualizer/README.md @@ -0,0 +1,3 @@ +# Page View Time Series Visualizer + +This is the boilerplate for the Page View Time Series Visualizer project. Instructions for building your project can be found at https://www.freecodecamp.org/learn/data-analysis-with-python/data-analysis-with-python-projects/page-view-time-series-visualizer diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/bar_plot.png b/9-data-analysis-python/4-page-view-time-series-visualizer/bar_plot.png new file mode 100644 index 0000000..7598f10 Binary files /dev/null and b/9-data-analysis-python/4-page-view-time-series-visualizer/bar_plot.png differ diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/box_plot.png b/9-data-analysis-python/4-page-view-time-series-visualizer/box_plot.png new file mode 100644 index 0000000..421f579 Binary files /dev/null and b/9-data-analysis-python/4-page-view-time-series-visualizer/box_plot.png differ diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/examples/Figure_1.png b/9-data-analysis-python/4-page-view-time-series-visualizer/examples/Figure_1.png new file mode 100644 index 0000000..33ea5b2 Binary files /dev/null and b/9-data-analysis-python/4-page-view-time-series-visualizer/examples/Figure_1.png differ diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/examples/Figure_2.png b/9-data-analysis-python/4-page-view-time-series-visualizer/examples/Figure_2.png new file mode 100644 index 0000000..723f0c9 Binary files /dev/null and b/9-data-analysis-python/4-page-view-time-series-visualizer/examples/Figure_2.png differ diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/examples/Figure_3.png b/9-data-analysis-python/4-page-view-time-series-visualizer/examples/Figure_3.png new file mode 100644 index 0000000..98321e4 Binary files /dev/null and b/9-data-analysis-python/4-page-view-time-series-visualizer/examples/Figure_3.png differ diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/fcc-forum-pageviews.csv b/9-data-analysis-python/4-page-view-time-series-visualizer/fcc-forum-pageviews.csv new file mode 100644 index 0000000..b1c7c2d --- /dev/null +++ b/9-data-analysis-python/4-page-view-time-series-visualizer/fcc-forum-pageviews.csv @@ -0,0 +1,1305 @@ +date,value +2016-05-09,1201 +2016-05-10,2329 +2016-05-11,1716 +2016-05-12,10539 +2016-05-13,6933 +2016-05-14,3127 +2016-05-15,2927 +2016-05-16,2591 +2016-05-17,3403 +2016-05-18,5410 +2016-05-19,19736 +2016-05-20,17491 +2016-05-21,13370 +2016-05-22,13158 +2016-05-23,13887 +2016-05-24,15336 +2016-05-25,14779 +2016-05-26,18060 +2016-05-27,19997 +2016-05-28,19044 +2016-05-29,20325 +2016-05-30,16607 +2016-05-31,16616 +2016-06-01,13007 +2016-06-02,10329 +2016-06-03,10155 +2016-06-04,7431 +2016-06-05,16031 +2016-06-06,16621 +2016-06-07,18335 +2016-06-08,18072 +2016-06-09,18139 +2016-06-10,17087 +2016-06-11,16098 +2016-06-12,16147 +2016-06-13,17570 +2016-06-14,19395 +2016-06-15,18584 +2016-06-16,17628 +2016-06-17,21691 +2016-06-18,21681 +2016-06-19,19204 +2016-06-20,28508 +2016-06-21,26805 +2016-06-22,21424 +2016-06-23,19820 +2016-06-24,19230 +2016-06-25,21923 +2016-06-26,22685 +2016-06-27,24278 +2016-06-28,21423 +2016-06-29,27734 +2016-06-30,26696 +2016-07-01,28372 +2016-07-02,26393 +2016-07-03,27011 +2016-07-04,24236 +2016-07-05,23843 +2016-07-06,24374 +2016-07-07,28507 +2016-07-08,31184 +2016-07-09,27404 +2016-07-10,26079 +2016-07-11,20339 +2016-07-12,21510 +2016-07-13,20391 +2016-07-14,23278 +2016-07-15,22815 +2016-07-16,20261 +2016-07-17,20331 +2016-07-18,19703 +2016-07-19,15445 +2016-07-20,22046 +2016-07-21,27290 +2016-07-22,28662 +2016-07-23,25053 +2016-07-24,19733 +2016-07-25,25646 +2016-07-26,19637 +2016-07-27,23587 +2016-07-28,25719 +2016-07-29,21667 +2016-07-30,16002 +2016-07-31,16223 +2016-08-01,20947 +2016-08-02,20345 +2016-08-03,24118 +2016-08-04,24951 +2016-08-05,27880 +2016-08-06,20900 +2016-08-07,23536 +2016-08-08,24471 +2016-08-09,24828 +2016-08-10,31583 +2016-08-11,30393 +2016-08-12,29488 +2016-08-13,26206 +2016-08-14,29686 +2016-08-15,32229 +2016-08-16,34396 +2016-08-17,43003 +2016-08-18,35206 +2016-08-19,32362 +2016-08-20,37583 +2016-08-21,36559 +2016-08-22,36701 +2016-08-23,32726 +2016-08-24,29315 +2016-08-25,32786 +2016-08-26,35489 +2016-08-27,36366 +2016-08-28,33765 +2016-08-29,36915 +2016-08-30,39619 +2016-08-31,38173 +2016-09-01,40709 +2016-09-02,37609 +2016-09-03,30250 +2016-09-04,36077 +2016-09-05,35320 +2016-09-06,39098 +2016-09-07,43401 +2016-09-08,40258 +2016-09-09,44787 +2016-09-10,44586 +2016-09-11,39262 +2016-09-12,42667 +2016-09-13,49746 +2016-09-14,43645 +2016-09-15,38780 +2016-09-16,36125 +2016-09-17,31797 +2016-09-18,32304 +2016-09-19,36840 +2016-09-20,37441 +2016-09-21,38492 +2016-09-22,38324 +2016-09-23,44985 +2016-09-24,37708 +2016-09-25,39081 +2016-09-26,41089 +2016-09-27,41296 +2016-09-28,53158 +2016-09-29,70669 +2016-09-30,58802 +2016-10-01,49179 +2016-10-02,44043 +2016-10-03,32660 +2016-10-04,41797 +2016-10-05,39348 +2016-10-06,23874 +2016-10-07,25963 +2016-10-08,23848 +2016-10-09,23573 +2016-10-10,27459 +2016-10-11,27601 +2016-10-12,26521 +2016-10-13,24865 +2016-10-14,24934 +2016-10-15,20609 +2016-10-16,22301 +2016-10-17,26623 +2016-10-18,25319 +2016-10-19,29076 +2016-10-20,23217 +2016-10-21,22343 +2016-10-22,19571 +2016-10-23,20457 +2016-10-24,25670 +2016-10-25,27317 +2016-10-26,26489 +2016-10-27,27207 +2016-10-28,23258 +2016-10-29,22975 +2016-10-30,24828 +2016-10-31,26423 +2016-11-01,25856 +2016-11-02,26565 +2016-11-03,30183 +2016-11-04,28981 +2016-11-05,25849 +2016-11-06,25287 +2016-11-07,27790 +2016-11-08,26744 +2016-11-09,25489 +2016-11-10,117906 +2016-11-11,159186 +2016-11-12,33775 +2016-11-13,22762 +2016-11-14,24449 +2016-11-15,30817 +2016-11-16,33673 +2016-11-17,35712 +2016-11-18,50298 +2016-11-19,42964 +2016-11-20,47789 +2016-11-21,52663 +2016-11-22,51329 +2016-11-23,48490 +2016-11-24,46822 +2016-11-25,29973 +2016-11-26,25239 +2016-11-27,27955 +2016-11-28,31749 +2016-11-29,29694 +2016-11-30,27470 +2016-12-01,32666 +2016-12-02,36075 +2016-12-03,31115 +2016-12-04,23536 +2016-12-05,25527 +2016-12-06,28078 +2016-12-07,31498 +2016-12-08,28919 +2016-12-09,27988 +2016-12-10,25698 +2016-12-11,28806 +2016-12-12,31131 +2016-12-13,32777 +2016-12-14,32015 +2016-12-15,42333 +2016-12-16,28715 +2016-12-17,23503 +2016-12-18,23391 +2016-12-19,28247 +2016-12-20,29969 +2016-12-21,28531 +2016-12-22,29442 +2016-12-23,24747 +2016-12-24,20227 +2016-12-25,19035 +2016-12-26,23076 +2016-12-27,25138 +2016-12-28,28424 +2016-12-29,27197 +2016-12-30,24804 +2016-12-31,20197 +2017-01-01,26185 +2017-01-02,28560 +2017-01-03,31525 +2017-01-04,28955 +2017-01-05,35024 +2017-01-06,37353 +2017-01-07,33233 +2017-01-08,30571 +2017-01-09,32352 +2017-01-10,33550 +2017-01-11,35142 +2017-01-12,30960 +2017-01-13,33266 +2017-01-14,34418 +2017-01-15,26987 +2017-01-16,37466 +2017-01-17,32119 +2017-01-18,30628 +2017-01-19,32362 +2017-01-20,30079 +2017-01-21,29555 +2017-01-22,33041 +2017-01-23,37958 +2017-01-24,33083 +2017-01-25,31990 +2017-01-26,32775 +2017-01-27,29665 +2017-01-28,28045 +2017-01-29,55875 +2017-01-30,32284 +2017-01-31,31334 +2017-02-01,30124 +2017-02-02,31924 +2017-02-03,27526 +2017-02-04,24955 +2017-02-05,30714 +2017-02-06,33347 +2017-02-07,37804 +2017-02-08,33664 +2017-02-09,36645 +2017-02-10,29067 +2017-02-11,24300 +2017-02-12,29004 +2017-02-13,32764 +2017-02-14,33632 +2017-02-15,30330 +2017-02-16,30942 +2017-02-17,28747 +2017-02-18,26708 +2017-02-19,26266 +2017-02-20,37017 +2017-02-21,32837 +2017-02-22,36489 +2017-02-23,33894 +2017-02-24,33952 +2017-02-25,28785 +2017-02-26,27813 +2017-02-27,31283 +2017-02-28,30633 +2017-03-01,33258 +2017-03-02,29234 +2017-03-03,28912 +2017-03-04,23709 +2017-03-05,23970 +2017-03-06,31878 +2017-03-07,30962 +2017-03-08,29290 +2017-03-09,28652 +2017-03-10,27218 +2017-03-11,25319 +2017-03-12,26416 +2017-03-13,28475 +2017-03-14,31696 +2017-03-15,31997 +2017-03-16,30443 +2017-03-17,28411 +2017-03-18,23845 +2017-03-19,25132 +2017-03-20,29705 +2017-03-21,26941 +2017-03-22,34204 +2017-03-23,31416 +2017-03-24,30360 +2017-03-25,25596 +2017-03-26,36487 +2017-03-27,35773 +2017-03-28,30866 +2017-03-29,29235 +2017-03-30,30333 +2017-03-31,30709 +2017-04-01,23762 +2017-04-02,24969 +2017-04-03,33614 +2017-04-04,35923 +2017-04-05,31198 +2017-04-06,32455 +2017-04-07,28156 +2017-04-08,24879 +2017-04-09,23871 +2017-04-10,30624 +2017-04-11,33896 +2017-04-12,31360 +2017-04-13,27592 +2017-04-14,31720 +2017-04-15,27999 +2017-04-16,27037 +2017-04-17,31801 +2017-04-18,30731 +2017-04-19,56682 +2017-04-20,32813 +2017-04-21,28301 +2017-04-22,25124 +2017-04-23,24741 +2017-04-24,36291 +2017-04-25,32177 +2017-04-26,30675 +2017-04-27,51977 +2017-04-28,26987 +2017-04-29,23219 +2017-04-30,25788 +2017-05-01,30580 +2017-05-02,30175 +2017-05-03,29907 +2017-05-04,32716 +2017-05-05,32642 +2017-05-06,28752 +2017-05-07,25898 +2017-05-08,39028 +2017-05-09,46944 +2017-05-10,39860 +2017-05-11,46743 +2017-05-12,29197 +2017-05-13,26105 +2017-05-14,28039 +2017-05-15,35563 +2017-05-16,35443 +2017-05-17,35114 +2017-05-18,37373 +2017-05-19,31868 +2017-05-20,30077 +2017-05-21,25970 +2017-05-22,32100 +2017-05-23,35395 +2017-05-24,39844 +2017-05-25,44889 +2017-05-26,39374 +2017-05-27,26679 +2017-05-28,26758 +2017-05-29,32635 +2017-05-30,37686 +2017-05-31,48219 +2017-06-01,43336 +2017-06-02,50825 +2017-06-03,44143 +2017-06-04,44193 +2017-06-05,56336 +2017-06-06,47989 +2017-06-07,47885 +2017-06-08,43983 +2017-06-09,44776 +2017-06-10,42018 +2017-06-11,34311 +2017-06-12,39694 +2017-06-13,41098 +2017-06-14,38289 +2017-06-15,35351 +2017-06-16,39123 +2017-06-17,40941 +2017-06-18,33112 +2017-06-19,38418 +2017-06-20,45829 +2017-06-21,42424 +2017-06-22,54267 +2017-06-23,38842 +2017-06-24,40668 +2017-06-25,46618 +2017-06-26,43904 +2017-06-27,46568 +2017-06-28,52375 +2017-06-29,41553 +2017-06-30,48456 +2017-07-01,37928 +2017-07-02,47547 +2017-07-03,78839 +2017-07-04,82957 +2017-07-05,79604 +2017-07-06,70436 +2017-07-07,55682 +2017-07-08,47133 +2017-07-09,52715 +2017-07-10,60916 +2017-07-11,58470 +2017-07-12,67336 +2017-07-13,72532 +2017-07-14,78133 +2017-07-15,75974 +2017-07-16,77304 +2017-07-17,74115 +2017-07-18,78235 +2017-07-19,83925 +2017-07-20,62996 +2017-07-21,65973 +2017-07-22,60364 +2017-07-23,57083 +2017-07-24,63076 +2017-07-25,78896 +2017-07-26,61290 +2017-07-27,68910 +2017-07-28,77848 +2017-07-29,57041 +2017-07-30,44213 +2017-07-31,62541 +2017-08-01,46685 +2017-08-02,51019 +2017-08-03,49166 +2017-08-04,56280 +2017-08-05,44482 +2017-08-06,42476 +2017-08-07,47298 +2017-08-08,47995 +2017-08-09,46436 +2017-08-10,43221 +2017-08-11,48098 +2017-08-12,43524 +2017-08-13,40913 +2017-08-14,48547 +2017-08-15,49134 +2017-08-16,50398 +2017-08-17,55424 +2017-08-18,51828 +2017-08-19,41340 +2017-08-20,45547 +2017-08-21,61318 +2017-08-22,54247 +2017-08-23,54941 +2017-08-24,38833 +2017-08-25,37208 +2017-08-26,39073 +2017-08-27,40359 +2017-08-28,55006 +2017-08-29,52121 +2017-08-30,48375 +2017-08-31,47794 +2017-09-01,47939 +2017-09-02,40430 +2017-09-03,28497 +2017-09-04,51281 +2017-09-05,52076 +2017-09-06,53952 +2017-09-07,54945 +2017-09-08,48839 +2017-09-09,44404 +2017-09-10,48150 +2017-09-11,56383 +2017-09-12,52978 +2017-09-13,52552 +2017-09-14,52044 +2017-09-15,50138 +2017-09-16,42710 +2017-09-17,42071 +2017-09-18,58878 +2017-09-19,51861 +2017-09-20,51792 +2017-09-21,48664 +2017-09-22,43914 +2017-09-23,39859 +2017-09-24,37368 +2017-09-25,46807 +2017-09-26,50268 +2017-09-27,48480 +2017-09-28,45651 +2017-09-29,43654 +2017-09-30,34719 +2017-10-01,38835 +2017-10-02,46391 +2017-10-03,50398 +2017-10-04,50115 +2017-10-05,57123 +2017-10-06,50828 +2017-10-07,40829 +2017-10-08,39843 +2017-10-09,48588 +2017-10-10,50863 +2017-10-11,46741 +2017-10-12,51448 +2017-10-13,50295 +2017-10-14,42956 +2017-10-15,39388 +2017-10-16,48393 +2017-10-17,52093 +2017-10-18,50482 +2017-10-19,56418 +2017-10-20,44474 +2017-10-21,42741 +2017-10-22,46446 +2017-10-23,50884 +2017-10-24,55085 +2017-10-25,50914 +2017-10-26,48182 +2017-10-27,46141 +2017-10-28,39823 +2017-10-29,39452 +2017-10-30,48468 +2017-10-31,45963 +2017-11-01,45771 +2017-11-02,54769 +2017-11-03,54387 +2017-11-04,43141 +2017-11-05,43411 +2017-11-06,55505 +2017-11-07,55343 +2017-11-08,49695 +2017-11-09,56215 +2017-11-10,59465 +2017-11-11,41105 +2017-11-12,53562 +2017-11-13,56598 +2017-11-14,58650 +2017-11-15,57976 +2017-11-16,61562 +2017-11-17,54098 +2017-11-18,45065 +2017-11-19,48547 +2017-11-20,55367 +2017-11-21,56693 +2017-11-22,136744 +2017-11-23,113149 +2017-11-24,59697 +2017-11-25,42161 +2017-11-26,45100 +2017-11-27,55855 +2017-11-28,54324 +2017-11-29,56843 +2017-11-30,60249 +2017-12-01,58830 +2017-12-02,34791 +2017-12-03,34841 +2017-12-04,52880 +2017-12-05,60788 +2017-12-06,60358 +2017-12-07,55929 +2017-12-08,44714 +2017-12-09,41348 +2017-12-10,40424 +2017-12-11,53151 +2017-12-12,51780 +2017-12-13,57092 +2017-12-14,48394 +2017-12-15,46097 +2017-12-16,48136 +2017-12-17,37655 +2017-12-18,49015 +2017-12-19,55850 +2017-12-20,48414 +2017-12-21,51137 +2017-12-22,45127 +2017-12-23,34257 +2017-12-24,36708 +2017-12-25,49542 +2017-12-26,44083 +2017-12-27,43075 +2017-12-28,51018 +2017-12-29,72819 +2017-12-30,50169 +2017-12-31,42616 +2018-01-01,41810 +2018-01-02,51362 +2018-01-03,56013 +2018-01-04,58910 +2018-01-05,58239 +2018-01-06,41870 +2018-01-07,42981 +2018-01-08,62887 +2018-01-09,60260 +2018-01-10,106349 +2018-01-11,77030 +2018-01-12,53781 +2018-01-13,42621 +2018-01-14,43990 +2018-01-15,59119 +2018-01-16,63272 +2018-01-17,60159 +2018-01-18,64068 +2018-01-19,61345 +2018-01-20,50553 +2018-01-21,46436 +2018-01-22,63084 +2018-01-23,62758 +2018-01-24,61700 +2018-01-25,65438 +2018-01-26,56792 +2018-01-27,48186 +2018-01-28,49485 +2018-01-29,66609 +2018-01-30,77144 +2018-01-31,61732 +2018-02-01,65803 +2018-02-02,59272 +2018-02-03,45779 +2018-02-04,29872 +2018-02-05,76073 +2018-02-06,77059 +2018-02-07,74939 +2018-02-08,75397 +2018-02-09,71514 +2018-02-10,51208 +2018-02-11,52371 +2018-02-12,76738 +2018-02-13,74967 +2018-02-14,66850 +2018-02-15,70090 +2018-02-16,68310 +2018-02-17,56257 +2018-02-18,53798 +2018-02-19,67406 +2018-02-20,72493 +2018-02-21,82716 +2018-02-22,84685 +2018-02-23,68160 +2018-02-24,51002 +2018-02-25,50945 +2018-02-26,69180 +2018-02-27,75783 +2018-02-28,70345 +2018-03-01,66423 +2018-03-02,62627 +2018-03-03,48492 +2018-03-04,53712 +2018-03-05,65506 +2018-03-06,88644 +2018-03-07,76008 +2018-03-08,67376 +2018-03-09,63935 +2018-03-10,52913 +2018-03-11,49759 +2018-03-12,66045 +2018-03-13,70428 +2018-03-14,66001 +2018-03-15,66800 +2018-03-16,60562 +2018-03-17,48609 +2018-03-18,48808 +2018-03-19,64044 +2018-03-20,65209 +2018-03-21,68532 +2018-03-22,71059 +2018-03-23,65798 +2018-03-24,48873 +2018-03-25,51219 +2018-03-26,68186 +2018-03-27,70345 +2018-03-28,68748 +2018-03-29,68853 +2018-03-30,58890 +2018-03-31,51103 +2018-04-01,56224 +2018-04-02,66957 +2018-04-03,70500 +2018-04-04,71217 +2018-04-05,71640 +2018-04-06,65494 +2018-04-07,52642 +2018-04-08,49394 +2018-04-09,67122 +2018-04-10,67930 +2018-04-11,66601 +2018-04-12,88232 +2018-04-13,65620 +2018-04-14,46493 +2018-04-15,50303 +2018-04-16,70225 +2018-04-17,70814 +2018-04-18,67661 +2018-04-19,65526 +2018-04-20,68599 +2018-04-21,53931 +2018-04-22,53319 +2018-04-23,68490 +2018-04-24,68477 +2018-04-25,68962 +2018-04-26,64760 +2018-04-27,56276 +2018-04-28,42883 +2018-04-29,42861 +2018-04-30,51372 +2018-05-01,56905 +2018-05-02,56834 +2018-05-03,64835 +2018-05-04,56420 +2018-05-05,44898 +2018-05-06,43602 +2018-05-07,55713 +2018-05-08,57836 +2018-05-09,54817 +2018-05-10,65517 +2018-05-11,59600 +2018-05-12,40878 +2018-05-13,46586 +2018-05-14,55193 +2018-05-15,59453 +2018-05-16,56362 +2018-05-17,58871 +2018-05-18,59496 +2018-05-19,44562 +2018-05-20,48197 +2018-05-21,57575 +2018-05-22,59419 +2018-05-23,63881 +2018-05-24,72924 +2018-05-25,49617 +2018-05-26,42533 +2018-05-27,43357 +2018-05-28,53397 +2018-05-29,58201 +2018-05-30,69592 +2018-05-31,96378 +2018-06-01,72946 +2018-06-02,58104 +2018-06-03,56734 +2018-06-04,74785 +2018-06-05,130604 +2018-06-06,70775 +2018-06-07,69192 +2018-06-08,64313 +2018-06-09,56129 +2018-06-10,60222 +2018-06-11,71665 +2018-06-12,72167 +2018-06-13,70514 +2018-06-14,68685 +2018-06-15,58703 +2018-06-16,50098 +2018-06-17,52736 +2018-06-18,80955 +2018-06-19,77413 +2018-06-20,83183 +2018-06-21,81671 +2018-06-22,66745 +2018-06-23,72015 +2018-06-24,68024 +2018-06-25,80403 +2018-06-26,81573 +2018-06-27,69363 +2018-06-28,63678 +2018-06-29,66111 +2018-06-30,54004 +2018-07-01,44552 +2018-07-02,61693 +2018-07-03,65394 +2018-07-04,63630 +2018-07-05,74420 +2018-07-06,62313 +2018-07-07,54111 +2018-07-08,51703 +2018-07-09,62304 +2018-07-10,90831 +2018-07-11,71342 +2018-07-12,64328 +2018-07-13,60919 +2018-07-14,49131 +2018-07-15,50575 +2018-07-16,63715 +2018-07-17,71926 +2018-07-18,65871 +2018-07-19,63196 +2018-07-20,64881 +2018-07-21,54481 +2018-07-22,54784 +2018-07-23,70218 +2018-07-24,73937 +2018-07-25,95611 +2018-07-26,96264 +2018-07-27,57272 +2018-07-28,44523 +2018-07-29,44070 +2018-07-30,60989 +2018-07-31,62339 +2018-08-01,63520 +2018-08-02,63268 +2018-08-03,62227 +2018-08-04,46947 +2018-08-05,42650 +2018-08-06,63159 +2018-08-07,67216 +2018-08-08,72890 +2018-08-09,71460 +2018-08-10,71279 +2018-08-11,55241 +2018-08-12,52774 +2018-08-13,66145 +2018-08-14,66222 +2018-08-15,67895 +2018-08-16,61577 +2018-08-17,59822 +2018-08-18,52645 +2018-08-19,58069 +2018-08-20,71289 +2018-08-21,68729 +2018-08-22,67580 +2018-08-23,66574 +2018-08-24,62847 +2018-08-25,51910 +2018-08-26,49398 +2018-08-27,63821 +2018-08-28,63969 +2018-08-29,63573 +2018-08-30,75250 +2018-08-31,77834 +2018-09-01,47114 +2018-09-02,46875 +2018-09-03,67138 +2018-09-04,72182 +2018-09-05,76418 +2018-09-06,79476 +2018-09-07,78279 +2018-09-08,72950 +2018-09-09,56988 +2018-09-10,79179 +2018-09-11,88013 +2018-09-12,73528 +2018-09-13,77145 +2018-09-14,66614 +2018-09-15,56505 +2018-09-16,50128 +2018-09-17,64325 +2018-09-18,68692 +2018-09-19,71498 +2018-09-20,68598 +2018-09-21,68987 +2018-09-22,50512 +2018-09-23,56152 +2018-09-24,70468 +2018-09-25,64054 +2018-09-26,69501 +2018-09-27,67876 +2018-09-28,72233 +2018-09-29,52292 +2018-09-30,44532 +2018-10-01,25830 +2018-10-02,10099 +2018-10-03,62166 +2018-10-04,83869 +2018-10-05,86759 +2018-10-06,59515 +2018-10-07,87863 +2018-10-08,120741 +2018-10-09,131815 +2018-10-10,153341 +2018-10-11,163758 +2018-10-12,176175 +2018-10-13,168644 +2018-10-14,184018 +2018-10-15,174639 +2018-10-16,177647 +2018-10-17,169915 +2018-10-18,155078 +2018-10-19,149940 +2018-10-20,92549 +2018-10-21,80661 +2018-10-22,80458 +2018-10-23,105987 +2018-10-24,138476 +2018-10-25,140264 +2018-10-26,100213 +2018-10-27,65391 +2018-10-28,61406 +2018-10-29,76625 +2018-10-30,97815 +2018-10-31,108695 +2018-11-01,85861 +2018-11-02,73794 +2018-11-03,62830 +2018-11-04,62538 +2018-11-05,79117 +2018-11-06,83775 +2018-11-07,84770 +2018-11-08,105849 +2018-11-09,76395 +2018-11-10,64975 +2018-11-11,58481 +2018-11-12,80567 +2018-11-13,91368 +2018-11-14,90488 +2018-11-15,76911 +2018-11-16,80870 +2018-11-17,61170 +2018-11-18,66269 +2018-11-19,92083 +2018-11-20,90130 +2018-11-21,77632 +2018-11-22,78076 +2018-11-23,75398 +2018-11-24,64116 +2018-11-25,62559 +2018-11-26,77084 +2018-11-27,93864 +2018-11-28,88667 +2018-11-29,92368 +2018-11-30,82645 +2018-12-01,62373 +2018-12-02,73710 +2018-12-03,96254 +2018-12-04,96984 +2018-12-05,96559 +2018-12-06,89751 +2018-12-07,86705 +2018-12-08,72606 +2018-12-09,70190 +2018-12-10,74469 +2018-12-11,81153 +2018-12-12,83163 +2018-12-13,89445 +2018-12-14,83384 +2018-12-15,79467 +2018-12-16,77869 +2018-12-17,98436 +2018-12-18,96231 +2018-12-19,92070 +2018-12-20,90449 +2018-12-21,85083 +2018-12-22,70392 +2018-12-23,69765 +2018-12-24,69618 +2018-12-25,74671 +2018-12-26,76754 +2018-12-27,80703 +2018-12-28,73629 +2018-12-29,66282 +2018-12-30,62826 +2018-12-31,60481 +2019-01-01,58508 +2019-01-02,109708 +2019-01-03,100710 +2019-01-04,94514 +2019-01-05,77897 +2019-01-06,94108 +2019-01-07,94715 +2019-01-08,105928 +2019-01-09,106576 +2019-01-10,111328 +2019-01-11,120991 +2019-01-12,110775 +2019-01-13,97243 +2019-01-14,114139 +2019-01-15,112172 +2019-01-16,113433 +2019-01-17,105912 +2019-01-18,106513 +2019-01-19,79858 +2019-01-20,78679 +2019-01-21,103240 +2019-01-22,106126 +2019-01-23,119710 +2019-01-24,114541 +2019-01-25,119836 +2019-01-26,78342 +2019-01-27,86596 +2019-01-28,111784 +2019-01-29,107881 +2019-01-30,106844 +2019-01-31,115145 +2019-02-01,99156 +2019-02-02,71654 +2019-02-03,104287 +2019-02-04,97713 +2019-02-05,107855 +2019-02-06,120854 +2019-02-07,107973 +2019-02-08,101730 +2019-02-09,118356 +2019-02-10,78137 +2019-02-11,113240 +2019-02-12,118410 +2019-02-13,122283 +2019-02-14,134772 +2019-02-15,123318 +2019-02-16,111750 +2019-02-17,98067 +2019-02-18,112632 +2019-02-19,106237 +2019-02-20,120747 +2019-02-21,114251 +2019-02-22,102341 +2019-02-23,86657 +2019-02-24,81696 +2019-02-25,99292 +2019-02-26,108135 +2019-02-27,102492 +2019-02-28,103079 +2019-03-01,92662 +2019-03-02,75072 +2019-03-03,76810 +2019-03-04,104991 +2019-03-05,113300 +2019-03-06,99434 +2019-03-07,96024 +2019-03-08,91932 +2019-03-09,65607 +2019-03-10,68218 +2019-03-11,100407 +2019-03-12,92674 +2019-03-13,97029 +2019-03-14,107248 +2019-03-15,102519 +2019-03-16,80095 +2019-03-17,66368 +2019-03-18,101569 +2019-03-19,98515 +2019-03-20,95566 +2019-03-21,83454 +2019-03-22,92856 +2019-03-23,59222 +2019-03-24,64835 +2019-03-25,94751 +2019-03-26,106366 +2019-03-27,97418 +2019-03-28,113353 +2019-03-29,134753 +2019-03-30,83480 +2019-03-31,71121 +2019-04-01,98719 +2019-04-02,93282 +2019-04-03,98107 +2019-04-04,112045 +2019-04-05,110418 +2019-04-06,80815 +2019-04-07,64028 +2019-04-08,89370 +2019-04-09,92505 +2019-04-10,92153 +2019-04-11,97584 +2019-04-12,92058 +2019-04-13,93224 +2019-04-14,75554 +2019-04-15,92015 +2019-04-16,98066 +2019-04-17,100099 +2019-04-18,86821 +2019-04-19,73030 +2019-04-20,131100 +2019-04-21,75644 +2019-04-22,81984 +2019-04-23,97791 +2019-04-24,91681 +2019-04-25,87451 +2019-04-26,79416 +2019-04-27,61038 +2019-04-28,57724 +2019-04-29,80832 +2019-04-30,96499 +2019-05-01,91566 +2019-05-02,105923 +2019-05-03,100673 +2019-05-04,62282 +2019-05-05,86542 +2019-05-06,83274 +2019-05-07,85039 +2019-05-08,92181 +2019-05-09,91506 +2019-05-10,86823 +2019-05-11,89641 +2019-05-12,65338 +2019-05-13,90475 +2019-05-14,106162 +2019-05-15,104193 +2019-05-16,94579 +2019-05-17,101725 +2019-05-18,86865 +2019-05-19,101164 +2019-05-20,92125 +2019-05-21,93848 +2019-05-22,106702 +2019-05-23,86054 +2019-05-24,83585 +2019-05-25,67210 +2019-05-26,67965 +2019-05-27,106559 +2019-05-28,99094 +2019-05-29,100021 +2019-05-30,102705 +2019-05-31,102818 +2019-06-01,71713 +2019-06-02,80399 +2019-06-03,102453 +2019-06-04,106321 +2019-06-05,102191 +2019-06-06,106048 +2019-06-07,104623 +2019-06-08,61504 +2019-06-09,75791 +2019-06-10,98910 +2019-06-11,102190 +2019-06-12,107613 +2019-06-13,99938 +2019-06-14,81671 +2019-06-15,63355 +2019-06-16,69442 +2019-06-17,1173655 +2019-06-18,1166225 +2019-06-19,102231 +2019-06-20,105359 +2019-06-21,101275 +2019-06-22,72492 +2019-06-23,83188 +2019-06-24,107207 +2019-06-25,107039 +2019-06-26,95900 +2019-06-27,107290 +2019-06-28,87190 +2019-06-29,63622 +2019-06-30,65243 +2019-07-01,97699 +2019-07-02,97183 +2019-07-03,91528 +2019-07-04,87225 +2019-07-05,131213 +2019-07-06,66995 +2019-07-07,71811 +2019-07-08,97352 +2019-07-09,117078 +2019-07-10,207841 +2019-07-11,111793 +2019-07-12,112038 +2019-07-13,70150 +2019-07-14,68169 +2019-07-15,107960 +2019-07-16,107007 +2019-07-17,129677 +2019-07-18,127187 +2019-07-19,102631 +2019-07-20,75436 +2019-07-21,70848 +2019-07-22,107960 +2019-07-23,110464 +2019-07-24,121716 +2019-07-25,100948 +2019-07-26,91195 +2019-07-27,68741 +2019-07-28,70696 +2019-07-29,100947 +2019-07-30,104442 +2019-07-31,99008 +2019-08-01,103424 +2019-08-02,93270 +2019-08-03,151671 +2019-08-04,145731 +2019-08-05,105386 +2019-08-06,337325 +2019-08-07,341595 +2019-08-08,99495 +2019-08-09,93534 +2019-08-10,65534 +2019-08-11,62891 +2019-08-12,87424 +2019-08-13,100304 +2019-08-14,105699 +2019-08-15,85475 +2019-08-16,96934 +2019-08-17,55069 +2019-08-18,84197 +2019-08-19,119860 +2019-08-20,114539 +2019-08-21,118384 +2019-08-22,140928 +2019-08-23,103203 +2019-08-24,80988 +2019-08-25,80635 +2019-08-26,130151 +2019-08-27,122564 +2019-08-28,116142 +2019-08-29,94855 +2019-08-30,98117 +2019-08-31,122398 +2019-09-01,69977 +2019-09-02,85331 +2019-09-03,102896 +2019-09-04,106868 +2019-09-05,102307 +2019-09-06,91461 +2019-09-07,61628 +2019-09-08,98955 +2019-09-09,174212 +2019-09-10,95371 +2019-09-11,97140 +2019-09-12,101739 +2019-09-13,91749 +2019-09-14,65897 +2019-09-15,66924 +2019-09-16,93719 +2019-09-17,116171 +2019-09-18,106662 +2019-09-19,106773 +2019-09-20,91165 +2019-09-21,61998 +2019-09-22,63127 +2019-09-23,105193 +2019-09-24,106773 +2019-09-25,130091 +2019-09-26,146917 +2019-09-27,105245 +2019-09-28,71045 +2019-09-29,93493 +2019-09-30,107238 +2019-10-01,107202 +2019-10-02,99416 +2019-10-03,98737 +2019-10-04,91873 +2019-10-05,78400 +2019-10-06,76252 +2019-10-07,114746 +2019-10-08,121411 +2019-10-09,121069 +2019-10-10,129971 +2019-10-11,157475 +2019-10-12,147056 +2019-10-13,116148 +2019-10-14,118108 +2019-10-15,131170 +2019-10-16,185784 +2019-10-17,169663 +2019-10-18,160650 +2019-10-19,116900 +2019-10-20,120460 +2019-10-21,208036 +2019-10-22,229870 +2019-10-23,273708 +2019-10-24,255178 +2019-10-25,176921 +2019-10-26,118564 +2019-10-27,129458 +2019-10-28,209661 +2019-10-29,211967 +2019-10-30,210925 +2019-10-31,189965 +2019-11-01,168513 +2019-11-02,118347 +2019-11-03,130118 +2019-11-04,201791 +2019-11-05,208234 +2019-11-06,194616 +2019-11-07,200462 +2019-11-08,177588 +2019-11-09,115642 +2019-11-10,117717 +2019-11-11,212058 +2019-11-12,206488 +2019-11-13,195023 +2019-11-14,196477 +2019-11-15,314101 +2019-11-16,125634 +2019-11-17,131639 +2019-11-18,221181 +2019-11-19,221555 +2019-11-20,151733 +2019-11-21,169121 +2019-11-22,204015 +2019-11-23,146658 +2019-11-24,138875 +2019-11-25,219608 +2019-11-26,220590 +2019-11-27,208223 +2019-11-28,202049 +2019-11-29,171584 +2019-11-30,141161 +2019-12-01,142918 +2019-12-02,220144 +2019-12-03,158549 diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/line_plot.png b/9-data-analysis-python/4-page-view-time-series-visualizer/line_plot.png new file mode 100644 index 0000000..fb0dfff Binary files /dev/null and b/9-data-analysis-python/4-page-view-time-series-visualizer/line_plot.png differ diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/main.py b/9-data-analysis-python/4-page-view-time-series-visualizer/main.py new file mode 100644 index 0000000..fc209bb --- /dev/null +++ b/9-data-analysis-python/4-page-view-time-series-visualizer/main.py @@ -0,0 +1,11 @@ +# This entrypoint file to be used in development. Start by reading README.md +import time_series_visualizer +from unittest import main + +# Test your function by calling it here +time_series_visualizer.draw_line_plot() +time_series_visualizer.draw_bar_plot() +time_series_visualizer.draw_box_plot() + +# Run unit tests automatically +main(module='test_module', exit=False) \ No newline at end of file diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/poetry.lock b/9-data-analysis-python/4-page-view-time-series-visualizer/poetry.lock new file mode 100644 index 0000000..8ffbd1f --- /dev/null +++ b/9-data-analysis-python/4-page-view-time-series-visualizer/poetry.lock @@ -0,0 +1,131 @@ +[[package]] +category = "main" +description = "Composable style cycles" +name = "cycler" +optional = false +python-versions = "*" +version = "0.10.0" + +[package.dependencies] +six = "*" + +[[package]] +category = "main" +description = "A fast implementation of the Cassowary constraint solver" +name = "kiwisolver" +optional = false +python-versions = ">=3.6" +version = "1.2.0" + +[[package]] +category = "main" +description = "Python plotting package" +name = "matplotlib" +optional = false +python-versions = ">=3.6" +version = "3.2.1" + +[package.dependencies] +cycler = ">=0.10" +kiwisolver = ">=1.0.1" +numpy = ">=1.11" +pyparsing = ">=2.0.1,<2.0.4 || >2.0.4,<2.1.2 || >2.1.2,<2.1.6 || >2.1.6" +python-dateutil = ">=2.1" + +[[package]] +category = "main" +description = "NumPy is the fundamental package for array computing with Python." +name = "numpy" +optional = false +python-versions = ">=3.5" +version = "1.18.5" + +[[package]] +category = "main" +description = "Powerful data structures for data analysis, time series, and statistics" +name = "pandas" +optional = false +python-versions = ">=3.6.1" +version = "1.0.4" + +[package.dependencies] +numpy = ">=1.13.3" +python-dateutil = ">=2.6.1" +pytz = ">=2017.2" + +[[package]] +category = "main" +description = "Python parsing module" +name = "pyparsing" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +version = "2.4.7" + +[[package]] +category = "main" +description = "Extensions to the standard Python datetime module" +name = "python-dateutil" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +version = "2.8.1" + +[package.dependencies] +six = ">=1.5" + +[[package]] +category = "main" +description = "World timezone definitions, modern and historical" +name = "pytz" +optional = false +python-versions = "*" +version = "2020.1" + +[[package]] +category = "main" +description = "SciPy: Scientific Library for Python" +name = "scipy" +optional = false +python-versions = ">=3.5" +version = "1.4.1" + +[package.dependencies] +numpy = ">=1.13.3" + +[[package]] +category = "main" +description = "seaborn: statistical data visualization" +name = "seaborn" +optional = false +python-versions = ">=3.6" +version = "0.10.1" + +[package.dependencies] +matplotlib = ">=2.1.2" +numpy = ">=1.13.3" +pandas = ">=0.22.0" +scipy = ">=1.0.1" + +[[package]] +category = "main" +description = "Python 2 and 3 compatibility utilities" +name = "six" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +version = "1.15.0" + +[metadata] +content-hash = "4e8082311e9378f77d7a1accb8cd080faf04d14d5f7beba06a8e2f950698f9f3" +python-versions = "^3.7" + +[metadata.hashes] +cycler = ["1d8a5ae1ff6c5cf9b93e8811e581232ad8920aeec647c37316ceac982b08cb2d", "cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8"] +kiwisolver = ["03662cbd3e6729f341a97dd2690b271e51a67a68322affab12a5b011344b973c", "18d749f3e56c0480dccd1714230da0f328e6e4accf188dd4e6884bdd06bf02dd", "247800260cd38160c362d211dcaf4ed0f7816afb5efe56544748b21d6ad6d17f", "443c2320520eda0a5b930b2725b26f6175ca4453c61f739fef7a5847bd262f74", "4eadb361baf3069f278b055e3bb53fa189cea2fd02cb2c353b7a99ebb4477ef1", "556da0a5f60f6486ec4969abbc1dd83cf9b5c2deadc8288508e55c0f5f87d29c", "603162139684ee56bcd57acc74035fceed7dd8d732f38c0959c8bd157f913fec", "60a78858580761fe611d22127868f3dc9f98871e6fdf0a15cc4203ed9ba6179b", "7cc095a4661bdd8a5742aaf7c10ea9fac142d76ff1770a0f84394038126d8fc7", "c31bc3c8e903d60a1ea31a754c72559398d91b5929fcb329b1c3a3d3f6e72113", "c955791d80e464da3b471ab41eb65cf5a40c15ce9b001fdc5bbc241170de58ec", "d069ef4b20b1e6b19f790d00097a5d5d2c50871b66d10075dab78938dc2ee2cf", "d52b989dc23cdaa92582ceb4af8d5bcc94d74b2c3e64cd6785558ec6a879793e", "e586b28354d7b6584d8973656a7954b1c69c93f708c0c07b77884f91640b7657", "efcf3397ae1e3c3a4a0a0636542bcad5adad3b1dd3e8e629d0b6e201347176c8", "fccefc0d36a38c57b7bd233a9b485e2f1eb71903ca7ad7adacad6c28a56d62d2"] +matplotlib = ["2466d4dddeb0f5666fd1e6736cc5287a4f9f7ae6c1a9e0779deff798b28e1d35", "282b3fc8023c4365bad924d1bb442ddc565c2d1635f210b700722776da466ca3", "4bb50ee4755271a2017b070984bcb788d483a8ce3132fab68393d1555b62d4ba", "56d3147714da5c7ac4bc452d041e70e0e0b07c763f604110bd4e2527f320b86d", "7a9baefad265907c6f0b037c8c35a10cf437f7708c27415a5513cf09ac6d6ddd", "aae7d107dc37b4bb72dcc45f70394e6df2e5e92ac4079761aacd0e2ad1d3b1f7", "af14e77829c5b5d5be11858d042d6f2459878f8e296228c7ea13ec1fd308eb68", "c1cf735970b7cd424502719b44288b21089863aaaab099f55e0283a721aaf781", "ce378047902b7a05546b6485b14df77b2ff207a0054e60c10b5680132090c8ee", "d35891a86a4388b6965c2d527b9a9f9e657d9e110b0575ca8a24ba0d4e34b8fc", "e06304686209331f99640642dee08781a9d55c6e32abb45ed54f021f46ccae47", "e20ba7fb37d4647ac38f3c6d8672dd8b62451ee16173a0711b37ba0ce42bf37d", "f4412241e32d0f8d3713b68d3ca6430190a5e8a7c070f1c07d7833d8c5264398", "ffe2f9cdcea1086fc414e82f42271ecf1976700b8edd16ca9d376189c6d93aee"] +numpy = ["0172304e7d8d40e9e49553901903dc5f5a49a703363ed756796f5808a06fc233", "34e96e9dae65c4839bd80012023aadd6ee2ccb73ce7fdf3074c62f301e63120b", "3676abe3d621fc467c4c1469ee11e395c82b2d6b5463a9454e37fe9da07cd0d7", "3dd6823d3e04b5f223e3e265b4a1eae15f104f4366edd409e5a5e413a98f911f", "4064f53d4cce69e9ac613256dc2162e56f20a4e2d2086b1956dd2fcf77b7fac5", "4674f7d27a6c1c52a4d1aa5f0881f1eff840d2206989bae6acb1c7668c02ebfb", "7d42ab8cedd175b5ebcb39b5208b25ba104842489ed59fbb29356f671ac93583", "965df25449305092b23d5145b9bdaeb0149b6e41a77a7d728b1644b3c99277c1", "9c9d6531bc1886454f44aa8f809268bc481295cf9740827254f53c30104f074a", "a78e438db8ec26d5d9d0e584b27ef25c7afa5a182d1bf4d05e313d2d6d515271", "a7acefddf994af1aeba05bbbafe4ba983a187079f125146dc5859e6d817df824", "a87f59508c2b7ceb8631c20630118cc546f1f815e034193dc72390db038a5cb3", "ac792b385d81151bae2a5a8adb2b88261ceb4976dbfaaad9ce3a200e036753dc", "b03b2c0badeb606d1232e5f78852c102c0a7989d3a534b3129e7856a52f3d161", "b39321f1a74d1f9183bf1638a745b4fd6fe80efbb1f6b32b932a588b4bc7695f", "cae14a01a159b1ed91a324722d746523ec757357260c6804d11d6147a9e53e3f", "cd49930af1d1e49a812d987c2620ee63965b619257bd76eaaa95870ca08837cf", "e15b382603c58f24265c9c931c9a45eebf44fe2e6b4eaedbb0d025ab3255228b", "e91d31b34fc7c2c8f756b4e902f901f856ae53a93399368d9a0dc7be17ed2ca0", "ef627986941b5edd1ed74ba89ca43196ed197f1a206a3f18cc9faf2fb84fd675", "f718a7949d1c4f622ff548c572e0c03440b49b9531ff00e4ed5738b459f011e8"] +pandas = ["034185bb615dc96d08fa13aacba8862949db19d5e7804d6ee242d086f07bcc46", "0c9b7f1933e3226cc16129cf2093338d63ace5c85db7c9588e3e1ac5c1937ad5", "1f6fcf0404626ca0475715da045a878c7062ed39bc859afc4ccf0ba0a586a0aa", "1fc963ba33c299973e92d45466e576d11f28611f3549469aec4a35658ef9f4cc", "29b4cfee5df2bc885607b8f016e901e63df7ffc8f00209000471778f46cc6678", "2a8b6c28607e3f3c344fe3e9b3cd76d2bf9f59bc8c0f2e582e3728b80e1786dc", "2bc2ff52091a6ac481cc75d514f06227dc1b10887df1eb72d535475e7b825e31", "415e4d52fcfd68c3d8f1851cef4d947399232741cc994c8f6aa5e6a9f2e4b1d8", "519678882fd0587410ece91e3ff7f73ad6ded60f6fcb8aa7bcc85c1dc20ecac6", "51e0abe6e9f5096d246232b461649b0aa627f46de8f6344597ca908f2240cbaa", "698e26372dba93f3aeb09cd7da2bb6dd6ade248338cfe423792c07116297f8f4", "83af85c8e539a7876d23b78433d90f6a0e8aa913e37320785cf3888c946ee874", "982cda36d1773076a415ec62766b3c0a21cdbae84525135bdb8f460c489bb5dd", "a647e44ba1b3344ebc5991c8aafeb7cca2b930010923657a273b41d86ae225c4", "b35d625282baa7b51e82e52622c300a1ca9f786711b2af7cbe64f1e6831f4126", "bab51855f8b318ef39c2af2c11095f45a10b74cbab4e3c8199efcc5af314c648"] +pyparsing = ["c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"] +python-dateutil = ["73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", "75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"] +pytz = ["a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed", "c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048"] +scipy = ["00af72998a46c25bdb5824d2b729e7dabec0c765f9deb0b504f928591f5ff9d4", "0902a620a381f101e184a958459b36d3ee50f5effd186db76e131cbefcbb96f7", "1e3190466d669d658233e8a583b854f6386dd62d655539b77b3fa25bfb2abb70", "2cce3f9847a1a51019e8c5b47620da93950e58ebc611f13e0d11f4980ca5fecb", "3092857f36b690a321a662fe5496cb816a7f4eecd875e1d36793d92d3f884073", "386086e2972ed2db17cebf88610aab7d7f6e2c0ca30042dc9a89cf18dcc363fa", "71eb180f22c49066f25d6df16f8709f215723317cc951d99e54dc88020ea57be", "770254a280d741dd3436919d47e35712fb081a6ff8bafc0f319382b954b77802", "787cc50cab3020a865640aba3485e9fbd161d4d3b0d03a967df1a2881320512d", "8a07760d5c7f3a92e440ad3aedcc98891e915ce857664282ae3c0220f3301eb6", "8d3bc3993b8e4be7eade6dcc6fd59a412d96d3a33fa42b0fa45dc9e24495ede9", "9508a7c628a165c2c835f2497837bf6ac80eb25291055f56c129df3c943cbaf8", "a144811318853a23d32a07bc7fd5561ff0cac5da643d96ed94a4ffe967d89672", "a1aae70d52d0b074d8121333bc807a485f9f1e6a69742010b33780df2e60cfe0", "a2d6df9eb074af7f08866598e4ef068a2b310d98f87dc23bd1b90ec7bdcec802", "bb517872058a1f087c4528e7429b4a44533a902644987e7b2fe35ecc223bc408", "c5cac0c0387272ee0e789e94a570ac51deb01c796b37fb2aad1fb13f85e2f97d", "cc971a82ea1170e677443108703a2ec9ff0f70752258d0e9f5433d00dda01f59", "dba8306f6da99e37ea08c08fef6e274b5bf8567bb094d1dbe86a20e532aca088", "dc60bb302f48acf6da8ca4444cfa17d52c63c5415302a9ee77b3b21618090521", "dee1bbf3a6c8f73b6b218cb28eed8dd13347ea2f87d572ce19b289d6fd3fbc59"] +seaborn = ["2d1a0c9d6bd1bc3cadb0364b8f06540f51322a670cf8438d0fde1c1c7317adc0", "c901ce494541fb4714cfa7db79d0232dc3f4c4dfd3f273bacf17816084df5b53"] +six = ["30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"] diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/pyproject.toml b/9-data-analysis-python/4-page-view-time-series-visualizer/pyproject.toml new file mode 100644 index 0000000..d1bf0b6 --- /dev/null +++ b/9-data-analysis-python/4-page-view-time-series-visualizer/pyproject.toml @@ -0,0 +1,11 @@ +[tool] +[tool.poetry] +authors = ["Your Name "] +name = "root" +version = "0.0.0" +description = "" + +[tool.poetry.dependencies] +pandas = "*" +python = "^3.7" +seaborn = "*" diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/test_module.py b/9-data-analysis-python/4-page-view-time-series-visualizer/test_module.py new file mode 100644 index 0000000..51b0946 --- /dev/null +++ b/9-data-analysis-python/4-page-view-time-series-visualizer/test_module.py @@ -0,0 +1,123 @@ +import unittest +import time_series_visualizer +import matplotlib as mpl + +class DataCleaningTestCase(unittest.TestCase): + def test_data_cleaning(self): + actual = int(time_series_visualizer.df.count(numeric_only=True)) + expected = 1238 + self.assertEqual(actual, expected, "Expected DataFrame count after cleaning to be 1238.") + +class LinePlotTestCase(unittest.TestCase): + def setUp(self): + self.fig = time_series_visualizer.draw_line_plot() + self.ax = self.fig.axes[0] + + def test_line_plot_title(self): + actual = self.ax.get_title() + expected = "Daily freeCodeCamp Forum Page Views 5/2016-12/2019" + self.assertEqual(actual, expected, "Expected line plot title to be 'Daily freeCodeCamp Forum Page Views 5/2016-12/2019'") + + def test_line_plot_labels(self): + actual = self.ax.get_xlabel() + expected = "Date" + self.assertEqual(actual, expected, "Expected line plot xlabel to be 'Date'") + actual = self.ax.get_ylabel() + expected = "Page Views" + self.assertEqual(actual, expected, "Expected line plot ylabel to be 'Page Views'") + + def test_line_plot_data_quantity(self): + actual = len(self.ax.lines[0].get_ydata()) + expected = 1238 + self.assertEqual(actual, expected, "Expected number of data points in line plot to be 1238.") + + +class BarPlotTestCase(unittest.TestCase): + def setUp(self): + self.fig = time_series_visualizer.draw_bar_plot() + self.ax = self.fig.axes[0] + + def test_bar_plot_legend_labels(self): + actual = [] + for label in self.ax.get_legend().get_texts(): + actual.append(label.get_text()) + expected = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] + self.assertEqual(actual, expected, "Expected bar plot legend labels to be months of the year.") + + def test_bar_plot_labels(self): + actual = self.ax.get_xlabel() + expected = "Years" + self.assertEqual(actual, expected, "Expected bar plot xlabel to be 'Years'") + actual = self.ax.get_ylabel() + expected = "Average Page Views" + self.assertEqual(actual, expected, "Expected bar plot ylabel to be 'Average Page Views'") + actual = [] + for label in self.ax.get_xaxis().get_majorticklabels(): + actual.append(label.get_text()) + expected = ['2016', '2017', '2018', '2019'] + self.assertEqual(actual, expected, "Expected bar plot secondary labels to be '2016', '2017', '2018', '2019'") + + def test_bar_plot_number_of_bars(self): + actual = len([rect for rect in self.ax.get_children() if isinstance(rect, mpl.patches.Rectangle)]) + expected = 49 + self.assertEqual(actual, expected, "Expected a different number of bars in bar chart.") + + +class BoxPlotTestCase(unittest.TestCase): + def setUp(self): + self.fig = time_series_visualizer.draw_box_plot() + self.ax1 = self.fig.axes[0] + self.ax2 = self.fig.axes[1] + + def test_box_plot_number(self): + actual = len(self.fig.get_axes()) + expected = 2 + self.assertEqual(actual, expected, "Expected two box plots in figure.") + + def test_box_plot_labels(self): + actual = self.ax1.get_xlabel() + expected = "Year" + self.assertEqual(actual, expected, "Expected box plot 1 xlabel to be 'Year'") + actual = self.ax1.get_ylabel() + expected = "Page Views" + self.assertEqual(actual, expected, "Expected box plot 1 ylabel to be 'Page Views'") + actual = self.ax2.get_xlabel() + expected = "Month" + self.assertEqual(actual, expected, "Expected box plot 2 xlabel to be 'Month'") + actual = self.ax2.get_ylabel() + expected = "Page Views" + self.assertEqual(actual, expected, "Expected box plot 2 ylabel to be 'Page Views'") + actual = [] + for label in self.ax1.get_xaxis().get_majorticklabels(): + actual.append(label.get_text()) + expected = ['2016', '2017', '2018', '2019'] + self.assertEqual(actual, expected, "Expected box plot 1 secondary labels to be '2016', '2017', '2018', '2019'") + actual = [] + for label in self.ax2.get_xaxis().get_majorticklabels(): + actual.append(label.get_text()) + expected = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] + self.assertEqual(actual, expected, "Expected box plot 2 secondary labels to be 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'") + actual = [] + for label in self.ax1.get_yaxis().get_majorticklabels(): + actual.append(label.get_text()) + expected = ['0', '20000', '40000', '60000', '80000', '100000', '120000', '140000', '160000', '180000', '200000'] + self.assertEqual(actual, expected, "Expected box plot 1 secondary labels to be '0', '20000', '40000', '60000', '80000', '100000', '120000', '140000', '160000', '180000', '200000'") + + def test_box_plot_titles(self): + actual = self.ax1.get_title() + expected = "Year-wise Box Plot (Trend)" + self.assertEqual(actual, expected, "Expected box plot 1 title to be 'Year-wise Box Plot (Trend)'") + actual = self.ax2.get_title() + expected = "Month-wise Box Plot (Seasonality)" + self.assertEqual(actual, expected, "Expected box plot 2 title to be 'Month-wise Box Plot (Seasonality)'") + + def test_box_plot_number_of_boxes(self): + actual = len(self.ax1.lines) / 6 # Every box has 6 lines + expected = 4 + self.assertEqual(actual, expected, "Expected four boxes in box plot 1") + actual = len(self.ax2.lines) / 6 # Every box has 6 lines + expected = 12 + self.assertEqual(actual, expected, "Expected 12 boxes in box plot 2") + +if __name__ == "__main__": + unittest.main() diff --git a/9-data-analysis-python/4-page-view-time-series-visualizer/time_series_visualizer.py b/9-data-analysis-python/4-page-view-time-series-visualizer/time_series_visualizer.py new file mode 100644 index 0000000..8193c30 --- /dev/null +++ b/9-data-analysis-python/4-page-view-time-series-visualizer/time_series_visualizer.py @@ -0,0 +1,95 @@ +import matplotlib.pyplot as plt +import pandas as pd +import seaborn as sns +import numpy as np +from pandas.plotting import register_matplotlib_converters +register_matplotlib_converters() + +# Import data (Make sure to parse dates. Consider setting index column to 'date'.) +df = pd.read_csv('fcc-forum-pageviews.csv', parse_dates=True, index_col='date') + +# Clean data +df = df[df['value'] > df['value'].quantile(0.026)] +df = df[df['value'] <= df['value'].quantile(0.975)] + + +def draw_line_plot(): + # Draw line plot + fig, axes = plt.subplots(figsize=(20, 10)) + + axes.plot( + df.index, df['value'] + ) + + axes.set_title('Daily freeCodeCamp Forum Page Views 5/2016-12/2019') + axes.set_xlabel('Date') + axes.set_ylabel('Page Views') + + + + + + + # Save image and return fig (don't change this part) + fig.savefig('line_plot.png') + return fig + +def draw_bar_plot(): + # Copy and modify data for monthly bar plot + df_bar = df.copy() + df_bar['Years'] = df_bar.index.year + df_bar['Months'] = df_bar.index.month_name() + df_bar = df_bar.groupby(['Years', 'Months'], sort=False)['value'].mean().round() + df_bar = df_bar.reset_index() + df_bar = df_bar.rename({'value': 'Average Page Views'}, axis=1) + + df_bar = pd.concat([pd.DataFrame({ + 'Years': [2016, 2016, 2016, 2016], + 'Months': ['January', 'February', 'March', 'April'], + 'Average Page Views': [0, 0, 0, 0] + }), df_bar]) + + # Draw bar plot + + fig, axes = plt.subplots(figsize=(20, 10)) + + sns.barplot(data=df_bar, x='Years', y='Average Page Views', hue='Months') + + # Save image and return fig (don't change this part) + fig.savefig('bar_plot.png') + return fig + +def draw_box_plot(): + # Prepare data for box plots (this part is done!) + df_box = df.copy() + df_box.reset_index(inplace=True) + df_box['year'] = [d.year for d in df_box.date] + df_box['month'] = [d.strftime('%b') for d in df_box.date] + df_box = pd.concat([pd.DataFrame({ + 'year': [2016, 2016, 2016, 2016], + 'month': ['Jan', 'Feb', 'Mar', 'Apr'], + }), df_box]) + + # Draw box plots (using Seaborn) + plot_objects = plt.subplots(nrows=1, ncols=2, figsize=(18, 6)) + + fig, ((ax1, ax2)) = plot_objects + + sns.boxplot(df_box, x='year', y='value', ax=ax1) + sns.boxplot(df_box, x='month', y='value', ax=ax2) + + + ax1.set_title('Year-wise Box Plot (Trend)') + ax1.set_xlabel('Year') + ax1.set_ylabel('Page Views') + + + ax2.set_title('Month-wise Box Plot (Seasonality)') + ax2.set_xlabel('Month') + ax2.set_ylabel('Page Views') + + + + # Save image and return fig (don't change this part) + fig.savefig('box_plot.png') + return fig