{"id":19020211,"url":"https://github.com/thanhloc81/rfm-model-project","last_synced_at":"2026-05-03T10:39:49.002Z","repository":{"id":247039743,"uuid":"824858411","full_name":"thanhloc81/RFM-MODEL-PROJECT","owner":"thanhloc81","description":"✨ Build a flow to deploy Segmentation evaluation through Python programming.","archived":false,"fork":false,"pushed_at":"2024-07-06T07:45:55.000Z","size":22402,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-02T00:25:23.677Z","etag":null,"topics":["customer-segmentation","numpy","pandas","python","rfm-analysis"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thanhloc81.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-06T06:26:10.000Z","updated_at":"2024-07-06T07:45:58.000Z","dependencies_parsed_at":"2024-07-06T08:52:11.692Z","dependency_job_id":null,"html_url":"https://github.com/thanhloc81/RFM-MODEL-PROJECT","commit_stats":null,"previous_names":["thanhloc81/rfm-model-project"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhloc81%2FRFM-MODEL-PROJECT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhloc81%2FRFM-MODEL-PROJECT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhloc81%2FRFM-MODEL-PROJECT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thanhloc81%2FRFM-MODEL-PROJECT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thanhloc81","download_url":"https://codeload.github.com/thanhloc81/RFM-MODEL-PROJECT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240064608,"owners_count":19742347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["customer-segmentation","numpy","pandas","python","rfm-analysis"],"created_at":"2024-11-08T20:16:07.814Z","updated_at":"2026-04-28T07:30:19.293Z","avatar_url":"https://github.com/thanhloc81.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RFM-MODEL-PROJECT\n Build a flow to deploy Segmentation evaluation through Python programming.\n\n ## Content\nRFM (Recency – Frequency – Monetary): is a part of Marketing Analysis and is used to analyze customer value, thereby helping businesses analyze each group of customers they have. From there, there are marketing campaigns or special care.\n ## Context\nSuperStore Company is a **global retail company** - Global. So the company has many customers.\nOn the occasion of Christmas and New Year, the Marketing Department wants to **run marketing campaigns** to thank customers who have supported the company over the past time. As well as exploiting customers who have the potential to become loyal customers. However, the Marketing Department has not yet been able to group each customer this year because the data set is too large to be processed manually like in previous years, so we asked the Data Analysis Department to assist in implementing a classification problem. Segment each customer to deploy each marketing program suitable for each customer group.\n\nThe Marketing Director also proposed using **the RFM model**, but in the past when the company was small, the team could calculate and classify it themselves using Excel. Currently, the amount of data is too large, so we want the Data Department to build a flow to deploy Segmentation evaluation through Python programming.\n\n## Step\n### 1. Explore Data Analysis (EDA)\n```python\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n# Load data\n\ndf = pd.read_excel('/content/ecommerce retail.xlsx', sheet_name='ecommerce retail')\nprint(df.head())\n\n# Check null \u0026 data type\ndf.info()\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/0027a43b-a369-4644-8227-1a35e55d260e)\n```python\ndf.describe()\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/fef6277c-5396-4a88-aba0-b3943d024d05)\n\nWe have a quick look at the first data set, the start date is **12/01/2010** and the end date is **12/09/2011**. However, the Quantity and UnitPrice columns are not correct because the smallest value is still negative. We will normalize this column below and this is some issues that should be solved:\n- CustomerID have null\n- Quantity \u003c 0\n- Unit price \u003c 0\n- UK transactions have nulls\n- The main columns that we should get: InvoiceNo, InvoiceDate, UnitPrice, CustomerID, (StockCode, Description)\n\n**Clean data**\n```python\n# Delete row have CustomerID null\ndf_copy = df.copy()\ndf_copy = df_copy.dropna(subset=['CustomerID'])\n\n# Delete row have Transaction Cancle\ndf_copy['InvoiceNo'] = df_copy['InvoiceNo'].apply(str)\ndf_copy['CustomerID'] = df_copy['CustomerID'].apply(str)\ndf_copy = df_copy.drop(df_copy[df_copy['InvoiceNo'].str.contains(\"C\")].index)\n\n# Convert UnitPrice and Quantity into positive values\ndf_copy = df_copy[df_copy['UnitPrice']\u003e0]\ndf_copy =  df_copy[df_copy['Quantity']\u003e0]\n\n# Replace UnitPrice = 0 using Mean\nmean_price = df_copy['UnitPrice'].mean()\ndf_copy['UnitPrice'] = df_copy['UnitPrice'].mask(df_copy['UnitPrice'] == 0, mean_price)\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/c8b929a8-b4c5-451e-b37f-74841a8e2d8b)\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/c5d2c1b4-cd87-4c9f-9721-d64160b3dd17)\n\n### 2. Creating RFM score\n```pthon\n# Calculated Recency Score\nmax_date = df_copy['InvoiceDate'].max() + pd.Timedelta(days=21)\nRecency = df_copy.groupby('CustomerID')['InvoiceDate'].max().reset_index()\nRecency['InvoiceDate'] = (max_date - Recency['InvoiceDate']) // pd.Timedelta(days=1)\nRecency = Recency.rename(columns = {'InvoiceDate':'Recency'})\n\n# Calculated Frequency Score\nFrequency = df_copy.groupby('CustomerID')['InvoiceNo'].nunique().reset_index()\nFrequency = Frequency.rename(columns = {'InvoiceNo':'Frequency'})\n\n# Calculated Monetary Score\ndf_copy['SubTotal'] = df_copy['Quantity']*df_copy['UnitPrice']\nMonetary = df_copy.groupby('CustomerID')['SubTotal'].sum().reset_index()\nMonetary = Monetary.rename(columns = {'SubTotal':'Monetary'})\n\n# Create RFM Table\nmerge_df = pd.merge(pd.merge( Recency, Frequency, on='CustomerID'), Monetary, on='CustomerID')\nprint(merge_df)\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/956086ac-317b-4108-9af1-13ef6e134c2e)\n\n```python\n# Calculated rfm scored for every customer\nmerge_df['R_score'] = pd.qcut(merge_df['Recency'], q=5, labels=list(range(5, 0, -1)))\nmerge_df['f_score'] = pd.qcut(merge_df['Frequency'].rank(method='first'), q=5, labels= range(1,6))\nmerge_df['M_score'] = pd.qcut(merge_df['Monetary'], q=5, labels=range(1,6))\nmerge_df['rfm_score'] = merge_df.apply(lambda row: str(row['R_score']) + str(row['f_score']) + str(row['M_score']), axis=1)\n\n# Create a table that will pair each customer with the appropriate segment.\ndf_rfm = pd.read_excel('/content/ecommerce retail.xlsx', sheet_name='Segmentation')\n\ndf_rfm['RFM Score'] = df_rfm['RFM Score'].str.split(',')\ndf_rfm = df_rfm.explode('RFM Score').reset_index(drop = True)\ndf_rfm['RFM Score'] = df_rfm['RFM Score'].str.strip()\ndf_rfm = df_rfm.rename(columns ={'RFM Score':'rfm_score'})\nnew_df=pd.merge(merge_df, df_rfm, how='left',on='rfm_score')\nprint(new_df)\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/c4a30232-e7ec-447c-ab3c-d6ed3ab7974b)\n\n### 3. Visualizations and Insights\n#### Overview\n```python\n# Overview\ncol_name = ['Recency','Frequency','Monetary']\nfig,axes = plt.subplots(1,3, figsize=(20,5))\n\nfor i, col in enumerate(col_name):\n  sns.distplot(new_df[col], ax =axes[i])\n  axes[i].set_title('Distribute of %s' %col)\n  mean_value = new_df[col].mean()\n  axes[i].text(0.5, 0.95, f'Mean of {col}: {mean_value:.2f}', horizontalalignment='center', verticalalignment='center', transform=axes[i].transAxes)\nplt.tight_layout()\nplt.show()\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/1142d173-bcfe-4157-b4f8-7c6ffc053257)\n\n- Of the three indicators, we see that Recency is the indicator that does not have too much difference between customer segments. **112 days** is the average value from the last purchase to the reporting date, and we see in the Recency chart that most new customers only made a purchase **21-100 days** before the reporting date. That shows the large purchasing power of customers in the last months of 2011.\n- In the remaining two indicators, there will be quite a **big difference between customer segments** because we observe that the two Monetary and Frequency charts are quite left-skewed.\n\n**Treemap RFM**\n```python\nfrom ctypes import alignment\nimport plotly.express as px\n# Segmentation by treemap\n\n# Set up color\nsegment_colors = {\n    'Champions': '#0450b4',\n    'Loyal': '#046dc8',\n    'Potential Loyalist': '#1184a7',\n    'New Customers': '#15a2a2',\n    'Promising': '#6fb1a0',\n    'Need Attention': '#b4418e',\n    'About To Sleep': '#d94a8c',\n    'At Risk': '#ea515f',\n    'Cannot Lose Them': '#fe7434',\n    'Hibernating customers': '#fea802',\n    'Lost customers': '#ffdd00',\n}\n# Summarize segment data\ntotal_customer = new_df['CustomerID'].count()\nsegment_df = new_df.groupby('Segment').agg({\n    \"Recency\":\"mean\",\n    \"Frequency\":\"mean\",\n    \"Monetary\":\"mean\",\n})\nsegment_df = segment_df.rename(columns = {'Recency':'avg_recency', 'Frequency':'avg_frequency', 'Monetary':'avg_monetary'})\nsegment_df['sum_monetary'] = new_df.groupby('Segment')['Monetary'].sum()\nsegment_df['percent_monetary'] = round((segment_df['sum_monetary']*100)/segment_df['sum_monetary'].sum(),2)\n\nsegment_df['count_customer'] = new_df.groupby('Segment')['CustomerID'].count()\nsegment_df['percent_customer'] = round((segment_df['count_customer']*100)/total_customer, 2)\nsegment_df.reset_index(inplace=True)\n\n# Treemap\nfig = px.treemap(segment_df[['Segment','count_customer','percent_customer']], path=['Segment'], values='count_customer', hover_data=['count_customer', 'percent_customer'], color='Segment', color_discrete_map=segment_colors)\nfig.update_layout(title_text=\"Treemap analyze customer segmentation\", title_x=0.5,title_y=0.95)\nfig.show()\n```\n![newplot](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/580dea5d-c377-484f-aa29-861ef9c70c15)\n\nCurrent situation of customer segmentation in the company:\n- The **Champions and Hibernating customer segments account for the largest proportion**, respectively 19.36% and 15.81% of the total 4339 customers.\n- The **lowest are the Promising and Cannot lose them** segments with the total proportion of the two segments being only 5% of the total.\n\nOverall, at the end of 2011, **the business situation of the enterprise was quite good with a large number of customers in the Champions, Loyal, Potential Loyal segments.** These are the loyal segments that bring the highest value to the enterprise. Companies are investing significantly in these customer segments.\n\nHowever, the customer segments Hibernating (hibernation), About to sleep, At risk (risk) and Lost customer also account for a high proportion as we see that this group accounts for **approximately 40% of the total number of customers. This is a group of customers who have purchased the company's products but have recently or gradually disappeared for a long time. Shows 2 things:\n\n- Businesses **have neglected implementing effective care programs for customers who haven't made purchases in a while**, instead prioritizing customer segments that provide high value\n- The company's products have gone through a period of \"losing form\" or have become extremely attractive as before, also known as out of trend with the above customers, causing them to leave.\n\nMoreover, we see that the company's approach to new and potential customers such as the two customer segments **New Customer and Promising is not good**. This will make it difficult for them to expand their current customer base and gradually lose opportunities in the new market that is constantly developing.\n\n#### Segment Charateristics\n```python\n# Calculate point each segment\nsegment_df['rank_percent_monetary'] = segment_df['percent_monetary'].rank(ascending=True)\nsegment_df['rank_percent_customer'] = segment_df['percent_customer'].rank(ascending=True)\nsegment_df['rank_avg_recency'] = segment_df['avg_recency'].rank(ascending=False)\nsegment_df['rank_avg_frequency'] = segment_df['avg_recency'].rank(ascending=True)\nsegment_df['rank_avg_monetary'] = segment_df['avg_monetary'].rank(ascending=True)\nsegment_df['total_rank'] = segment_df['rank_percent_monetary'] + segment_df['rank_percent_customer'] + segment_df['rank_avg_recency'] +  segment_df['rank_avg_frequency'] + segment_df['rank_avg_monetary']\nsegment_df = segment_df.sort_values(by='total_rank', ascending=False)\n\n# Bar chart show total point\nplt.figure(figsize=(16,5))\nsns.barplot(x=segment_df['Segment'],y=segment_df['total_rank'], data=segment_df, palette=segment_colors, errorbar=None, order =segment_df['Segment'])\nplt.gca().set_xlabel('')\nplt.title('Total rank point')\nplt.xticks(rotation=45)\nplt.show()\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/209b6c8f-7317-4a4c-90ec-655eb18fcd77)\n\n```python\n# Distribution of averate each segment\ncol_name = ['avg_recency', 'avg_frequency','avg_monetary']\n\nsegments_to_exclude = ['']\nfig,axes = plt.subplots(1,3, figsize=(24,5))\n\nfor i, col in enumerate(col_name):\n    filtered_df = segment_df[~segment_df['Segment'].isin(segments_to_exclude)]\n    sns.barplot(x=segment_df[col],y='Segment', data=filtered_df, palette=segment_colors, orient='h', errorbar=None, order =segment_df['Segment'], ax =axes[i])\n    axes[i].set_title('Distribution of %s' % col)\n    for index, value in enumerate(segment_df[col]):\n      axes[i].text(value, index, str(round(value, 2)), ha='left', va='center')\n    axes[i].set_xlim(0, segment_df[col].max() * 1.2)\n\nplt.tight_layout()\nplt.show()\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/69532ea9-2131-4ecb-8a82-f03237ea581a)\n\nWe use the **ranking method** to rate each customer segment on the following factors: total value, total number of customers, average monetary value, average frequency value and average recency value. Then use that ranking to calculate a score for each customer segment on a scale of 1-11 to evaluate the importance and determine the nature of the company's current customer segments.\n\n- The customer segments **Champions and Loyal** will be the two segments that the customer appreciation marketing campaign should target because these are the most loyal and valuable customers for the company with an average total value of **6712.97 and 2340.97** respectively and the most frequent purchases with **12 average orders for Champion and 5 orders for Loyal customers** . As we can see in the chart above, the two segments have average Recency, Frequency and Monetary indexes that are superior to the other segments. The total_rank score is also the highest, showing the current importance of these two customer files to the company.\n  \n- The following segments, if calculated by total_rank score, such as **At risk, Hibernating, Need Attention, Potential Loyalist and Cannot lose them** are high potential segments that need attention and strong enough strategies to pull them up to more valuable segments. These are the segments that we should focus on now to turn them into loyal customers.\n  \n- The customer segments ranked at the bottom such as **Lost customer, Promising, About to sleep and New customer** are medium - low potential segments because firstly, the number of customers in these segments of the company is quite low, with weak purchasing power or have left the business. The reason for the two Promising and New customer segments is that they have just learned about the company, and are still in the experience stage. As for the two segments Lost customer and About to sleep, the reason is because they are no longer \"interested\" in the products, and seem to have almost left the company.\n\n#### Which segments have the best potential to convert loyal customers?\nAs analyzed above, the segments **At risk, Hibernating, Need Attention, Potential Loyalist and Cannot lose them** are high potential segments that need attention to convert them into Loyal customers. So what to pay attention to, what marketing programs to use as well as which segment has the highest potential to convert into Loyal customers will have the following answer.\n\n```python\nimport math\ntotal_revenue=segment_df['sum_monetary'].sum()\n\ndef get_customer(segment):\n    num_customer = round(0.3 * (new_df['Segment'] == segment).sum(),0)\n    delta_growth =  segment_df[segment_df['Segment'] == 'Loyal']['avg_monetary'].sum()- segment_df[segment_df['Segment'] == segment]['avg_monetary'].sum()\n    growth_revenue = num_customer*delta_growth\n    return growth_revenue\n\ndef growth(total_revenue, growth_revenue):\n    total_revenue=segment_df['sum_monetary'].sum()\n    percent_growth = growth_revenue*100/total_revenue\n    return percent_growth\n\n# Calculate revenue growth value from each segment\nsegments = ['At Risk', 'Hibernating customers', 'Need Attention', 'Potential Loyalist', 'Cannot Lose Them']\ngrowth_revenues = [get_customer(segment) for segment in segments]\n\n# Calculate %revenue growth value from each segment\ntotal_revenue = segment_df['sum_monetary'].sum()\npercent_growths = [growth(total_revenue, growth_revenue) for growth_revenue in growth_revenues]\n\n# Draw chart \nplt.figure(figsize=(18, 6))\nplt.subplot(1, 2, 2)\nplt.bar(segments, percent_growths, color='lightgreen')\nplt.xlabel('Segments')\nplt.ylabel('Percent Growth')\nplt.xticks(rotation=45)\nplt.title('Percent Growth by Segment')\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/5df95b9f-702b-4f9f-85c6-4958d6eb4640)\n\n- The chart above shows the growth of revenue if the company can **convert 30% of the customer files** of segments such as At risk, Hibernating, Need Attention, Potential Loyalist and Cannot lose them into the Loyal customer segment. We see that with **more than 4% and nearly 3% growth** for total revenue if the two segments **Hibernating and Potential Loyalis** can be converted to Loyal, it shows that the above two segments are extremely potential and need to be focused on the most in the upcoming campaign.\n\n- **With the Hibernating segment**, they are customers who have not purchased for a long time but have previously accessed the company's products with an average purchasing power of 1.56 orders and an average value of 410.59. Therefore, campaigns aimed at this customer segment can somehow attract them to buy again as soon as possible, such as special promotions for customers who have returned to buy after a long time. In addition, it is necessary to find out the reasons why they leave the company to improve the product or service to attract them to buy again.\n  \n- **With the Potential Loyalist segment**, they are recent buyers quite often (average 2.52 purchases and the average last day of purchase is 47 days). However, their purchasing power is not strong, as shown by the low order value of only $542.6. Therefore, campaigns to convert this customer segment can increase the value of each of their purchases, such as applying the more you buy, the cheaper it is or applying a spending threshold to encourage them to buy more. In addition, it is possible to promote higher value products to this customer segment so that they can spend more.\n\n#### How is marketing stragery to Champions and Loyal segments?\nWe already know that the main target for the upcoming loyalty marketing plan is customers in the two main segments, Champions and Loyal. However, to be able to design customer loyalty programs that require more than that, we cannot give the same gratitude to all customers in these two segments. Therefore, to support the gratitude of these loyal customers more specifically, customer segmentation has been carried out. \n\nWith the output goal of identifying additional Gold, Silver and Bronze customer files, the company will further evaluate the characteristics of these two customer segments, optimizing upcoming customer loyalty programs.\n\n```python\nlabel_colors = {'Gold': 'gold', 'Silver': 'silver', 'Bronze': 'peru'}\n\nsegments_to_include = ['Champions', 'Loyal']\nsegment_detail= new_df[new_df['Segment'].isin(segments_to_include)]\nsegment_detail['R_score'] = pd.qcut(segment_detail['Recency'], q=3, labels=list(range(3, 0, -1)))\nsegment_detail['f_score'] = pd.qcut(segment_detail['Frequency'].rank(method='first'), q=3, labels= range(1,4))\nsegment_detail['M_score'] = pd.qcut(segment_detail['Monetary'], q=3, labels=range(1,4))\nsegment_detail['rfm_score'] = segment_detail.apply(lambda row: str(row['R_score']) + str(row['f_score']) + str(row['M_score']), axis=1)\n\nlabels = []\n\nfor value in segment_detail['rfm_score']:\n    if str(value).count('3') == 2:\n        labels.append('Gold')\n    elif str(value).count('1')==2:\n        labels.append('Bronze')\n    else:\n      labels.append('Silver')\n\n# Add new conlumn label into Data Frame\nsegment_detail['Label'] = labels\nlabel_loyal_customer = segment_detail.groupby('Label').agg({\n    \"Recency\" : \"mean\",\n    \"Monetary\" : \"mean\",\n    \"Frequency\" : \"mean\",\n})\nprint(label_loyal_customer)\n\n# Calculate the number of occurrences of each label\nlabel_counts = segment_detail['Label'].value_counts()\n\nplt.figure(figsize=(8, 6))\nplt.pie(label_counts, labels=label_counts.index, autopct='%1.1f%%', startangle=140, colors=[label_colors[label] for label in label_counts.index])\nplt.title('Distribution of Labels')\nplt.title('Distribution of Labels')\nplt.axis('equal')\nplt.show()\n\n# Create a sub-DataFrame containing the occurrence counts of each label by segment\nlabel_counts_by_segment = segment_detail.groupby(['Segment', 'Label']).size().unstack(fill_value=0)\n\n# Draw a stacked column chart\nplt.figure(figsize=(10, 6))\nbottom_values = np.zeros(len(segment_detail['Segment'].unique()))\n\nfor label in label_counts_by_segment.columns:\n    plt.bar(label_counts_by_segment.index, label_counts_by_segment[label], label=label, bottom=bottom_values, color=label_colors[label])\n    bottom_values += label_counts_by_segment[label]\n\nplt.xlabel('Segments')\nplt.ylabel('Counts')\nplt.title('Stacked Bar Chart by Segment and Label')\nplt.legend(title='Labels')\nplt.show()\n```\n![image](https://github.com/thanhloc81/RFM-MODEL-PROJECT/assets/151768013/bee951ee-65a0-4a2d-a7a1-fa2295e2869a)\n\n- After labeling and classifying three more customer groups to reward in the Champions and Loyal groups. We observe that only **17.1% of customers reach the Gold level** - the best gift or incentive level in the upcoming customer reward period with a purchase amount of up to nearly 8000 and approximately 13 purchases.\n\n- **Next, accounting for more than half are Silver customers** with a purchase value of approximately 6000 bold text with an average of 10 purchases. And finally **Bronze level accounts for nearly 1/4** with an average purchase value of 1700 and more than 4 purchases.\n\n- In the stacked column chart below, we see that the majority of Gold customers will belong to the Champions segment and this is also the most VIP, most loyal and best customer file of our company at present.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanhloc81%2Frfm-model-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthanhloc81%2Frfm-model-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthanhloc81%2Frfm-model-project/lists"}