customeranalytics 0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. customeranalytics/__init__.py +319 -0
  2. customeranalytics/configs.py +480 -0
  3. customeranalytics/data_storage_configurations/__init__.py +245 -0
  4. customeranalytics/data_storage_configurations/data_access.py +165 -0
  5. customeranalytics/data_storage_configurations/data_works_pipeline.py +207 -0
  6. customeranalytics/data_storage_configurations/es_create_index.py +544 -0
  7. customeranalytics/data_storage_configurations/logger.py +36 -0
  8. customeranalytics/data_storage_configurations/query_es.py +157 -0
  9. customeranalytics/data_storage_configurations/reports.py +684 -0
  10. customeranalytics/data_storage_configurations/schedule_data_integration.py +355 -0
  11. customeranalytics/docs/queries.yaml +245 -0
  12. customeranalytics/docs/web_configs.yaml +2 -0
  13. customeranalytics/exploratory_analysis/__init__.py +109 -0
  14. customeranalytics/exploratory_analysis/churn.py +232 -0
  15. customeranalytics/exploratory_analysis/cohorts.py +535 -0
  16. customeranalytics/exploratory_analysis/descriptive_statistics.py +470 -0
  17. customeranalytics/exploratory_analysis/funnels.py +407 -0
  18. customeranalytics/exploratory_analysis/product_analytics.py +340 -0
  19. customeranalytics/exploratory_analysis/promotion_analytics.py +299 -0
  20. customeranalytics/exploratory_analysis/rfm.py +202 -0
  21. customeranalytics/exploratory_analysis/sample_data/sample_data_avg_order_count_per_promo_per_cust.csv +99 -0
  22. customeranalytics/exploratory_analysis/sample_data/sample_data_chart_1_search.csv +2 -0
  23. customeranalytics/exploratory_analysis/sample_data/sample_data_chart_2_search.csv +46 -0
  24. customeranalytics/exploratory_analysis/sample_data/sample_data_chart_3_search.csv +2 -0
  25. customeranalytics/exploratory_analysis/sample_data/sample_data_chart_4_search.csv +2 -0
  26. customeranalytics/exploratory_analysis/sample_data/sample_data_churn.csv +2 -0
  27. customeranalytics/exploratory_analysis/sample_data/sample_data_churn_weekly.csv +10 -0
  28. customeranalytics/exploratory_analysis/sample_data/sample_data_client_feature_predicted.csv +1590 -0
  29. customeranalytics/exploratory_analysis/sample_data/sample_data_client_kpis.csv +7060 -0
  30. customeranalytics/exploratory_analysis/sample_data/sample_data_clvrfm_anomaly.csv +561 -0
  31. customeranalytics/exploratory_analysis/sample_data/sample_data_clvsegments_amount.csv +8 -0
  32. customeranalytics/exploratory_analysis/sample_data/sample_data_customer_journey.csv +18 -0
  33. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_clv.csv +103 -0
  34. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_downloads.csv +68 -0
  35. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_from_1_to_2.csv +66 -0
  36. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_from_2_to_3.csv +64 -0
  37. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_from_3_to_4.csv +55 -0
  38. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_dimension_values.csv +199 -0
  39. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_funnel.csv +36 -0
  40. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_funnel_downloads.csv +68 -0
  41. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_inorganic_ratio.csv +6070 -0
  42. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_orders.csv +57 -0
  43. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_organic_orders.csv +64 -0
  44. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_products_of_sales.csv +12574 -0
  45. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_promotion_discount.csv +64 -0
  46. customeranalytics/exploratory_analysis/sample_data/sample_data_daily_promotion_revenue.csv +6070 -0
  47. customeranalytics/exploratory_analysis/sample_data/sample_data_dcohort_anomaly.csv +6 -0
  48. customeranalytics/exploratory_analysis/sample_data/sample_data_dcohort_anomaly_2.csv +118 -0
  49. customeranalytics/exploratory_analysis/sample_data/sample_data_deliver.csv +47 -0
  50. customeranalytics/exploratory_analysis/sample_data/sample_data_deliver_kpis.csv +2 -0
  51. customeranalytics/exploratory_analysis/sample_data/sample_data_deliver_weekday_hour.csv +25 -0
  52. customeranalytics/exploratory_analysis/sample_data/sample_data_dfunnel_anomaly.csv +118 -0
  53. customeranalytics/exploratory_analysis/sample_data/sample_data_dimension_kpis.csv +199 -0
  54. customeranalytics/exploratory_analysis/sample_data/sample_data_dorders_anomaly.csv +85 -0
  55. customeranalytics/exploratory_analysis/sample_data/sample_data_frequency_clusters.csv +6 -0
  56. customeranalytics/exploratory_analysis/sample_data/sample_data_frequency_recency.csv +3740 -0
  57. customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_funnel.csv +25 -0
  58. customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_funnel_downloads.csv +25 -0
  59. customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_inorganic_ratio.csv +2353 -0
  60. customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_orders.csv +25 -0
  61. customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_organic_orders.csv +2353 -0
  62. customeranalytics/exploratory_analysis/sample_data/sample_data_inorganic_orders_per_promotion_per_day.csv +6070 -0
  63. customeranalytics/exploratory_analysis/sample_data/sample_data_kpis.csv +2 -0
  64. customeranalytics/exploratory_analysis/sample_data/sample_data_monetary_clusters.csv +6 -0
  65. customeranalytics/exploratory_analysis/sample_data/sample_data_monetary_frequency.csv +3740 -0
  66. customeranalytics/exploratory_analysis/sample_data/sample_data_monthly_funnel.csv +5 -0
  67. customeranalytics/exploratory_analysis/sample_data/sample_data_monthly_funnel_downloads.csv +5 -0
  68. customeranalytics/exploratory_analysis/sample_data/sample_data_monthly_orders.csv +4 -0
  69. customeranalytics/exploratory_analysis/sample_data/sample_data_most_combined_products.csv +11 -0
  70. customeranalytics/exploratory_analysis/sample_data/sample_data_most_ordered_categories.csv +11 -0
  71. customeranalytics/exploratory_analysis/sample_data/sample_data_most_ordered_products.csv +11 -0
  72. customeranalytics/exploratory_analysis/sample_data/sample_data_order_and_payment_amount_differences.csv +91 -0
  73. customeranalytics/exploratory_analysis/sample_data/sample_data_prepare.csv +101 -0
  74. customeranalytics/exploratory_analysis/sample_data/sample_data_prepare_weekday_hour.csv +25 -0
  75. customeranalytics/exploratory_analysis/sample_data/sample_data_product_kpis.csv +201 -0
  76. customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_amount_accept.csv +11 -0
  77. customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_amount_reject.csv +7 -0
  78. customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_orders_accept.csv +11 -0
  79. customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_orders_reject.csv +11 -0
  80. customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_comparison.csv +91 -0
  81. customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_kpis.csv +99 -0
  82. customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_number_of_customer.csv +99 -0
  83. customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_amount_accept.csv +81 -0
  84. customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_amount_reject.csv +11 -0
  85. customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_orders_accept.csv +55 -0
  86. customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_orders_reject.csv +37 -0
  87. customeranalytics/exploratory_analysis/sample_data/sample_data_purchase_amount_distribution.csv +22 -0
  88. customeranalytics/exploratory_analysis/sample_data/sample_data_recency_clusters.csv +6 -0
  89. customeranalytics/exploratory_analysis/sample_data/sample_data_recency_monetary.csv +3740 -0
  90. customeranalytics/exploratory_analysis/sample_data/sample_data_rfm.csv +2001 -0
  91. customeranalytics/exploratory_analysis/sample_data/sample_data_ride.csv +101 -0
  92. customeranalytics/exploratory_analysis/sample_data/sample_data_ride_weekday_hour.csv +25 -0
  93. customeranalytics/exploratory_analysis/sample_data/sample_data_segmentation.csv +11 -0
  94. customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_daily_before_after_amount.csv +10 -0
  95. customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_daily_before_after_orders.csv +9 -0
  96. customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_monthly_before_after_amount.csv +10 -0
  97. customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_monthly_before_after_orders.csv +11 -0
  98. customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_weekly_before_after_amount.csv +10 -0
  99. customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_weekly_before_after_orders.csv +10 -0
  100. customeranalytics/exploratory_analysis/sample_data/sample_data_user_counts_per_order_seq.csv +47 -0
  101. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_average_order_per_user.csv +13 -0
  102. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_average_payment_amount.csv +13 -0
  103. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_average_session_per_user.csv +13 -0
  104. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_downloads.csv +13 -0
  105. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_from_1_to_2.csv +13 -0
  106. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_from_2_to_3.csv +13 -0
  107. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_from_3_to_4.csv +12 -0
  108. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_funnel.csv +25 -0
  109. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_funnel_downloads.csv +25 -0
  110. customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_orders.csv +10 -0
  111. customeranalytics/ml_process/__init__.py +64 -0
  112. customeranalytics/ml_process/ab_test.py +615 -0
  113. customeranalytics/ml_process/anomaly_detection.py +456 -0
  114. customeranalytics/ml_process/clv_prediction.py +301 -0
  115. customeranalytics/ml_process/customer_segmentation.py +354 -0
  116. customeranalytics/ml_process/delivery_analytics.py +754 -0
  117. customeranalytics/utils.py +186 -0
  118. customeranalytics/web/app/__init__.py +37 -0
  119. customeranalytics/web/app/base/__init__.py +9 -0
  120. customeranalytics/web/app/base/forms.py +16 -0
  121. customeranalytics/web/app/base/models.py +43 -0
  122. customeranalytics/web/app/base/routes.py +126 -0
  123. customeranalytics/web/app/base/static/assets/css/app.css +20 -0
  124. customeranalytics/web/app/base/static/assets/fonts/Inter-Black.woff +0 -0
  125. customeranalytics/web/app/base/static/assets/fonts/Inter-Black.woff2 +0 -0
  126. customeranalytics/web/app/base/static/assets/fonts/Inter-BlackItalic.woff +0 -0
  127. customeranalytics/web/app/base/static/assets/fonts/Inter-BlackItalic.woff2 +0 -0
  128. customeranalytics/web/app/base/static/assets/fonts/Inter-Bold.woff +0 -0
  129. customeranalytics/web/app/base/static/assets/fonts/Inter-Bold.woff2 +0 -0
  130. customeranalytics/web/app/base/static/assets/fonts/Inter-BoldItalic.woff +0 -0
  131. customeranalytics/web/app/base/static/assets/fonts/Inter-BoldItalic.woff2 +0 -0
  132. customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBold.woff +0 -0
  133. customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBold.woff2 +0 -0
  134. customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBoldItalic.woff +0 -0
  135. customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
  136. customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLight-BETA.woff +0 -0
  137. customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLight-BETA.woff2 +0 -0
  138. customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLightItalic-BETA.woff +0 -0
  139. customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLightItalic-BETA.woff2 +0 -0
  140. customeranalytics/web/app/base/static/assets/fonts/Inter-Italic.woff +0 -0
  141. customeranalytics/web/app/base/static/assets/fonts/Inter-Italic.woff2 +0 -0
  142. customeranalytics/web/app/base/static/assets/fonts/Inter-Light-BETA.woff +0 -0
  143. customeranalytics/web/app/base/static/assets/fonts/Inter-Light-BETA.woff2 +0 -0
  144. customeranalytics/web/app/base/static/assets/fonts/Inter-LightItalic-BETA.woff +0 -0
  145. customeranalytics/web/app/base/static/assets/fonts/Inter-LightItalic-BETA.woff2 +0 -0
  146. customeranalytics/web/app/base/static/assets/fonts/Inter-Medium.woff +0 -0
  147. customeranalytics/web/app/base/static/assets/fonts/Inter-Medium.woff2 +0 -0
  148. customeranalytics/web/app/base/static/assets/fonts/Inter-MediumItalic.woff +0 -0
  149. customeranalytics/web/app/base/static/assets/fonts/Inter-MediumItalic.woff2 +0 -0
  150. customeranalytics/web/app/base/static/assets/fonts/Inter-Regular.woff +0 -0
  151. customeranalytics/web/app/base/static/assets/fonts/Inter-Regular.woff2 +0 -0
  152. customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBold.woff +0 -0
  153. customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBold.woff2 +0 -0
  154. customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBoldItalic.woff +0 -0
  155. customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBoldItalic.woff2 +0 -0
  156. customeranalytics/web/app/base/static/assets/fonts/Inter-Thin-BETA.woff +0 -0
  157. customeranalytics/web/app/base/static/assets/fonts/Inter-Thin-BETA.woff2 +0 -0
  158. customeranalytics/web/app/base/static/assets/fonts/Inter-ThinItalic-BETA.woff +0 -0
  159. customeranalytics/web/app/base/static/assets/fonts/Inter-ThinItalic-BETA.woff2 +0 -0
  160. customeranalytics/web/app/base/static/assets/fonts/Inter-italic.var.woff2 +0 -0
  161. customeranalytics/web/app/base/static/assets/fonts/Inter-upright.var.woff2 +0 -0
  162. customeranalytics/web/app/base/static/assets/fonts/Inter.var.woff2 +0 -0
  163. customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.eot +0 -0
  164. customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.svg +3570 -0
  165. customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.ttf +0 -0
  166. customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.woff +0 -0
  167. customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.woff2 +0 -0
  168. customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.eot +0 -0
  169. customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.svg +801 -0
  170. customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.ttf +0 -0
  171. customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.woff +0 -0
  172. customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.woff2 +0 -0
  173. customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.eot +0 -0
  174. customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.svg +5028 -0
  175. customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.ttf +0 -0
  176. customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.woff +0 -0
  177. customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.woff2 +0 -0
  178. customeranalytics/web/app/base/static/assets/img/avatars/avatar-1.png +0 -0
  179. customeranalytics/web/app/base/static/assets/img/avatars/avatar-2.png +0 -0
  180. customeranalytics/web/app/base/static/assets/img/avatars/avatar-3.png +0 -0
  181. customeranalytics/web/app/base/static/assets/img/avatars/avatar-4.png +0 -0
  182. customeranalytics/web/app/base/static/assets/img/avatars/avatar-5.png +0 -0
  183. customeranalytics/web/app/base/static/assets/img/avatars/info.jpeg +0 -0
  184. customeranalytics/web/app/base/static/assets/img/icons/customanality.png +0 -0
  185. customeranalytics/web/app/base/static/assets/img/icons/icon-48x48.png +0 -0
  186. customeranalytics/web/app/base/static/assets/js/app.js +2 -0
  187. customeranalytics/web/app/base/static/assets/js/app.js.LICENSE +566 -0
  188. customeranalytics/web/app/base/static/assets/js/app.js.LICENSE.txt +556 -0
  189. customeranalytics/web/app/base/static/assets/js/modules/bootstrap.js +15 -0
  190. customeranalytics/web/app/base/static/assets/js/modules/chartjs.js +4 -0
  191. customeranalytics/web/app/base/static/assets/js/modules/feather.js +8 -0
  192. customeranalytics/web/app/base/static/assets/js/modules/flatpickr.js +4 -0
  193. customeranalytics/web/app/base/static/assets/js/modules/moment.js +4 -0
  194. customeranalytics/web/app/base/static/assets/js/modules/sidebar.js +23 -0
  195. customeranalytics/web/app/base/static/assets/js/modules/theme.js +16 -0
  196. customeranalytics/web/app/base/templates/accounts/login.html +81 -0
  197. customeranalytics/web/app/base/templates/accounts/register.html +80 -0
  198. customeranalytics/web/app/base/templates/includes/footer.html +28 -0
  199. customeranalytics/web/app/base/templates/includes/navigation.html +51 -0
  200. customeranalytics/web/app/base/templates/includes/scripts.html +3 -0
  201. customeranalytics/web/app/base/templates/includes/sidebar.html +146 -0
  202. customeranalytics/web/app/base/templates/layouts/base-fullscreen.html +36 -0
  203. customeranalytics/web/app/base/templates/layouts/base.html +84 -0
  204. customeranalytics/web/app/base/util.py +30 -0
  205. customeranalytics/web/app/home/__init__.py +9 -0
  206. customeranalytics/web/app/home/forms.py +1039 -0
  207. customeranalytics/web/app/home/models.py +438 -0
  208. customeranalytics/web/app/home/profiles.py +310 -0
  209. customeranalytics/web/app/home/routes.py +386 -0
  210. customeranalytics/web/app/home/search.py +288 -0
  211. customeranalytics/web/app/home/static/assets/img/avatars/avatar-1.png +0 -0
  212. customeranalytics/web/app/home/static/assets/img/avatars/avatar-2.png +0 -0
  213. customeranalytics/web/app/home/static/assets/img/avatars/avatar-3.png +0 -0
  214. customeranalytics/web/app/home/static/assets/img/avatars/avatar-4.png +0 -0
  215. customeranalytics/web/app/home/static/assets/img/avatars/avatar-5.png +0 -0
  216. customeranalytics/web/app/home/static/assets/img/icons/customanality.png +0 -0
  217. customeranalytics/web/app/home/static/assets/img/icons/icon-48x48.png +0 -0
  218. customeranalytics/web/app/home/templates/abtest-product.html +280 -0
  219. customeranalytics/web/app/home/templates/abtest-promotion.html +362 -0
  220. customeranalytics/web/app/home/templates/abtest-segments.html +298 -0
  221. customeranalytics/web/app/home/templates/add-data-delivery.html +184 -0
  222. customeranalytics/web/app/home/templates/add-data-product.html +177 -0
  223. customeranalytics/web/app/home/templates/add-data-purchase.html +392 -0
  224. customeranalytics/web/app/home/templates/anomaly.html +261 -0
  225. customeranalytics/web/app/home/templates/clv.html +211 -0
  226. customeranalytics/web/app/home/templates/cohorts.html +308 -0
  227. customeranalytics/web/app/home/templates/customer-segmentation.html +308 -0
  228. customeranalytics/web/app/home/templates/data-es.html +152 -0
  229. customeranalytics/web/app/home/templates/data-execute.html +397 -0
  230. customeranalytics/web/app/home/templates/delivery.html +404 -0
  231. customeranalytics/web/app/home/templates/funnel-customer.html +240 -0
  232. customeranalytics/web/app/home/templates/funnel-session.html +236 -0
  233. customeranalytics/web/app/home/templates/index.html +524 -0
  234. customeranalytics/web/app/home/templates/index2.html +515 -0
  235. customeranalytics/web/app/home/templates/page-403.html +46 -0
  236. customeranalytics/web/app/home/templates/page-404.html +45 -0
  237. customeranalytics/web/app/home/templates/page-500.html +45 -0
  238. customeranalytics/web/app/home/templates/pages-blank.html +33 -0
  239. customeranalytics/web/app/home/templates/pages-sign-in.html +67 -0
  240. customeranalytics/web/app/home/templates/pages-sign-up.html +61 -0
  241. customeranalytics/web/app/home/templates/product.html +203 -0
  242. customeranalytics/web/app/home/templates/profile.html +1009 -0
  243. customeranalytics/web/app/home/templates/rfm.html +254 -0
  244. customeranalytics/web/app/home/templates/search.html +167 -0
  245. customeranalytics/web/app/home/templates/settings.html +205 -0
  246. customeranalytics/web/app/home/templates/stats-desc.html +230 -0
  247. customeranalytics/web/app/home/templates/stats-purchase.html +221 -0
  248. customeranalytics/web/config.py +30 -0
  249. customeranalytics/web/db.sqlite3 +0 -0
  250. customeranalytics/web/run.py +30 -0
  251. customeranalytics-0.1.dist-info/METADATA +1102 -0
  252. customeranalytics-0.1.dist-info/RECORD +254 -0
  253. customeranalytics-0.1.dist-info/WHEEL +4 -0
  254. customeranalytics-0.1.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,392 @@
