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,298 @@
1
+ {% extends "layouts/base.html" %}
2
+
3
+ {% block title %} A/B Test Customer Segments {% 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">A/B Test Customer Segment Change</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;">A/B Test Customer Segment Change </strong> are bunch of tests
88
+ which compares the effect of Customers Segments of Change within Time Periods to the business.
89
+
90
+ Before and After time periods are constants time periods which are day, week and month.
91
+ Each segment of current day, current week and current month are compared
92
+ with the last 4 weeks of same weekday of current weekday,
93
+ last 4 weeks and last 4 months.
94
+ There are two metrics which help us to measure comparison values.
95
+ These are number of orders counts per segment and Average purchase amount per segment.
96
+ Difference of Segments between before and after time periods related to these metrics are tested
97
+ with Before - After Analysis.
98
+ in order to the answer the question that is "Is there any significant increase/decrease
99
+ on Order Count / Average Payment Amount per Customer Segment"
100
+ While we need to see to Segment which increases/decreases the number of orders and the average purchase amount,
101
+ This Section can help us to find the right Segment of Improvements.
102
+ </li>
103
+ <li>
104
+ <div class="card-header">
105
+ <h5 class="card-title" style="color:green;">Hypothesis are;</h5>
106
+ <div class="card-header">
107
+ <div class="row">H0 : These is no significant Difference with A - B of order count / purchase amount.</div>
108
+ <div class="row">H1 : These is significant Difference with A - B of order count / purchase amount.</div>
109
+ </div>
110
+ </div>
111
+ </li>
112
+ <li>
113
+ <div class="card-header">
114
+ <h5 class="card-title" style="color:green;">Bootstrapping Method;</h5>
115
+ <div class="card-header">
116
+ <div class="row">
117
+ Each test process are applied with Boostraping Method.
118
+ So, Iteratively randomly selected A and B sample customers of order count / average purchase amount will be tested acceptable enough time.
119
+ Each iteration A - B samples are randomly selected.
120
+ Accepted ratio will show us the confidence of our test results. For instance, There are 100 tests and 75 of them are ended with H0 Accepted.
121
+ So, test are % 75 our test are H0 Accepted.
122
+ </div>
123
+ </div>
124
+ </div>
125
+ </li>
126
+ </ul>
127
+ </div>
128
+ </div>
129
+ </div>
130
+ </div>
131
+
132
+ <div class="col-md-4">
133
+ <div class="card">
134
+ <div class="card-header">
135
+ <h5 class="card-title" style="font-size:10px;"><strong> Daily </strong> Customers' <strong> Total Order Count </strong> per Customer Segment {% if data_type['segments_change_daily_before_after_orders'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
136
+ <div class="row">
137
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> After :</strong> Each bar represents Average of total order count per customers per segment for <strong style="color:green;"> current week day (Ex: Monday)</strong>.</h6>
138
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> Before :</strong> Each bar represents Average of total order count per customers per segment for <strong style="color:green;"> last 4 weeks of current week day (Ex : last 4 Mondays)</strong>.</h6>
139
+ </div>
140
+ </div>
141
+ <div class="card-body">
142
+ <div id="sc_daily_ba_o_id" class="plotly-gra ph-div" style="height:400px;"></div>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ <div class="col-md-4">
147
+ <div class="card">
148
+ <div class="card-header">
149
+ <h5 class="card-title" style="font-size:10px;"><strong> Weekly </strong> Customers' <strong> Total Order Count </strong> per Customer Segment {% if data_type['segments_change_weekly_before_after_orders'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
150
+ <div class="row">
151
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> After :</strong> Each bar represents Average of total order count per customers per segment for <strong style="color:green;"> current week</strong>.</h6>
152
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> Before :</strong> Each bar represents Average of total order count per customers per segment for <strong style="color:green;"> last 4 weeks </strong>.</h6>
153
+ </div>
154
+ </div>
155
+ <div class="card-body">
156
+ <div id="sc_weekly_ba_o_id" class="plotly-gra ph-div" style="height:400px;"></div>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ <div class="col-md-4">
161
+ <div class="card">
162
+ <div class="card-header">
163
+ <h5 class="card-title" style="font-size:10px;"><strong> Monthly </strong> Customers' <strong> Total Order Count </strong> per Customer Segment {% if data_type['segments_change_monthly_before_after_orders'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
164
+ <div class="row">
165
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> After :</strong> Each bar represents average of total order count per customer per segment for <strong style="color:green;"> current month</strong>.</h6>
166
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> Before :</strong> Each bar represents average of total order count per customer per segment for <strong style="color:green;"> last 4 months </strong>.</h6>
167
+ </div>
168
+ </div>
169
+ <div class="card-body">
170
+ <div id="sc_monthly_ba_o_id" class="plotly-gra ph-div" style="height:400px;wight"></div>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ </div>
175
+
176
+
177
+ <div class="row">
178
+ <div class="col-md-4">
179
+ <div class="card">
180
+ <div class="card-header">
181
+ <h5 class="card-title" style="font-size:10px;"><strong> Daily </strong> Customers' Average Purchase <strong> Payment Amount</strong> per Customer Segment {% if data_type['segments_change_daily_before_after_amount'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
182
+ <div class="row">
183
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> After :</strong> Each bar represents average payment amount per customer per segment for <strong style="color:green;"> current week day (Ex: Monday)</strong>.</h6>
184
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> Before :</strong> Each bar represents average payment amount per customer per segment for <strong style="color:green;"> last 4 weeks of current week day (Ex : last 4 Mondays)</strong>.</h6>
185
+ </div>
186
+ </div>
187
+ <div class="card-body">
188
+ <div id="sc_weekly_ba_a_id" class="plotly-gra ph-div" style="height:400px;"></div>
189
+ </div>
190
+ </div>
191
+ </div>
192
+ <div class="col-md-4">
193
+ <div class="card">
194
+ <div class="card-header">
195
+ <h5 class="card-title" style="font-size:10px;"><strong> Weekly </strong> Customers' Average Purchase <strong> Payment Amount</strong> per Customer Segment {% if data_type['segments_change_weekly_before_after_amount'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
196
+ <div class="row">
197
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> After :</strong> Each bar represents average payment amount per customer per segment for <strong style="color:green;"> current week</strong>.</h6>
198
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> Before :</strong> Each bar represents average payment amount per customer per segment for <strong style="color:green;"> last 4 weeks </strong>.</h6>
199
+ </div>
200
+ </div>
201
+ <div class="card-body">
202
+ <div id="sc_daily_ba_a_id" class="plotly-gra ph-div" style="height:400px;"></div>
203
+ </div>
204
+ </div>
205
+ </div>
206
+ <div class="col-md-4">
207
+ <div class="card">
208
+ <div class="card-header">
209
+ <h5 class="card-title" style="font-size:10px;"><strong> Monthly </strong> Customers' Average Purchase <strong> Payment Amount</strong> per Customer Segment {% if data_type['segments_change_monthly_before_after_amount'] == False %} <strong style="color:red;"> sample data </strong> {% endif %}</h5>
210
+ <div class="row">
211
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> After :</strong> Each bar represents average payment amount per customer per segment for <strong style="color:green;"> current month</strong>.</h6>
212
+ <h6 class="card-subtitle text-muted mb-1" style="font-size:10px;">- <strong style="color:green;"> Before :</strong> Each bar represents average payment amount per customer per segment for <strong style="color:green;"> last 4 months </strong>.</h6>
213
+ </div>
214
+ </div>
215
+ <div class="card-body">
216
+ <div id="sc_monthly_ba_a_id" class="plotly-gra ph-div" style="height:400px;wight"></div>
217
+ </div>
218
+ </div>
219
+ </div>
220
+ </div>
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+ </main>
226
+
227
+ {% endblock content %}
228
+
229
+ <!-- Specific Page JS goes HERE -->
230
+ {% block javascripts %}
231
+ <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
232
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
233
+ <script>
234
+
235
+ var sc_weekly_ba_o = {{sc_weekly_ba_orders | safe}};
236
+
237
+ Plotly.plot('sc_weekly_ba_o_id', // the ID of the div, created above
238
+ sc_weekly_ba_o.trace, sc_weekly_ba_o.layout, {});
239
+
240
+ var sc_daily_ba_o = {{sc_daily_ba_orders | safe}};
241
+
242
+ Plotly.plot('sc_daily_ba_o_id', // the ID of the div, created above
243
+ sc_daily_ba_o.trace, sc_daily_ba_o.layout, {});
244
+
245
+ var sc_monthly_ba_o = {{sc_monthly_ba_orders | safe}};
246
+
247
+ Plotly.plot('sc_monthly_ba_o_id', // the ID of the div, created above
248
+ sc_monthly_ba_o.trace, sc_monthly_ba_o.layout, {});
249
+
250
+
251
+ var sc_weekly_ba_a = {{sc_weekly_ba_amount | safe}};
252
+
253
+ Plotly.plot('sc_weekly_ba_a_id', // the ID of the div, created above
254
+ sc_weekly_ba_a.trace, sc_weekly_ba_a.layout, {});
255
+
256
+
257
+ var sc_daily_ba_a = {{sc_daily_ba_amount | safe}};
258
+
259
+ Plotly.plot('sc_daily_ba_a_id', // the ID of the div, created above
260
+ sc_daily_ba_a.trace, sc_daily_ba_a.layout, {});
261
+
262
+ var sc_monthly_ba_a = {{sc_monthly_ba_amount | safe}};
263
+
264
+ Plotly.plot('sc_monthly_ba_a_id', // the ID of the div, created above
265
+ sc_monthly_ba_a.trace, sc_monthly_ba_a.layout, {});
266
+
267
+
268
+
269
+
270
+
271
+
272
+
273
+ function myFunction() {
274
+ // Get the checkbox
275
+ var checkBox = document.getElementById("myCheck");
276
+ // Get the output text
277
+ var text = document.getElementById("text");
278
+
279
+ // If the checkbox is checked, display the output text
280
+ if (checkBox.checked == true){
281
+ text.style.display = "block";
282
+ } else {
283
+ text.style.display = "none";
284
+ }
285
+ }
286
+ </script>
287
+
288
+ <script>
289
+ document.addEventListener("DOMContentLoaded", function() {
290
+ document.getElementById("datetimepicker-dashboard").flatpickr({
291
+ inline: true,
292
+
293
+ prevArrow: "<span class=\"fas fa-chevron-left\" title=\"Previous month\"></span>",
294
+ nextArrow: "<span class=\"fas fa-chevron-right\" title=\"Next month\"></span>",
295
+ });
296
+ });
297
+ </script>
298
+ {% endblock javascripts %}
@@ -0,0 +1,184 @@
1
+ {% extends "layouts/base.html" %}
2
+
3
+ {% block title %} delivery 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">Deliveries</h5>
13
+ <div class="col-md-12">
14
+ <form method="POST">
15
+ <div class="card">
16
+ <div class="card-header">
17
+ <h5 class="card-title"><strong>Sessions of Delivery Data Source</strong> </h5>
18
+ <div class="row">
19
+ <h6 class="card-subtitle text-muted mb-3">
20
+ <strong style="color:green;"> Delivery : </strong> The delivery data source is the sub-data source for the sessions.
21
+ This data source is merging with Sessions data source and storing into the ElasticSearch.
22
+ If any session has a deliver process, the Order ID of the session of delivery information must be included at delivery data source
23
+ and purchase value must be True.
24
+ Delivery Data Source is optional.
25
+ </h6>
26
+ </div>
27
+
28
+ <div class="row ">
29
+ <h6 class="card-subtitle text-muted">
30
+ {% if values['data_source_con_check'] == 'Connected' %}
31
+ {% if values['s_c_p_connection_check']['deliveries'] == 'False' %}
32
+ <strong style="color:green;">There isn`t any connection detected for Deliveries.</strong>
33
+ {% endif %}
34
+ {% if values['s_c_p_connection_check']['deliveries'] == 'True' %}
35
+ <strong style="color:green;">Deliveries Data Source is successfully created.</strong>
36
+ {% endif %}
37
+ {% endif %}
38
+ {% if values['data_source_con_check'] != 'Connected' and values['data_source_con_check'] != '....' %}
39
+ <strong style="color:red;">Connection is failed! .</strong>
40
+ {% endif %}
41
+ {% if values['data_source_con_check'] == '....' %}
42
+ {% if values['s_c_p_connection_check']['deliveries'] == 'True' %}
43
+ <strong style="color:green;">Deliveries Data Source is detected</strong>
44
+ {% endif %}
45
+ {% endif %}
46
+ </h6>
47
+ </div>
48
+ </div>
49
+ <div class="card-body">
50
+ <div class="row">
51
+ <div class="col-md-12">
52
+ <div class="card">
53
+ <div class="card-header">
54
+ <h5 class="card-title"><strong style="color:green;">Delivery Data Source</strong></h5>
55
+ <h6 class="card-subtitle text-muted">
56
+ <div class="row">
57
+ - Each session ID (Order ID) must be unique. Sessions must cover only purchase transactions.
58
+ </div>
59
+ <div class="row">
60
+ - session IDs must be matched with Session IDs on Sessions Data Source.
61
+ </div>
62
+ <div class="row">
63
+ - Delivery Date and Session ID columns are required but prepare date, return date latitude longitude are optional.
64
+ </div>
65
+ <div class="row">
66
+ - Latitude and Longitude are the customer of the location coordinates and they are optional.
67
+ </div>
68
+ </h6>
69
+ </div>
70
+ <div class="card-body">
71
+ {% if values['es_connection'] != '....' %}
72
+ <div class="mb-4 col-md-12">
73
+ {% if values['es_connection']['url'] == 'None' %}
74
+ <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>
75
+ {% endif %}
76
+ </div>
77
+
78
+ <div class="mb-4 col-md-12">
79
+ <label class="form-label mb-2" for="input_name">Delivery Connection Tag Name</label>
80
+ <input name="deliveries_data_source_tag" type="text" class="form-control mb-3" id="input_name" placeholder="delivery connection" required>
81
+ </div>
82
+ <table class="table table-striped">
83
+ <thead>
84
+ <tr>
85
+ <th style="width:16%;">
86
+ order ID
87
+ </th>
88
+ <th style="width:15%;">
89
+ delivery date
90
+ </th>
91
+
92
+ <th style="width:15%;">
93
+ prepare date
94
+ </th>
95
+
96
+ <th style="width:15%;">
97
+ return date
98
+ </th>
99
+
100
+ <th style="width:15%;">
101
+ latitude
102
+ </th>
103
+ <th style="width:15%;">
104
+ longitude
105
+ </th>
106
+ </tr>
107
+ </thead>
108
+ <tbody>
109
+ <tr>
110
+ <td> <input name="order_id_2" type="text" class="form-control mb-3" id="order_id_2" required> </td>
111
+ <td> <input name="delivery_date" type="text" class="form-control mb-3" id="delivery_date" required> </td>
112
+ <td> <input name="prepare_date" type="text" class="form-control mb-3" id="prepare_date"> </td>
113
+ <td> <input name="return_date" type="text" class="form-control mb-3" id="return_date"> </td>
114
+ <td> <input name="latitude" type="text" class="form-control mb-3" id="latitude"> </td>
115
+ <td> <input name="longitude" type="text" class="form-control mb-3" id="longitude"> </td>
116
+ </tr>
117
+
118
+ </tbody>
119
+ </table>
120
+
121
+
122
+ <div class="row">
123
+ <div class="col-md-6">
124
+ <label class="form-label" for="inputState">data source</label>
125
+ <select size="3" name="deliveries_data_source_type" id="products_data_source_type" data-show-content="true" class="form-control mb-3" required>
126
+ <option>postgresql</option>
127
+ <option>google big query</option>
128
+ <option>aws redshift</option>
129
+ <option selected>csv</option>
130
+ <option>parquet</option>
131
+ <option>hdf5</option>
132
+ </select>
133
+ <label class="form-label">Data Query or Path</label>
134
+ <textarea name="deliveries_data_query_path" class="form-control mb-3" placeholder="SELECT * FROM table .... / raw_data.csv" rows="10"></textarea>
135
+ </div>
136
+ <div class="col-md-6">
137
+ <label class="form-label" for="inputPasswordNew2">user</label>
138
+ <input name="deliveries_user" type="text" class="form-control mb-3" id="products_user">
139
+ <label class="form-label" for="inputPasswordNew">password</label>
140
+ <input name="deliveries_password" type="password" class="form-control mb-3" id="inputPasswordNew">
141
+ <label class="form-label" for="inputPasswordNew2">port</label>
142
+ <input name="deliveries_port" type="text" class="form-control mb-3" id="deliveries_port">
143
+ <label class="form-label" for="inputPasswordNew2">host</label>
144
+ <input name="deliveries_host" type="text" class="form-control mb-3" id="deliveries_host">
145
+ <label class="form-label" for="inputPasswordNew2">database</label>
146
+ <input name="deliveries_db" type="text" class="form-control" id="deliveries_db">
147
+ </div>
148
+ </div>
149
+ <button name="connect" value="deliveries" type="submit" class="btn btn-primary" >Connect</button>
150
+ {% endif %}
151
+
152
+ {% if values['es_connection'] == '....' %}
153
+ <strong style="color:red;">Please add ElasticSearch Connection</strong>
154
+ {% endif %}
155
+ </div>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ </div>
161
+ </form>
162
+
163
+ </div>
164
+ </div>
165
+ </main>
166
+
167
+ {% endblock content %}
168
+
169
+ <script>
170
+ function myFunction() {
171
+ // Get the checkbox
172
+ var checkBox = document.getElementById("myCheck");
173
+ // Get the output text
174
+ var text = document.getElementById("text");
175
+
176
+ // If the checkbox is checked, display the output text
177
+ if (checkBox.checked == true){
178
+ text.style.display = "block";
179
+ } else {
180
+ text.style.display = "none";
181
+ }
182
+ }
183
+ </script>
184
+ {% block javascripts %}{% endblock javascripts %}
@@ -0,0 +1,177 @@
1
+ {% extends "layouts/base.html" %}
2
+
3
+ {% block title %} basket 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">Baskets</h5>
13
+ <div class="col-md-12">
14
+ <form method="POST">
15
+ <div class="card">
16
+ <div class="card-header">
17
+ <h5 class="card-title"><strong>Sessions of Baskets Data Source</strong> </h5>
18
+ <div class="row">
19
+ <h6 class="card-subtitle text-muted mb-3">
20
+ <strong style="color:green;"> Baskets : </strong> The basket data source is the sub-data source for the sessions.
21
+ This data source is merging with Sessions data source and storing into the ElasticSearch
22
+ If any session has a basket, the Order ID of the session of basket information must be included at basket data source.
23
+ Basket Data Source is optional.
24
+ Product Analytics Dashboard and A/B Test for Products are calculated related to basket datasource.
25
+ If here is action in the Session data source related to basket creation,
26
+ 'Add-to-basket' action will have True value while there is a created basket.
27
+ </h6>
28
+ </div>
29
+
30
+ <div class="row ">
31
+ <h6 class="card-subtitle text-muted">
32
+ {% if values['data_source_con_check'] == 'Connected' %}
33
+ {% if values['s_c_p_connection_check']['products'] == 'False' %}
34
+ <strong style="color:green;">There isn`t any connection detected for Baskets.</strong>
35
+ {% endif %}
36
+ {% if values['s_c_p_connection_check']['baskets'] == 'True' %}
37
+ <strong style="color:green;">Baskets Data Source is successfully created.</strong>
38
+ {% endif %}
39
+ {% endif %}
40
+ {% if values['data_source_con_check'] != 'Connected' and values['data_source_con_check'] != '....' %}
41
+ <strong style="color:red;">Connection is failed! .</strong>
42
+ {% endif %}
43
+ {% if values['data_source_con_check'] == '....' %}
44
+ {% if values['s_c_p_connection_check']['baskets'] == 'True' %}
45
+ <strong style="color:green;">Baskets Data Source is detected</strong>
46
+ {% endif %}
47
+ {% endif %}
48
+ </h6>
49
+ </div>
50
+ </div>
51
+ <div class="card-body">
52
+ <div class="row">
53
+ <div class="col-md-12">
54
+ <div class="card">
55
+ <div class="card-header">
56
+ <h5 class="card-title"><strong style="color:green;">Basket Data Source</strong></h5>
57
+ <h6 class="card-subtitle text-muted">
58
+ <div class="row">
59
+ - Each session ID (Order ID) must be unique. Sessions must cover both non-purchased and purchase transactions.
60
+ </div>
61
+ <div class="row">
62
+ - session IDs must be matched with Session IDs on Sessions Data Source.
63
+ </div>
64
+ <div class="row">
65
+ - Products are assigned as product IDs or product names.
66
+ </div>
67
+ <div class="row">
68
+ - Price will be the Amount * Price of the product.
69
+ </div>
70
+ </h6>
71
+ </div>
72
+ <div class="card-body">
73
+ {% if values['es_connection'] != '....' %}
74
+ <div class="mb-4 col-md-12">
75
+ {% if values['es_connection']['url'] == 'None' %}
76
+ <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>
77
+ {% endif %}
78
+ </div>
79
+
80
+ <div class="mb-4 col-md-12">
81
+ <label class="form-label mb-2" for="input_name">Basket Connection Tag Name</label>
82
+ <input name="products_data_source_tag" type="text" class="form-control mb-3" id="input_name" placeholder="main_session connection" required>
83
+ </div>
84
+ <table class="table table-striped">
85
+ <thead>
86
+ <tr>
87
+ <th style="width:16%;">
88
+ order ID
89
+ </th>
90
+ <th style="width:15%;">
91
+ product
92
+ </th>
93
+
94
+ <th style="width:15%;">
95
+ price
96
+ </th>
97
+
98
+ <th style="width:15%;">
99
+ category
100
+ </th>
101
+ </tr>
102
+ </thead>
103
+ <tbody>
104
+ <tr>
105
+ <td> <input name="order_id" type="text" class="form-control mb-3" id="order_id" required> </td>
106
+ <td> <input name="product" type="text" class="form-control mb-3" id="product" required> </td>
107
+ <td> <input name="price" type="text" class="form-control mb-3" id="price" required> </td>
108
+ <td> <input name="category" type="text" class="form-control mb-3" id="category" required> </td>
109
+ </tr>
110
+
111
+ </tbody>
112
+ </table>
113
+
114
+
115
+ <div class="row">
116
+ <div class="col-md-6">
117
+ <label class="form-label" for="inputState">data source</label>
118
+ <select size="3" name="products_data_source_type" id="products_data_source_type" data-show-content="true" class="form-control mb-3" required>
119
+ <option>postgresql</option>
120
+ <option>google big query</option>
121
+ <option>aws redshift</option>
122
+ <option selected>csv</option>
123
+ <option>parquet</option>
124
+ <option>hdf5</option>
125
+ </select>
126
+ <label class="form-label">Data Query or Path</label>
127
+ <textarea name="products_data_query_path" class="form-control mb-3" placeholder="SELECT * FROM table .... / raw_data.csv" rows="10"></textarea>
128
+ </div>
129
+ <div class="col-md-6">
130
+ <label class="form-label" for="inputPasswordNew2">user</label>
131
+ <input name="products_user" type="text" class="form-control mb-3" id="products_user">
132
+ <label class="form-label" for="inputPasswordNew">password</label>
133
+ <input name="products_password" type="password" class="form-control mb-3" id="inputPasswordNew">
134
+ <label class="form-label" for="inputPasswordNew2">port</label>
135
+ <input name="products_port" type="text" class="form-control mb-3" id="products_port">
136
+ <label class="form-label" for="inputPasswordNew2">host</label>
137
+ <input name="products_host" type="text" class="form-control mb-3" id="products_host">
138
+ <label class="form-label" for="inputPasswordNew2">database</label>
139
+ <input name="products_db" type="text" class="form-control" id="products_db">
140
+ </div>
141
+ </div>
142
+ <button name="connect" value="products" type="submit" class="btn btn-primary" >Connect</button>
143
+ {% endif %}
144
+
145
+ {% if values['es_connection'] == '....' %}
146
+ <strong style="color:red;">Please add ElasticSearch Connection</strong>
147
+ {% endif %}
148
+ </div>
149
+ </div>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </div>
154
+ </form>
155
+
156
+ </div>
157
+ </div>
158
+ </main>
159
+
160
+ {% endblock content %}
161
+
162
+ <script>
163
+ function myFunction() {
164
+ // Get the checkbox
165
+ var checkBox = document.getElementById("myCheck");
166
+ // Get the output text
167
+ var text = document.getElementById("text");
168
+
169
+ // If the checkbox is checked, display the output text
170
+ if (checkBox.checked == true){
171
+ text.style.display = "block";
172
+ } else {
173
+ text.style.display = "none";
174
+ }
175
+ }
176
+ </script>
177
+ {% block javascripts %}{% endblock javascripts %}