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.
- customeranalytics/__init__.py +319 -0
- customeranalytics/configs.py +480 -0
- customeranalytics/data_storage_configurations/__init__.py +245 -0
- customeranalytics/data_storage_configurations/data_access.py +165 -0
- customeranalytics/data_storage_configurations/data_works_pipeline.py +207 -0
- customeranalytics/data_storage_configurations/es_create_index.py +544 -0
- customeranalytics/data_storage_configurations/logger.py +36 -0
- customeranalytics/data_storage_configurations/query_es.py +157 -0
- customeranalytics/data_storage_configurations/reports.py +684 -0
- customeranalytics/data_storage_configurations/schedule_data_integration.py +355 -0
- customeranalytics/docs/queries.yaml +245 -0
- customeranalytics/docs/web_configs.yaml +2 -0
- customeranalytics/exploratory_analysis/__init__.py +109 -0
- customeranalytics/exploratory_analysis/churn.py +232 -0
- customeranalytics/exploratory_analysis/cohorts.py +535 -0
- customeranalytics/exploratory_analysis/descriptive_statistics.py +470 -0
- customeranalytics/exploratory_analysis/funnels.py +407 -0
- customeranalytics/exploratory_analysis/product_analytics.py +340 -0
- customeranalytics/exploratory_analysis/promotion_analytics.py +299 -0
- customeranalytics/exploratory_analysis/rfm.py +202 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_avg_order_count_per_promo_per_cust.csv +99 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_chart_1_search.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_chart_2_search.csv +46 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_chart_3_search.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_chart_4_search.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_churn.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_churn_weekly.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_client_feature_predicted.csv +1590 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_client_kpis.csv +7060 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_clvrfm_anomaly.csv +561 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_clvsegments_amount.csv +8 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_customer_journey.csv +18 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_clv.csv +103 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_downloads.csv +68 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_from_1_to_2.csv +66 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_from_2_to_3.csv +64 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_cohort_from_3_to_4.csv +55 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_dimension_values.csv +199 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_funnel.csv +36 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_funnel_downloads.csv +68 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_inorganic_ratio.csv +6070 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_orders.csv +57 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_organic_orders.csv +64 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_products_of_sales.csv +12574 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_promotion_discount.csv +64 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_daily_promotion_revenue.csv +6070 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dcohort_anomaly.csv +6 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dcohort_anomaly_2.csv +118 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_deliver.csv +47 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_deliver_kpis.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_deliver_weekday_hour.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dfunnel_anomaly.csv +118 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dimension_kpis.csv +199 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_dorders_anomaly.csv +85 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_frequency_clusters.csv +6 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_frequency_recency.csv +3740 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_funnel.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_funnel_downloads.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_inorganic_ratio.csv +2353 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_orders.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_hourly_organic_orders.csv +2353 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_inorganic_orders_per_promotion_per_day.csv +6070 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_kpis.csv +2 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monetary_clusters.csv +6 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monetary_frequency.csv +3740 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monthly_funnel.csv +5 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monthly_funnel_downloads.csv +5 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_monthly_orders.csv +4 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_most_combined_products.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_most_ordered_categories.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_most_ordered_products.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_order_and_payment_amount_differences.csv +91 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_prepare.csv +101 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_prepare_weekday_hour.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_kpis.csv +201 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_amount_accept.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_amount_reject.csv +7 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_orders_accept.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_product_usage_before_after_orders_reject.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_comparison.csv +91 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_kpis.csv +99 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_number_of_customer.csv +99 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_amount_accept.csv +81 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_amount_reject.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_orders_accept.csv +55 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_promotion_usage_before_after_orders_reject.csv +37 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_purchase_amount_distribution.csv +22 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_recency_clusters.csv +6 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_recency_monetary.csv +3740 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_rfm.csv +2001 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_ride.csv +101 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_ride_weekday_hour.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segmentation.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_daily_before_after_amount.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_daily_before_after_orders.csv +9 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_monthly_before_after_amount.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_monthly_before_after_orders.csv +11 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_weekly_before_after_amount.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_segments_change_weekly_before_after_orders.csv +10 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_user_counts_per_order_seq.csv +47 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_average_order_per_user.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_average_payment_amount.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_average_session_per_user.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_downloads.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_from_1_to_2.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_from_2_to_3.csv +13 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_cohort_from_3_to_4.csv +12 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_funnel.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_funnel_downloads.csv +25 -0
- customeranalytics/exploratory_analysis/sample_data/sample_data_weekly_orders.csv +10 -0
- customeranalytics/ml_process/__init__.py +64 -0
- customeranalytics/ml_process/ab_test.py +615 -0
- customeranalytics/ml_process/anomaly_detection.py +456 -0
- customeranalytics/ml_process/clv_prediction.py +301 -0
- customeranalytics/ml_process/customer_segmentation.py +354 -0
- customeranalytics/ml_process/delivery_analytics.py +754 -0
- customeranalytics/utils.py +186 -0
- customeranalytics/web/app/__init__.py +37 -0
- customeranalytics/web/app/base/__init__.py +9 -0
- customeranalytics/web/app/base/forms.py +16 -0
- customeranalytics/web/app/base/models.py +43 -0
- customeranalytics/web/app/base/routes.py +126 -0
- customeranalytics/web/app/base/static/assets/css/app.css +20 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Black.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Black.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-BlackItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-BlackItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Bold.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Bold.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-BoldItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-BoldItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBold.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBold.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBoldItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraBoldItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLight-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLight-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLightItalic-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ExtraLightItalic-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Italic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Italic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Light-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Light-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-LightItalic-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-LightItalic-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Medium.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Medium.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-MediumItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-MediumItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Regular.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Regular.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBold.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBold.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBoldItalic.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-SemiBoldItalic.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Thin-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-Thin-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ThinItalic-BETA.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-ThinItalic-BETA.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-italic.var.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter-upright.var.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/Inter.var.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.eot +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.svg +3570 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.ttf +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-brands-400.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.eot +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.svg +801 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.ttf +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-regular-400.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.eot +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.svg +5028 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.ttf +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.woff +0 -0
- customeranalytics/web/app/base/static/assets/fonts/fa-solid-900.woff2 +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-1.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-2.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-3.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-4.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/avatar-5.png +0 -0
- customeranalytics/web/app/base/static/assets/img/avatars/info.jpeg +0 -0
- customeranalytics/web/app/base/static/assets/img/icons/customanality.png +0 -0
- customeranalytics/web/app/base/static/assets/img/icons/icon-48x48.png +0 -0
- customeranalytics/web/app/base/static/assets/js/app.js +2 -0
- customeranalytics/web/app/base/static/assets/js/app.js.LICENSE +566 -0
- customeranalytics/web/app/base/static/assets/js/app.js.LICENSE.txt +556 -0
- customeranalytics/web/app/base/static/assets/js/modules/bootstrap.js +15 -0
- customeranalytics/web/app/base/static/assets/js/modules/chartjs.js +4 -0
- customeranalytics/web/app/base/static/assets/js/modules/feather.js +8 -0
- customeranalytics/web/app/base/static/assets/js/modules/flatpickr.js +4 -0
- customeranalytics/web/app/base/static/assets/js/modules/moment.js +4 -0
- customeranalytics/web/app/base/static/assets/js/modules/sidebar.js +23 -0
- customeranalytics/web/app/base/static/assets/js/modules/theme.js +16 -0
- customeranalytics/web/app/base/templates/accounts/login.html +81 -0
- customeranalytics/web/app/base/templates/accounts/register.html +80 -0
- customeranalytics/web/app/base/templates/includes/footer.html +28 -0
- customeranalytics/web/app/base/templates/includes/navigation.html +51 -0
- customeranalytics/web/app/base/templates/includes/scripts.html +3 -0
- customeranalytics/web/app/base/templates/includes/sidebar.html +146 -0
- customeranalytics/web/app/base/templates/layouts/base-fullscreen.html +36 -0
- customeranalytics/web/app/base/templates/layouts/base.html +84 -0
- customeranalytics/web/app/base/util.py +30 -0
- customeranalytics/web/app/home/__init__.py +9 -0
- customeranalytics/web/app/home/forms.py +1039 -0
- customeranalytics/web/app/home/models.py +438 -0
- customeranalytics/web/app/home/profiles.py +310 -0
- customeranalytics/web/app/home/routes.py +386 -0
- customeranalytics/web/app/home/search.py +288 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-1.png +0 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-2.png +0 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-3.png +0 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-4.png +0 -0
- customeranalytics/web/app/home/static/assets/img/avatars/avatar-5.png +0 -0
- customeranalytics/web/app/home/static/assets/img/icons/customanality.png +0 -0
- customeranalytics/web/app/home/static/assets/img/icons/icon-48x48.png +0 -0
- customeranalytics/web/app/home/templates/abtest-product.html +280 -0
- customeranalytics/web/app/home/templates/abtest-promotion.html +362 -0
- customeranalytics/web/app/home/templates/abtest-segments.html +298 -0
- customeranalytics/web/app/home/templates/add-data-delivery.html +184 -0
- customeranalytics/web/app/home/templates/add-data-product.html +177 -0
- customeranalytics/web/app/home/templates/add-data-purchase.html +392 -0
- customeranalytics/web/app/home/templates/anomaly.html +261 -0
- customeranalytics/web/app/home/templates/clv.html +211 -0
- customeranalytics/web/app/home/templates/cohorts.html +308 -0
- customeranalytics/web/app/home/templates/customer-segmentation.html +308 -0
- customeranalytics/web/app/home/templates/data-es.html +152 -0
- customeranalytics/web/app/home/templates/data-execute.html +397 -0
- customeranalytics/web/app/home/templates/delivery.html +404 -0
- customeranalytics/web/app/home/templates/funnel-customer.html +240 -0
- customeranalytics/web/app/home/templates/funnel-session.html +236 -0
- customeranalytics/web/app/home/templates/index.html +524 -0
- customeranalytics/web/app/home/templates/index2.html +515 -0
- customeranalytics/web/app/home/templates/page-403.html +46 -0
- customeranalytics/web/app/home/templates/page-404.html +45 -0
- customeranalytics/web/app/home/templates/page-500.html +45 -0
- customeranalytics/web/app/home/templates/pages-blank.html +33 -0
- customeranalytics/web/app/home/templates/pages-sign-in.html +67 -0
- customeranalytics/web/app/home/templates/pages-sign-up.html +61 -0
- customeranalytics/web/app/home/templates/product.html +203 -0
- customeranalytics/web/app/home/templates/profile.html +1009 -0
- customeranalytics/web/app/home/templates/rfm.html +254 -0
- customeranalytics/web/app/home/templates/search.html +167 -0
- customeranalytics/web/app/home/templates/settings.html +205 -0
- customeranalytics/web/app/home/templates/stats-desc.html +230 -0
- customeranalytics/web/app/home/templates/stats-purchase.html +221 -0
- customeranalytics/web/config.py +30 -0
- customeranalytics/web/db.sqlite3 +0 -0
- customeranalytics/web/run.py +30 -0
- customeranalytics-0.1.dist-info/METADATA +1102 -0
- customeranalytics-0.1.dist-info/RECORD +254 -0
- customeranalytics-0.1.dist-info/WHEEL +4 -0
- customeranalytics-0.1.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
from os.path import abspath, join
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
elasticsearch_settings = {
|
|
5
|
+
"settings": {
|
|
6
|
+
"number_of_shards": 2,
|
|
7
|
+
"number_of_replicas": 0,
|
|
8
|
+
"index.mapping.total_fields.limit": 20000,
|
|
9
|
+
"index.query.default_field": 10000000,
|
|
10
|
+
"index.max_result_window": 10000000,
|
|
11
|
+
"index": {
|
|
12
|
+
"analysis": {
|
|
13
|
+
|
|
14
|
+
"filter": {
|
|
15
|
+
"autocomplete_filter": {
|
|
16
|
+
"type": "edge_ngram",
|
|
17
|
+
"min_gram": 1,
|
|
18
|
+
"max_gram": 10
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"analyzer": {
|
|
22
|
+
"autocomplete": {
|
|
23
|
+
"type": "custom",
|
|
24
|
+
"tokenizer": "standard",
|
|
25
|
+
"filter": [
|
|
26
|
+
"lowercase",
|
|
27
|
+
"autocomplete_filter"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
},
|
|
37
|
+
"mappings": {
|
|
38
|
+
"properties": {"date": {"type": "date"},
|
|
39
|
+
"session_start_date": {"type": "date"},
|
|
40
|
+
"discount_amount": {"type": "float"},
|
|
41
|
+
"payment_amount": {"type": "float"},
|
|
42
|
+
"actions": {
|
|
43
|
+
"properties": {
|
|
44
|
+
"has_sessions": {"type": "boolean"},
|
|
45
|
+
"has_basket": {"type": "boolean"},
|
|
46
|
+
"order_screen": {"type": "boolean"},
|
|
47
|
+
"purchased": {"type": "boolean"}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"delivery": {
|
|
51
|
+
"properties": {
|
|
52
|
+
"delivery_date": {"type": "date"},
|
|
53
|
+
"return_date": {"type": "date"},
|
|
54
|
+
"prepare_date": {"type": "date"},
|
|
55
|
+
"latitude": {"type": "float"},
|
|
56
|
+
"longitude": {"type": "float"}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
elasticsearch_settings_downloads = {
|
|
68
|
+
"settings": {
|
|
69
|
+
"number_of_shards": 2,
|
|
70
|
+
"number_of_replicas": 0,
|
|
71
|
+
"index.mapping.total_fields.limit": 20000,
|
|
72
|
+
"index.query.default_field": 10000000,
|
|
73
|
+
"index.max_result_window": 10000000,
|
|
74
|
+
"index": {
|
|
75
|
+
"analysis": {
|
|
76
|
+
|
|
77
|
+
"filter": {
|
|
78
|
+
"autocomplete_filter": {
|
|
79
|
+
"type": "edge_ngram",
|
|
80
|
+
"min_gram": 1,
|
|
81
|
+
"max_gram": 10
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"analyzer": {
|
|
85
|
+
"autocomplete": {
|
|
86
|
+
"type": "custom",
|
|
87
|
+
"tokenizer": "standard",
|
|
88
|
+
"filter": [
|
|
89
|
+
"lowercase",
|
|
90
|
+
"autocomplete_filter"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
},
|
|
101
|
+
"mappings": {
|
|
102
|
+
"properties": {"download_date": {"type": "date"},
|
|
103
|
+
"signup_date": {"type": "date"}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
elasticsearch_settings_reports = {
|
|
110
|
+
"settings": {
|
|
111
|
+
"number_of_shards": 2,
|
|
112
|
+
"number_of_replicas": 0,
|
|
113
|
+
"index.mapping.total_fields.limit": 20000,
|
|
114
|
+
"index.query.default_field": 10000000,
|
|
115
|
+
"index.max_result_window": 10000000,
|
|
116
|
+
"index": {
|
|
117
|
+
"analysis": {
|
|
118
|
+
|
|
119
|
+
"filter": {
|
|
120
|
+
"autocomplete_filter": {
|
|
121
|
+
"type": "edge_ngram",
|
|
122
|
+
"min_gram": 1,
|
|
123
|
+
"max_gram": 10
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"analyzer": {
|
|
127
|
+
"autocomplete": {
|
|
128
|
+
"type": "custom",
|
|
129
|
+
"tokenizer": "standard",
|
|
130
|
+
"filter": [
|
|
131
|
+
"lowercase",
|
|
132
|
+
"autocomplete_filter"
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
},
|
|
145
|
+
"mappings": {
|
|
146
|
+
"properties": {
|
|
147
|
+
"report_date": {"type": "date"},
|
|
148
|
+
"report_types._to": {"type": "integer"},
|
|
149
|
+
"report_types._from": {"type": "integer"},
|
|
150
|
+
"frequency_segment": {"type": "float"},
|
|
151
|
+
"monetary_segment": {"type": "float"},
|
|
152
|
+
"recency_segment": {"type": "float"},
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
default_sample_data_previous_day = 60
|
|
159
|
+
default_dask_partitions = 3
|
|
160
|
+
default_es_port = 9200
|
|
161
|
+
default_es_host = 'localhost'
|
|
162
|
+
default_es_bulk_insert_chunk_size = 10000
|
|
163
|
+
default_es_bulk_insert_chunk_bytes = 10485760000
|
|
164
|
+
max_elasticsearch_bulk_insert_bytes = 100000000
|
|
165
|
+
time_periods = ["hourly", "daily", "weekly", 'monthly']
|
|
166
|
+
default_query_date = "1900-01-01T00:00:00"
|
|
167
|
+
query_path = join(abspath(__file__).split("configs.py")[0], "docs")
|
|
168
|
+
default_dask_partitions = 4
|
|
169
|
+
elasticsearch_connection_refused_comment = """
|
|
170
|
+
Please check your directory. File path must be ending with ...../bin/elasticsearch.
|
|
171
|
+
'/bin/elasticsearch' path is a folder in downloaded ES folder.
|
|
172
|
+
Another option, running elasticsearch on terminal and assign 'port' and 'host'.
|
|
173
|
+
ElasticSearch default port is 9200. If you running on local computer pls assign default host is 'localhost.'
|
|
174
|
+
"""
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
schedule_columns = {
|
|
178
|
+
"tag": "ElasticSearch Tag Name",
|
|
179
|
+
"dimension": "Has Data Source Dimension?",
|
|
180
|
+
"orders_data_source_tag": "Sessions Connection Tag Name",
|
|
181
|
+
"orders_data_source_type": "Sessions Connection Data Source",
|
|
182
|
+
"orders_data_query_path": "Sessions Connection Data Query/Path",
|
|
183
|
+
|
|
184
|
+
"downloads_data_source_tag": "Customers Connection Tag Name",
|
|
185
|
+
"downloads_data_source_type": "Customers Connection Data Source",
|
|
186
|
+
"downloads_data_query_path": "Customers Connection Data Query/Path",
|
|
187
|
+
|
|
188
|
+
"s_action": "Has Sessions Data Source Actions?",
|
|
189
|
+
"d_action": "Has Customers Data Source Actions?",
|
|
190
|
+
"promotion_id": "Has Sessions Data Source Promotions?",
|
|
191
|
+
|
|
192
|
+
"max_date_of_order_data": "Last Time Triggered Scheduling Job",
|
|
193
|
+
"time_period": "Schedule Time Period",
|
|
194
|
+
"schedule_tag": "Schedule Status",
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
schedule_columns_optional = {
|
|
198
|
+
"products_data_source_tag": "Baskets Connection Tag Name",
|
|
199
|
+
"products_data_source_type": "Baskets Connection Data Source",
|
|
200
|
+
"products_data_query_path": "Baskets Connection Data Query/Path",
|
|
201
|
+
|
|
202
|
+
"deliveries_data_source_tag": "Deliveries Connection Tag Name",
|
|
203
|
+
"deliveries_data_source_type": "Deliveries Connection Data Source",
|
|
204
|
+
"deliveries_data_query_path": "Deliveries Connection Data Query/Path",
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
default_message = {'es_connection': '....',
|
|
209
|
+
'orders': '....',
|
|
210
|
+
'orders_data': '....',
|
|
211
|
+
'orders_columns': '....',
|
|
212
|
+
'downloads': '....',
|
|
213
|
+
'downloads_data': '....',
|
|
214
|
+
'downloads_columns': '....',
|
|
215
|
+
'action_orders': '....',
|
|
216
|
+
'action_downloads': '....',
|
|
217
|
+
'product_orders': '....',
|
|
218
|
+
'schedule': '...',
|
|
219
|
+
'schedule_columns': list(schedule_columns.values()),
|
|
220
|
+
'schedule_columns_optional': list(schedule_columns_optional.values()),
|
|
221
|
+
'schedule_tags': '....',
|
|
222
|
+
'logs': '....',
|
|
223
|
+
'last_log': '....',
|
|
224
|
+
'active_connections': '....',
|
|
225
|
+
'connect_accept': False,
|
|
226
|
+
'has_product_data_source': False,
|
|
227
|
+
'es_connection_check': '....',
|
|
228
|
+
'schedule_check': False,
|
|
229
|
+
's_c_p_connection_check': 'False_False_False',
|
|
230
|
+
'data_source_con_check': '....'
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
acception_column_count = {'orders': 5, 'downloads': 2, 'products': 4, 'deliveries': 2}
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
orders_index_obj = {'id': 74915741,
|
|
238
|
+
'date': None,
|
|
239
|
+
'actions': {},
|
|
240
|
+
'client': None,
|
|
241
|
+
'promotion_id': None,
|
|
242
|
+
'payment_amount': 0,
|
|
243
|
+
'discount_amount': 0,
|
|
244
|
+
'basket': {'p_10': {'price': 6.12, 'category': 'p_c_8', 'rank': 109},
|
|
245
|
+
'p_145': {'price': 12.0, 'category': 'p_c_9', 'rank': 175},
|
|
246
|
+
'p_168': {'price': 13.12, 'category': 'p_c_10', 'rank': 82},
|
|
247
|
+
'p_9': {'price': 0.52, 'category': 'p_c_3', 'rank': 9},
|
|
248
|
+
'p_4': {'price': 3.72, 'category': 'p_c_8', 'rank': 69},
|
|
249
|
+
'p_104': {'price': 8.88, 'category': 'p_c_10', 'rank': 97},
|
|
250
|
+
'p_74': {'price': 8.395, 'category': 'p_c_10', 'rank': 35}},
|
|
251
|
+
'total_products': 7,
|
|
252
|
+
'session_start_date': '2020-12-16T09:39:11'}
|
|
253
|
+
orders_index_columns = ["id", "date", "actions", "client", "promotion_id",
|
|
254
|
+
"payment_amount", "discount_amount", "basket", "total_products",
|
|
255
|
+
"session_start_date", "dimension", 'delivery']
|
|
256
|
+
|
|
257
|
+
not_required_columns = {"orders": ['discount_amount'], 'downloads': ['signup_date'],
|
|
258
|
+
'products': ['category'], 'deliveries': ['return_date', 'prepare_date', 'latitude', 'longitude']}
|
|
259
|
+
not_required_default_values = {'discount_amount': float(0.0),
|
|
260
|
+
'signup_date': default_query_date,
|
|
261
|
+
'category': 'cat_1',
|
|
262
|
+
'return_date': default_query_date,
|
|
263
|
+
'prepare_date': default_query_date,
|
|
264
|
+
'latitude': float(0.0), 'longitude': float(0.0)}
|
|
265
|
+
|
|
266
|
+
delivery_anomaly_model_parameters = {'epochs': 50,
|
|
267
|
+
'batch_size': 64,
|
|
268
|
+
'activation': 'tanh',
|
|
269
|
+
'h_l_unit': 32, 'hidden_layer_count': 5,
|
|
270
|
+
'loss': 'mse', 'drop_out_ratio': 0.2, 'lr': 0.001, 'l1': .001, 'l2': .001}
|
|
271
|
+
|
|
272
|
+
delivery_anomaly_model_hyper_parameters = {'activation': ['tanh', 'relu'],
|
|
273
|
+
'batch_size': 128,
|
|
274
|
+
'h_l_unit': [256, 128, 64, 32, 16], 'hidden_layer_count': [2, 3, 4, 5, 6],
|
|
275
|
+
'loss': ['mse'],
|
|
276
|
+
'drop_out_ratio': [.05, .1, .15, .2],
|
|
277
|
+
'lr': [.001, .002, .003, .004, .005, .01, .05],
|
|
278
|
+
'l1': [.001, .002, .003, .004, .005],
|
|
279
|
+
'l2': [.001, .002, .003, .004, .005]}
|
|
280
|
+
|
|
281
|
+
downloads_index_columns = ["id", "download_date", "signup_date", "client"]
|
|
282
|
+
delivery_metrics = ['return_date', 'prepare_date', 'delivery_date', 'latitude', 'longitude']
|
|
283
|
+
|
|
284
|
+
downloads_index_obj = {'id': 89481673,
|
|
285
|
+
'download_date': '2021-01-01T21:23:15',
|
|
286
|
+
'signup_date': '2021-01-14T09:22:15',
|
|
287
|
+
'client': 'u_100006'}
|
|
288
|
+
|
|
289
|
+
descriptive_stats = ["weekly_average_session_per_user", "weekly_average_order_per_user",
|
|
290
|
+
"purchase_amount_distribution", "weekly_average_payment_amount"]
|
|
291
|
+
|
|
292
|
+
descriptive_reports = ['monthly_orders',
|
|
293
|
+
'purchase_amount_distribution',
|
|
294
|
+
'weekly_average_order_per_user',
|
|
295
|
+
'weekly_average_session_per_user',
|
|
296
|
+
'user_counts_per_order_seq',
|
|
297
|
+
'',
|
|
298
|
+
'weekly_orders',
|
|
299
|
+
'weekly_average_payment_amount',
|
|
300
|
+
'daily_orders',
|
|
301
|
+
'hourly_orders']
|
|
302
|
+
|
|
303
|
+
abtest_promotions = ["order_and_payment_amount_differences",
|
|
304
|
+
"promotion_comparison",
|
|
305
|
+
"promotion_usage_before_after_amount_accept",
|
|
306
|
+
"promotion_usage_before_after_amount_reject",
|
|
307
|
+
"promotion_usage_before_after_orders_accept",
|
|
308
|
+
"promotion_usage_before_after_orders_reject"]
|
|
309
|
+
|
|
310
|
+
abtest_products = ["product_usage_before_after_amount_accept",
|
|
311
|
+
"product_usage_before_after_amount_reject",
|
|
312
|
+
"product_usage_before_after_orders_accept",
|
|
313
|
+
"product_usage_before_after_orders_reject"]
|
|
314
|
+
|
|
315
|
+
abtest_segments = ['segments_change_daily_before_after_amount',
|
|
316
|
+
'segments_change_daily_before_after_orders',
|
|
317
|
+
'segments_change_monthly_before_after_amount',
|
|
318
|
+
'segments_change_monthly_before_after_orders',
|
|
319
|
+
'segments_change_weekly_before_after_amount',
|
|
320
|
+
'segments_change_weekly_before_after_orders']
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
abtest_reports = ['product_usage_before_after_amount',
|
|
324
|
+
'product_usage_before_after_orders', 'promotion_comparison',
|
|
325
|
+
'promotion_usage_before_after_amount',
|
|
326
|
+
'promotion_usage_before_after_orders',
|
|
327
|
+
'segments_change_daily_before_after_amount',
|
|
328
|
+
'segments_change_daily_before_after_orders',
|
|
329
|
+
'segments_change_monthly_before_after_amount',
|
|
330
|
+
'segments_change_monthly_before_after_orders',
|
|
331
|
+
'segments_change_weekly_before_after_amount',
|
|
332
|
+
'segments_change_weekly_before_after_orders']
|
|
333
|
+
|
|
334
|
+
product_analytics = ['daily_products_of_sales',
|
|
335
|
+
'product_kpis',
|
|
336
|
+
'most_ordered_products',
|
|
337
|
+
'hourly_products_of_sales',
|
|
338
|
+
'most_combined_products',
|
|
339
|
+
'most_ordered_categories',
|
|
340
|
+
'hourly_categories_of_sales']
|
|
341
|
+
|
|
342
|
+
promotion_analytics = ['daily_organic_orders', 'daily_inorganic_ratio',
|
|
343
|
+
'daily_promotion_revenue', 'daily_promotion_discount',
|
|
344
|
+
'avg_order_count_per_promo_per_cust',
|
|
345
|
+
'promotion_number_of_customer', 'promotion_kpis',
|
|
346
|
+
'inorganic_orders_per_promotion_per_day', 'hourly_inorganic_ratio',
|
|
347
|
+
'hourly_organic_orders']
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
non_dimensional_reports = ["clv_prediction", "segmentation"]
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
clv_prediction_reports = ["daily_clv", "clvsegments_amount"]
|
|
354
|
+
|
|
355
|
+
chart_names = {
|
|
356
|
+
"Sessions Of Actions Funnel":
|
|
357
|
+
{"Daily Funnel": "funnel*daily_funnel",
|
|
358
|
+
"Weekly Funnel": "funnel*weekly_funnel",
|
|
359
|
+
"Monthly Funnel": "funnel*monthly_funnel",
|
|
360
|
+
"Hourly Funnel": "funnel*hourly_funnel"},
|
|
361
|
+
|
|
362
|
+
"Customers Of Actions Funnel":
|
|
363
|
+
{"Daily Funnel": "funnel*daily_funnel_downloads",
|
|
364
|
+
"Weekly Funnel": "funnel*weekly_funnel_downloads",
|
|
365
|
+
"Monthly Funnel": "funnel*monthly_funnel_downloads",
|
|
366
|
+
"Hourly Funnel": "funnel*hourly_funnel_downloads"},
|
|
367
|
+
"Cohorts":
|
|
368
|
+
{"Daily Download to 1st Order Cohort": "cohort*daily_cohort_downloads",
|
|
369
|
+
"Daily From 1st to 2nd Order Cohort": "cohort*daily_cohort_from_1_to_2",
|
|
370
|
+
"Daily From 2nd to 3rd Order Cohort": "cohort*daily_cohort_from_2_to_3",
|
|
371
|
+
"Daily From 3rd to 4th Order Cohort": "cohort*daily_cohort_from_3_to_4",
|
|
372
|
+
"Weekly Download to 1st Order Cohort": "cohort*weekly_cohort_downloads",
|
|
373
|
+
"Weekly From 1st to 2nd Order Cohort": "cohort*weekly_cohort_from_1_to_2",
|
|
374
|
+
"Weekly From 2nd to 3rd Order Cohort": "cohort*weekly_cohort_from_2_to_3",
|
|
375
|
+
"Weekly From 3rd to 4th Order Cohort": "cohort*weekly_cohort_from_3_to_4"},
|
|
376
|
+
"Descriptive Stats":
|
|
377
|
+
{"Daily Orders": "stats*daily_orders",
|
|
378
|
+
"Hourly Orders": "stats*hourly_orders",
|
|
379
|
+
"Weekly Orders": "stats*weekly_orders",
|
|
380
|
+
"Monthly Orders": "stats*monthly_orders",
|
|
381
|
+
"Weekly Average Session Count per Customer": "descriptive*weekly_average_session_per_user",
|
|
382
|
+
"Weekly Average Purchase Count per Customer": "descriptive*weekly_average_payment_amount",
|
|
383
|
+
"Payment Amount Distribution": "descriptive*purchase_amount_distribution",
|
|
384
|
+
"Weekly Average Payment Amount": "descriptive*weekly_average_payment_amount"},
|
|
385
|
+
"Product Analytics":
|
|
386
|
+
{"Most Combined Products": "product_analytic*most_combined_products",
|
|
387
|
+
"Most Order Products": "product_analytic*most_ordered_products",
|
|
388
|
+
"Most Order Categories": "product_analytic*most_ordered_categories"},
|
|
389
|
+
"A/B test Promotion":
|
|
390
|
+
{"Promotion Comparison": "abtest-promotion*promotion_comparison",
|
|
391
|
+
"Order And Payment Amount Difference for Before And After Promotion Usage": "abtest-promotion*order_and_payment_amount_differences",
|
|
392
|
+
"A/B Test Promotion B. - A. Time Periods Cust.s' Avg. Purchase Payment Amount Test (Test Accepted!)": "abtest-promotion*promotion_usage_before_after_amount_accept",
|
|
393
|
+
"A/B Test Promotion B. - A. Time Periods Cust.s' Avg. Purchase Payment Amount Test (Test Rejected!)": "abtest-promotion*promotion_usage_before_after_amount_reject",
|
|
394
|
+
"A/B Test Promotion B. - A. Time Periods Cust.s' Tot. Purchase Count Test (Test Accepted!)": "abtest-promotion*promotion_usage_before_after_orders_accept",
|
|
395
|
+
"A/B Test Promotion B. - A. Time Periods Cust.s' Tott Purchase Count Test (Test Rejected!)": "abtest-promotion*promotion_usage_before_after_orders_reject"},
|
|
396
|
+
"A/B Test Product":
|
|
397
|
+
{
|
|
398
|
+
"A/B Test Product - B. - A. Time Periods Cust.s' Avg. Purchase Payment Amount Test (Test Accepted!)": "abtest-product*product_usage_before_after_amount_accept",
|
|
399
|
+
"A/B Test Product - B. - A. Time Periods Cust.s' Avg. Purchase Payment Amount Test (Test Rejected!)": "abtest-product*product_usage_before_after_amount_reject",
|
|
400
|
+
"A/B Test Product - B. - A. Time Periods Cust.s' Totg Purchase Count Test (Test Accepted!)": "abtest-product*product_usage_before_after_orders_accept",
|
|
401
|
+
"A/B Test Product - B. - A. Time Periods Cust.s' Totg Purchase Count Test (Test Rejected!)": "abtest-product*product_usage_before_after_orders_reject"},
|
|
402
|
+
"A/B Test Customer Segment Change":
|
|
403
|
+
{
|
|
404
|
+
"A/B Test Cust. Segment Change - A/B Test Product - Daily Customers' Total Order Count per Customer Segment": "abtest-segments*segments_change_daily_before_after_orders",
|
|
405
|
+
"Weekly Customers' Total Order Count per Customer Segment": "abtest-segments*segments_change_weekly_before_after_orders",
|
|
406
|
+
"Monthly Customers' Total Order Count per Customer Segment": "abtest-segments*segments_change_weekly_before_after_orders",
|
|
407
|
+
"Daily Customers' Average Purchase Payment Amount per Customer Segment": "abtest-segments*segments_change_daily_before_after_amount",
|
|
408
|
+
"Weekly Customers' Average Purchase Payment Amount per Customer Segment": "abtest-segments*segments_change_weekly_before_after_amount",
|
|
409
|
+
"Monthly Customers' Average Purchase Payment Amount per Customer Segment": "abtest-segments*segments_change_weekly_before_after_amount"},
|
|
410
|
+
"RFM":
|
|
411
|
+
{"RFM": "rfm*rfm",
|
|
412
|
+
"Frequency - Recency": "rfm*frequency_recency",
|
|
413
|
+
"Monetary - Frequency": "rfm*monetary_frequency",
|
|
414
|
+
"Recency - Monetary": "rfm*recency_monetary"},
|
|
415
|
+
"Segmentation":
|
|
416
|
+
{"Customer Segmentation": "customer-segmentation*",
|
|
417
|
+
"Frequency Segmentation": "customer-segmentation*frequency_clusters",
|
|
418
|
+
"Monetary Segmentation": "customer-segmentation*monetary_clusters",
|
|
419
|
+
"Recency Segmentation": "customer-segmentation*recency_clusters"},
|
|
420
|
+
"CLV Prediction":
|
|
421
|
+
{"Next Week CLV Predictions": "clv*daily_clv",
|
|
422
|
+
"CLV Predicted Nex Week Customers of Segments of Total Purchase Amounts": "clv*daily_clv"},
|
|
423
|
+
"Overall":
|
|
424
|
+
{"Customer Journey": "index*customer_journey",
|
|
425
|
+
"Total Number Customer Breakdown with Purchased Order Count": "clv*clvsegments_amount"},
|
|
426
|
+
"Anomaly":
|
|
427
|
+
{"Daily Funnel Anomaly": "anomaly*dfunnel_anomaly",
|
|
428
|
+
"Daily Cohort Anomaly": "anomaly*dcohort_anomaly",
|
|
429
|
+
"Daily Cohort Anomaly With Scores": "anomaly*dcohort_anomaly_2",
|
|
430
|
+
"Daily Cohort Anomaly ": "anomaly*dorders_anomaly", "CLV RFM Vs Current RFM": "anomaly*clvrfm_anomaly"}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
ALLOWED_IMAGE_EXTENSIONS = ["JPEG", "JPG", "PNG", "GIF"]
|
|
435
|
+
MAX_IMAGE_FILESIZE = 0.5 * 1024 * 1024
|
|
436
|
+
|
|
437
|
+
TIME_DIFF_STR = [(0, "1m ago"), (60, "1m ago"), (60 * 60, "m ago "), (60 * 60 * 24, "hr ago "),
|
|
438
|
+
(60 * 60 * 24 * 7, "d ago "), (60 * 60 * 24 * 7 * 4, "w ago "), (60 * 60 * 24 * 7 * 4 * 12, "y ago ")]
|
|
439
|
+
|
|
440
|
+
DATE_DIFF_STR = [(0, "today "), (60 * 60 * 24, "today"), (60 * 60 * 24 * 2, "yesterday")]
|
|
441
|
+
|
|
442
|
+
DATA_WORKS_READABLE_FORM = {'clv_prediction': 'CLV Prediction',
|
|
443
|
+
'abtest': 'A/B Test', 'funnel': 'Session Actions & Customers Actions Funnels',
|
|
444
|
+
'cohort': 'Cohorts', 'rfm': 'RFM', 'stats': 'Descriptive Statistics',
|
|
445
|
+
'products': 'Product Analytics', 'segmentation': 'Customer Segmentation',
|
|
446
|
+
'anomaly': 'Anomaly Detection', 'promotions': 'Promotion Analytics', 'churn': 'Churn',
|
|
447
|
+
'delivery_anomaly': 'Delivery Anomaly'
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
none_types = [None, 'None', '-']
|
|
451
|
+
session_columns = {'order_id', 'client', 'session_start_date', 'date', 'payment_amount',
|
|
452
|
+
'discount_amount', 'has_purchased'}
|
|
453
|
+
customer_columns = {'client_2', 'download_date', 'signup_date'}
|
|
454
|
+
product_columns = {'order_id', 'product', 'price', 'category'}
|
|
455
|
+
delivery_columns = {'delivery_date', 'prepare_date', 'return_date', 'latitude', 'longitude'}
|
|
456
|
+
delivery_metrics = {'deliver', 'prepare', 'ride'}
|
|
457
|
+
delivery_threshold_z_score = 2
|
|
458
|
+
|
|
459
|
+
data_types_for_search = {"product": [('chart_1', ['product_kpis']),
|
|
460
|
+
('chart_2', ['daily_products_of_sales']),
|
|
461
|
+
('chart_3', ['product_usage_before_after_amount_accept',
|
|
462
|
+
'product_usage_before_after_amount_reject']),
|
|
463
|
+
('chart_4', ['product_usage_before_after_orders_accept',
|
|
464
|
+
'product_usage_before_after_orders_reject']),
|
|
465
|
+
],
|
|
466
|
+
"promotion": [('chart_1', ['promotion_kpis']),
|
|
467
|
+
('chart_2', ['daily_inorganic_ratio']),
|
|
468
|
+
('chart_3', ['daily_promotion_revenue']),
|
|
469
|
+
('chart_4', ['daily_promotion_discount']),
|
|
470
|
+
],
|
|
471
|
+
"client": [('chart_1', ['client_kpis']),
|
|
472
|
+
('chart_2', ['client_feature_predicted'])],
|
|
473
|
+
|
|
474
|
+
"dimension": [('chart_1', ['dimension_kpis']),
|
|
475
|
+
('chart_2', ['daily_dimension_values']),
|
|
476
|
+
('chart_3', ['daily_dimension_values']),
|
|
477
|
+
('chart_4', ['daily_dimension_values'])],
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
}
|