1
+ {% extends "layouts/base.html" %}
2
+
3
+ {% block title %} sessions & customers data connection {% endblock %}
4
+
5
+ <!-- Specific Page CSS goes HERE -->
6
+ {% block stylesheets %}{% endblock stylesheets %}
7
+
8
+ {% block content %}
9
+
10
+ <main class="content">
11
+ <div class="container-fluid p-0">
12
+ <h5 class="h3 mb-3">Sessions & Customers Data Source</h5>
13
+ <div class="col-md-12">
14
+ <div class="card">
15
+ <div class="card-header">
16
+ <h5 class="card-title"><strong>Sessions Data Source</strong> </h5>
17
+ <div class="row">
18
+ <h6 class="card-subtitle text-muted mb-1">
19
+ <strong style="color:green;"> Sessions : </strong> This is a data source that includes All transactions
20
+ from the session start action to the last action that is purchased.</h6>
21
+ </div>
22
+ <div class="row">
23
+ <h6 class="card-subtitle text-muted mb-3">
24
+ <strong style="color:green;"> Customers : </strong>Unique customers with their unique actions such as download, signup, e.g</h6>
25
+ </div>
26
+ <div class="row ">
27
+ <h6 class="card-subtitle text-muted">
28
+
29
+ {% if values['data_source_con_check'] == 'Connected' %}
30
+ {% if values['s_c_p_connection_check']['sessions'] == 'False' and values['s_c_p_connection_check']['customers'] == 'False'%}
31
+ <strong style="color:green;">There isn`t any connection detected for Sessions and Customers.</strong>
32
+ {% endif %}
33
+ {% if values['s_c_p_connection_check']['sessions'] == 'True' and values['s_c_p_connection_check']['customers'] == 'True'%}
34
+ <strong style="color:green;">connected successfully!</strong>
35
+ {% endif %}
36
+ {% if values['s_c_p_connection_check']['sessions'] == 'True' and values['s_c_p_connection_check']['customers'] == 'False' %}
37
+ <strong style="color:green;">There is a connection detected for Sessions.</strong>
38
+ <strong style="color:red;">But There isn`t any connection detected for Customers. Don`t forget to add Customers connection.</strong>
39
+ {% endif %}
40
+ {% endif %}
41
+ {% if values['data_source_con_check'] != 'Connected' and values['data_source_con_check'] != '....' %}
42
+ <strong style="color:red;">Connection is failed! .</strong>
43
+ {% endif %}
44
+ {% if values['data_source_con_check'] == '....' %}
45
+ {% if values['s_c_p_connection_check']['sessions'] == 'True' and values['s_c_p_connection_check']['customers'] == 'False' %}
46
+ <strong style="color:green;">There is a connection detected for Sessions.</strong>
47
+ <strong style="color:red;">But There isn`t any connection detected for Customers. Don`t forget to add Customers connection.</strong>
48
+ {% endif %}
49
+ {% if values['s_c_p_connection_check']['sessions'] == 'False' and values['s_c_p_connection_check']['customers'] == 'True' %}
50
+ <strong style="color:green;">There is a connection detected for Customers.</strong>
51
+ <strong style="color:red;">But There isn`t any connection detected for Sessions. Don`t forget to add Session connection.</strong>
52
+ {% endif %}
53
+ {% if values['s_c_p_connection_check']['sessions'] == 'True' and values['s_c_p_connection_check']['customers'] == 'True' %}
54
+ <strong style="color:green;">Both Sessions and Customers data Sources are detected.</strong>
55
+ {% endif %}
56
+ {% endif %}
57
+ </h6>
58
+ </div>
59
+
60
+ </div>
61
+ <div class="card-body">
62
+ <div class="row">
63
+ <div class="col-md-6">
64
+ <div class="card">
65
+ <div class="card-header">
66
+ <h5 class="card-title"><strong style="color:green;">Sessions</strong></h5>
67
+ <h6 class="card-subtitle text-muted">
68
+ <div class="row">
69
+ - Each session ID must be unique. Sessions must cover both non-purchased and purchase transactions.
70
+ </div>
71
+ <div class="row">
72
+ - Session Start Date (Whatever you will give as a column) must be a convenient date format.
73
+ </div>
74
+ <div class="row">
75
+ - The payment Amount for each session transaction must be assigned as a Null value.
76
+ </div>
77
+ <div class="row">
78
+ - There must be a purchased (True/False) column which is required.
79
+ </div>
80
+ <div class="row">
81
+ - Discount Amount and session end date columns are optional.
82
+ </div>
83
+ <div class="row">
84
+ - Make sure client IDs are also in the data set for Customers Data Sources.
85
+ </div>
86
+ <div class="row">
87
+ - Actions are optional. But It is good to be added. Funnels, Anomaly is related to Action.
88
+ </div>
89
+ <div class="row">
90
+ - Each action name must be assigned. No need to add as an action for 'Has Session' and 'Has Purchase'.
91
+ </div>
92
+ <div class="row">
93
+ - Promotion Column is optional. But, It is good to be added. A/B test Promotions are related to Promotions.
94
+ </div>
95
+ <div class="row">
96
+ - It is possible to add dimensional columns. For instance, you would like to add 'location' as a column to the process and
97
+ calculate all charts, dashboards, ML and Analysis processes breakdown with 'location',
98
+ you are able to add to the Dimensional Column Name in Data Source.
99
+ </div>
100
+ </h6>
101
+ </div>
102
+ <div class="card-body">
103
+
104
+
105
+ {% if values['es_connection'] != '....' %}
106
+ <form method="POST">
107
+ <div class="mb-4 col-md-12">
108
+ {% if values['es_connection']['url'] == 'None' %}
109
+ <td> <a href="{{ 'http://'+ values['es_connection']['host'] + ':' +values['es_connection']['port'] }}" target="_blank">{{ 'http://'+ values['es_connection']['host'] + ':' +values['es_connection']['port'] }}</a></td>
110
+ {% endif %}
111
+ </div>
112
+
113
+ <div class="mb-4 col-md-12">
114
+ <label class="form-label mb-2" for="input_name">Session Connection Tag Name</label>
115
+ <input name="orders_data_source_tag" type="text" class="form-control mb-3" id="input_name" placeholder="main_session connection" required>
116
+ </div>
117
+
118
+ <table class="table table-striped">
119
+ <thead>
120
+ <tr>
121
+
122
+ <th style="width:16%;">
123
+ order ID
124
+ </th>
125
+ <th style="width:15%;">
126
+ client
127
+ </th>
128
+
129
+ <th style="width:15%;">
130
+ start date
131
+ </th>
132
+
133
+ <th style="width:15%;">
134
+ end date
135
+ </th>
136
+ <th style="width:15%;">
137
+ amount
138
+ </th>
139
+ <th style="width:15%;">
140
+ discount
141
+ </th>
142
+ <th style="width:15%;">
143
+ purchase
144
+ </th>
145
+ </tr>
146
+ </thead>
147
+ <tbody>
148
+ <tr>
149
+ <td> <input name="order_id" type="text" class="form-control mb-3" id="order_id" required> </td>
150
+ <td> <input name="client" type="text" class="form-control mb-3" id="client" required> </td>
151
+ <td> <input name="session_start_date" type="text" class="form-control mb-3" id="session_start_date" required> </td>
152
+ <td> <input name="date" type="text" class="form-control mb-3" id="end_date" required> </td>
153
+ <td> <input name="payment_amount" type="text" class="form-control mb-3" id="payment_amount" required> </td>
154
+ <td> <input name="discount_amount" type="text" class="form-control mb-3" id="discount_amount" required> </td>
155
+ <td> <input name="has_purchased" type="text" class="form-control mb-3" id="has_purchased" required> </td>
156
+ </tr>
157
+
158
+ </tbody>
159
+ </table>
160
+
161
+ <div class="row">
162
+ <div class="mb-4 col-md-6">
163
+ <label class="form-label mb-2" for="order_id_tag">Dimensional Column Name in Data Source</label>
164
+ <div class="mb-2">
165
+ <h10 class="text-muted">
166
+ Dimensional Column will be you grouping column in Exploratory Analysis, Machine Learning Processes, Dashboard, and Charts
167
+ This will also create a new ElasticSearch Index per unique Dimension on that column of values.
168
+ </h10>
169
+ </div>
170
+ <input name="dimension" type="text" class="form-control mb-3" id="actions" placeholder="location, region, order_type, order_category, e.g.">
171
+ </div>
172
+
173
+ <div class="mb-4 col-md-6">
174
+ <label class="form-label mb-2" for="order_id_tag">Promotion Column </label>
175
+ <div class="mb-2">
176
+ <h10 class="text-muted">
177
+ If Data Source has Promotion, please add as promotion IDs column.
178
+ </h10>
179
+ </div>
180
+ <input name="promotion_id" type="text" class="form-control mb-3" id="promotion_id" placeholder="">
181
+ </div>
182
+ </div>
183
+
184
+ <div class="row">
185
+ <div class="mb-4 col-md-12">
186
+ <label class="form-label mb-2" for="order_id_tag">Action Column Names in Data Source </label>
187
+ <div class="mb-2">
188
+ <h10 class="text-muted">
189
+ Action Columns are typed below with comma separated form. These action names must be the exact column name on the data set.
190
+ Each Action column must have values with True/False. More actions mean more understanding of Customers.
191
+ </h10>
192
+ </div>
193
+ <input name="actions" type="text" class="form-control mb-3" id="actions" placeholder="has_basket, has_order_screen, e.g.">
194
+ </div>
195
+ </div>
196
+
197
+ <div class="row">
198
+ <div class="col-md-6">
199
+ <label class="form-label" for="inputState">data source</label>
200
+ <select size="3" name="orders_data_source_type" id="inputState2" data-show-content="true" class="form-control mb-3" required>
201
+ <option>postgresql</option>
202
+ <option>google big query</option>
203
+ <option>aws redshift</option>
204
+ <option selected>csv</option>
205
+ <option>parquet</option>
206
+ <option>hdf5</option>
207
+ </select>
208
+ <label class="form-label">Data Query or Path</label>
209
+ <textarea name="orders_data_query_path" class="form-control mb-3" placeholder="SELECT * FROM table .... / raw_data.csv" rows="10"></textarea>
210
+ </div>
211
+ <div class="col-md-6">
212
+ <label class="form-label" for="inputPasswordNew2">user</label>
213
+ <input name="orders_user" type="text" class="form-control mb-3" id="inputPasswordNew2">
214
+ <label class="form-label" for="inputPasswordNew">password</label>
215
+ <input name="orders_password" type="password" class="form-control mb-3" id="inputPasswordNew">
216
+ <label class="form-label" for="inputPasswordNew2">port</label>
217
+ <input name="orders_port" type="text" class="form-control mb-3" id="inputPasswordNew2">
218
+ <label class="form-label" for="inputPasswordNew2">host</label>
219
+ <input name="orders_host" type="text" class="form-control mb-3" id="inputPasswordNew2">
220
+ <label class="form-label" for="inputPasswordNew2">database</label>
221
+ <input name="orders_db" type="text" class="form-control" id="inputPasswordNew2">
222
+ </div>
223
+ </div>
224
+ <button name="connect" value="orders" type="submit" class="btn btn-primary" >Connect</button>
225
+ </form>
226
+ {% endif %}
227
+
228
+ {% if values['es_connection'] == '....' %}
229
+ <strong style="color:red;">Please add ElasticSearch Connection</strong>
230
+ {% endif %}
231
+ </div>
232
+ </div>
233
+ </div>
234
+ <div class="col-md-6">
235
+ <div class="card-mb-6">
236
+ <div class="card-header">
237
+ <h5 class="card-title"><strong style="color:green;">Customers</strong></h5>
238
+ <h6 class="card-subtitle text-muted mb-7">
239
+ <div class="row">
240
+ - Each customer ID must be unique. Customer IDs are eligible to join with the Session of client IDs.
241
+ </div>
242
+ <div class="row">
243
+ - Download Date is required.
244
+ </div>
245
+ <div class="row">
246
+ - Signup Date is optional.
247
+ </div>
248
+ <div class="row">
249
+ - Even there is no download date is available please make sure to assign any date valuable for the business.
250
+ </div>
251
+ <div class="row">
252
+ - Actions must be date rather than True/False columns just like Sessions Data Source of Actions.
253
+ </div>
254
+ <div class="row">
255
+ - Actions are optional. But It is good to be added. Funnels, Anomaly is related to Actions.
256
+ </div>
257
+ <div class="row">
258
+ - If there is an assigned dimensional column on Session Data Source,
259
+ make sure customers Data Source includes the clients for all dimension.
260
+ </div>
261
+ </h6>
262
+
263
+ </div>
264
+
265
+ <div class="mb-4 col-md-12">
266
+ {% if values['es_connection'] != '....' %}
267
+ <form method="POST">
268
+ <div class="mb-4 col-md-12">
269
+ {% if values['es_connection']['url'] == 'None' %}
270
+ <td> <a href="{{ 'http://'+ values['es_connection']['host'] + ':' +values['es_connection']['port'] }}" target="_blank">{{ 'http://'+ values['es_connection']['host'] + ':' +values['es_connection']['port'] }}</a></td>
271
+ {% endif %}
272
+ </div>
273
+
274
+ <div class="mb-4 col-md-12">
275
+ <label class="form-label mb-2" for="input_name">Customers Connection Tag Name</label>
276
+ <input name="downloads_data_source_tag" type="text" class="form-control mb-3" id="input_name" placeholder="main_customer connection" required>
277
+ </div>
278
+
279
+ <table class="table table-striped">
280
+ <thead>
281
+ <tr>
282
+ <th style="width:33%;">
283
+ Client ID
284
+ </th>
285
+
286
+ <th style="width:33%;">
287
+ Download Date
288
+ </th>
289
+
290
+ <th style="width:33%;">
291
+ Signup Date
292
+ </th>
293
+ </tr>
294
+ </thead>
295
+ <tbody>
296
+ <tr>
297
+ <td> <input name="client_2" type="text" class="form-control mb-3" id="client_2" required> </td>
298
+ <td> <input name="download_date" type="text" class="form-control mb-3" id="download_date" required> </td>
299
+ <td> <input name="signup_date" type="text" class="form-control mb-3" id="signup_date"> </td>
300
+ </tr>
301
+
302
+ </tbody>
303
+ </table>
304
+ <div class="row">
305
+
306
+ <div class="mb-7 col-md-12">
307
+ </div>
308
+ <div class="mb-7 col-md-12">
309
+ </div>
310
+
311
+ </div>
312
+
313
+ <div class="row">
314
+
315
+ <div class="mb-3 col-md-12">
316
+ <label class="form-label mb-2" for="order_id_tag">Action Column Names in Data Source </label>
317
+ <div class="mb-3">
318
+ <h10 class="text-muted">
319
+ Action Columns are typed below with comma separated form. These action names must be the exact column name on the data set.
320
+ Each Action column must have values with True/False. More actions mean more understanding of Customers.
321
+ </h10>
322
+ </div>
323
+
324
+ <textarea name="actions" class="form-control mb-3" placeholder="first_session_start_date, first_order_date, e.g." rows="1"></textarea>
325
+ </div>
326
+ </div>
327
+
328
+ <div class="card-body">
329
+ <div class="row">
330
+ <div class="col-md-6">
331
+ <label class="form-label" for="inputState">data source</label>
332
+ <select size="3" name="downloads_data_source_type" id="inputState2" data-show-content="true" class="form-control mb-3" required>
333
+ <option>postgresql</option>
334
+ <option>google big query</option>
335
+ <option>aws redshift</option>
336
+ <option selected>csv</option>
337
+ <option>parquet</option>
338
+ <option>hdf5</option>
339
+ </select>
340
+ <label class="form-label">Data Query or Path</label>
341
+ <textarea name="downloads_data_query_path" class="form-control mb-3" placeholder="SELECT * FROM table .... / raw_data.csv" rows="10"></textarea>
342
+ </div>
343
+ <div class="col-md-6">
344
+ <label class="form-label" for="inputPasswordNew2">user</label>
345
+ <input name="downloads_user" type="text" class="form-control mb-3" id="inputPasswordNew2">
346
+ <label class="form-label" for="inputPasswordNew">password</label>
347
+ <input name="downloads_password" type="password" class="form-control mb-3" id="inputPasswordNew">
348
+ <label class="form-label" for="inputPasswordNew2">port</label>
349
+ <input name="downloads_port" type="text" class="form-control mb-3" id="inputPasswordNew2">
350
+ <label class="form-label" for="inputPasswordNew2">host</label>
351
+ <input name="downloads_host" type="text" class="form-control mb-3" id="inputPasswordNew2">
352
+ <label class="form-label" for="inputPasswordNew2">database</label>
353
+ <input name="downloads_db" type="text" class="form-control" id="inputPasswordNew2">
354
+ </div>
355
+ </div>
356
+ <button name="connect" value="downloads" type="submit" class="btn btn-primary" >Connect</button>
357
+ </div>
358
+ </form>
359
+ {% endif %}
360
+ {% if values['es_connection'] == '....' %}
361
+ <strong style="color:red;">Please add ElasticSearch Connection</strong>
362
+ {% endif %}
363
+ </div>
364
+ </div>
365
+ </div>
366
+ </div>
367
+ </div>
368
+ </div>
369
+
370
+
371
+ </div>
372
+ </div>
373
+ </main>
374
+
375
+ {% endblock content %}
376
+
377
+ <script>
378
+ function myFunction() {
379
+ // Get the checkbox
380
+ var checkBox = document.getElementById("myCheck");
381
+ // Get the output text
382
+ var text = document.getElementById("text");
383
+
384
+ // If the checkbox is checked, display the output text
385
+ if (checkBox.checked == true){
386
+ text.style.display = "block";
387
+ } else {
388
+ text.style.display = "none";
389
+ }
390
+ }
391
+ </script>
392
+ {% block javascripts %}{% endblock javascripts %}
@@ -0,0 +1,261 @@
1
+ {% extends "layouts/base.html" %}
2
+
3
+ {% block title %} Anomaly Detection {% endblock %}
4
+
5
+ <!-- Specific Page CSS goes HERE -->
6
+ {% block stylesheets %}{% endblock stylesheets %}
7
+
8
+ {% block content %}
9
+
10
+ <main class="content">
11
+ <div class="container-fluid p-0">
12
+ <h5 class="h3 mb-3">Anomaly Detection</h5>
13
+ <div class="col-md-12">
14
+ <div class="card">
15
+ <div class="card-body">
16
+ <div class="row">
17
+ <div class="accordion" id="accordionExample">
18
+ <div class="card">
19
+ <div class="card-header" id="headingOne">
20
+ <h5 class="card-title my-1">
21
+ <a href="#" data-toggle="collapse" data-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne" style="color:green;font-size:12px">
22
+ Filters
23
+ </a>
24
+ </h5>
25
+ </div>
26
+ <div id="collapseOne" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
27
+ <form method="POST">
28
+ <div class="row">
29
+ <div class="col-md-6">
30
+ <div class="card">
31
+ <div class="card-body">
32
+ <div class="card">
33
+ <div class="card-header">
34
+ <h5 class="card-title mb-0">Dimension selection</h5>
35
+ </div>
36
+ <div class="card-body">
37
+ <select name="index" id="index" class="form-control">
38
+ {% for d in filters['dimensions'] %}
39
+ {% if d == 'There is no available report. Please execute Schedule Data Process' %}
40
+ <option value= "main">{{ d }}</option>
41
+ {% endif %}
42
+ {% if d != 'There is no available report. Please execute Schedule Data Process' %}
43
+ <option value="{{ d }}">{{ d }}</option>
44
+ {% endif %}
45
+ {% endfor %}
46
+ </select>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </div>
52
+
53
+ <div class="col-md-6">
54
+ <div class="card flex-fil">
55
+ <div class="card-body col-12">
56
+ <div class="col-12 ">
57
+ <div class="align-self-center w-100">
58
+ <div class="chart">
59
+ <input name="date" id="datetimepicker-dashboard" hidden>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+
67
+ <div class="card-header">
68
+ <button type="submit" class="btn btn-pill btn-primary">Apply</button>
69
+ </div>
70
+ </div>
71
+ </form>
72
+ </div>
73
+ </div>
74
+
75
+ <div class="card">
76
+ <div class="card-header" id="headingTwo">
77
+ <h5 class="card-title my-1">
78
+ <a href="#" data-toggle="collapse" data-target="#collapseTwo" aria-expanded="true" aria-controls="collapseOne" style="color:green;font-size:12px">
79
+ Infos
80
+ </a>
81
+ </h5>
82
+ </div>
83
+ <div id="collapseTwo" class="collapse show" aria-labelledby="headingTwo" data-parent="#accordionExample">
84
+ <div class="card-body">
85
+ <ul>
86
+ <li>
87
+ <strong style="color:green;">Anomaly Detection </strong>
88
+ In order to catch the significant increase/decrease,
89
+ even we think that the business doing ok/not well,
90
+ the anomaly detection allow us the the alarming days or weeks or time periods.
91
+ This process also allows us to see where the business did well and where can be improved.
92
+ </li>
93
+ <li>
94
+ <div class="card-header">
95
+ <h5 class="card-title" style="color:green;">How does Anomaly Detection work?</h5>
96
+ Anomaly Detection mainly concerns with the significant increase/decrease of a data point in the given metric.
97
+ These metrics are
98
+ Daily Funnel, Daily Cohort Anomaly, Daily Orders Anomaly, CLV Prediction of RFM Vs Current RFM Anomaly.
99
+ Each metric of values of abnormal measurements is detected by AutoEncoder.
100
+ AutoEncoder generates scores for each metric of the data point.
101
+ Residuals (the difference between the actual value and predicted value) are calculated.
102
+ The outliers of the residuals are the Abnormal values.
103
+ </div>
104
+ </li>
105
+ <li>
106
+ <div class="card-header">
107
+ <h5 class="card-title" style="color:green;">Daily Funnel Anomaly</h5>
108
+ Daily Funnel is the actions of totals per day.
109
+ With the combination of all actions (from session count to purchase count per day)
110
+ it is possible to detect abnormal days by using ML techniques.
111
+ </div>
112
+ </li>
113
+ <li>
114
+ <div class="card-header">
115
+ <h5 class="card-title" style="color:green;">
116
+ Daily Cohort Anomaly & Daily Cohort Anomaly With Scores (Download to First Order)</h5>
117
+ Date columns represents downloaded day and
118
+ each purchase count column represents the day that the customers had the first order after they have download.
119
+ If there is a abnormal date which have significant low/high first purchase count related to downloaded date,
120
+ this chart allow us the see the exact downloaded date as abnormal date.
121
+ </div>
122
+ </li>
123
+ <li>
124
+ <div class="card-header">
125
+ <h5 class="card-title" style="color:green;">
126
+ Daily Orders Anomaly</h5>
127
+ This chart allows us to see the % of increase/decrease compared with previous days of purchase counts.
128
+ </div>
129
+ </li>
130
+ <li>
131
+ <div class="card-header">
132
+ <h5 class="card-title" style="color:green;">CLV RFM Vs Current RFM Anomaly</h5>
133
+ There are engaged customers whose purchases are predicted with CLV Prediction.
134
+ We also know their Recency - Monetary - Frequency values ​​that are calculated with their historic purchases.
135
+ If we calculate their future RFM values ​​via the CLV prediction and
136
+ subtract them in order to detect a significant increase/decrease for each metric,
137
+ we might clearly see how our customers of behaviors might change in the future.
138
+ </div>
139
+ </li>
140
+
141
+ </ul>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+
147
+ <div class="col-md-6">
148
+ <div class="card">
149
+ <div class="card-header">
150
+ <h5 class="card-title">Daily Funnel Anomaly {% if data_type['dfunnel_anomaly'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
151
+ </div>
152
+ <div id="df_anomaly_id" class="plotly-gra ph-div" style="height:400px;"></div>
153
+ </div>
154
+ </div>
155
+ <div class="col-md-6">
156
+ <div class="card">
157
+ <div class="card-header">
158
+ <h5 class="card-title">Daily Cohort Anomaly (Download to First Order) {% if data_type['dcohort_anomaly'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
159
+ </div>
160
+ <div class="card-body">
161
+ <div id="dc_anomaly_id" class="plotly-gra ph-div" style="height:400px;"></div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ <div class="col-md-12">
166
+ <div class="card">
167
+ <div class="card-header">
168
+ <h5 class="card-title">Daily Cohort Anomaly With Scores (Download to First Order) {% if data_type['dcohort_anomaly_2'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
169
+ </div>
170
+ <div class="card-body">
171
+ <div id="dc_anomaly_2_id" class="plotly-gra ph-div" style="height:400px;"></div>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ <div class="col-md-12">
176
+ <div class="card">
177
+ <div class="card-header">
178
+ <h5 class="card-title">Daily Orders Anomaly {% if data_type['dorders_anomaly'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
179
+ </div>
180
+ <div class="card-body">
181
+ <div id="do_anomaly_id" class="plotly-gra ph-div" style="height:400px;"></div>
182
+ </div>
183
+ </div>
184
+ </div>
185
+ <div class="col-md-12">
186
+ <div class="card">
187
+ <div class="card-header">
188
+ <h5 class="card-title">CLV RFM Vs Current RFM {% if data_type['clvrfm_anomaly'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
189
+ </div>
190
+ <div class="card-body">
191
+ <div id="clvrfm_id" class="plotly-gra ph-div" style="height:400px;"></div>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ </div>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ </main>
201
+
202
+ {% endblock content %}
203
+
204
+ <!-- Specific Page JS goes HERE -->
205
+ {% block javascripts %}
206
+ <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
207
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
208
+ <script>
209
+
210
+ var df_anomaly = {{dfunnel_anomaly | safe}};
211
+
212
+ Plotly.plot('df_anomaly_id', // the ID of the div, created above
213
+ df_anomaly.trace, df_anomaly.layout, {});
214
+
215
+ var dc_anomaly = {{dcohort_anomaly | safe}};
216
+
217
+ Plotly.plot('dc_anomaly_id', // the ID of the div, created above
218
+ dc_anomaly.trace, dc_anomaly.layout, {});
219
+
220
+ var dc_anomaly_2 = {{dcohort_anomaly_2 | safe}};
221
+
222
+ Plotly.plot('dc_anomaly_2_id', // the ID of the div, created above
223
+ dc_anomaly_2.trace, dc_anomaly_2.layout, {});
224
+
225
+ var do_anomaly = {{dorders_anomaly | safe}};
226
+
227
+ Plotly.plot('do_anomaly_id', // the ID of the div, created above
228
+ do_anomaly.trace, do_anomaly.layout, {});
229
+
230
+ var clvrfm = {{clvrfm_anomaly | safe}};
231
+
232
+ Plotly.plot('clvrfm_id', // the ID of the div, created above
233
+ clvrfm.trace, do_anomaly.layout, {});
234
+
235
+
236
+ function myFunction() {
237
+ // Get the checkbox
238
+ var checkBox = document.getElementById("myCheck");
239
+ // Get the output text
240
+ var text = document.getElementById("text");
241
+
242
+ // If the checkbox is checked, display the output text
243
+ if (checkBox.checked == true){
244
+ text.style.display = "block";
245
+ } else {
246
+ text.style.display = "none";
247
+ }
248
+ }
249
+ </script>
250
+
251
+ <script>
252
+ document.addEventListener("DOMContentLoaded", function() {
253
+ document.getElementById("datetimepicker-dashboard").flatpickr({
254
+ inline: true,
255
+
256
+ prevArrow: "<span class=\"fas fa-chevron-left\" title=\"Previous month\"></span>",
257
+ nextArrow: "<span class=\"fas fa-chevron-right\" title=\"Next month\"></span>",
258
+ });
259
+ });
260
+ </script>
261
+ {% endblock javascripts %}