<jupyter_start><jupyter_text>Exploratory Data Analysis<jupyter_code>plt.figure(figsize=(15,8))
sns.countplot(retail['Allocation Status'],hue='Dealer Name', data=retail)
plt.title('Allocations of Orders')
plt.show()<jupyter_output><empty_output><jupyter_text>There are two ways of buying a window from a company- Dealer or Direct. As we can see that there are a lot of dealer buy in every dealer present in dealer block. The maximum allocation for dealer went to 'Windoors' followed by 'Sunbird'.<jupyter_code>onlydealers = retail[retail['Dealer Name'] != 'Direct'] #we need to compare sales made by dealer so, we remove direct sales from the table
plt.figure(figsize=(15,8))
sns.countplot(x='Dealer Name', hue='Status', data=onlydealers)
plt.title('Status of Orders with Dealers')
plt.show()
temp=onlydealers.groupby(['Dealer Name','Status']).count()['Month']
temp<jupyter_output><empty_output><jupyter_text>The winning status for allocation of dealer is best for 'Sunbird'. Eventhough windoor has the maximum allocation, the conversion is very poor. ITP has not been able to conver single allocation.<jupyter_code>plt.figure(figsize=(15,8))
sns.countplot(x='Type of Project', hue='Dealer Name', data=onlydealers)
plt.title('Type of Project Given')
plt.show()<jupyter_output><empty_output><jupyter_text>There are two types of project- renovation and new construction. The project is assign to all the dealers with Windoor has the highest and ITP has lowest number of projects. However, Renovation minimum is ITP and New construction minimum is Rajtechnis<jupyter_code>plt.figure(figsize=(15,8))
sns.countplot(x='Type of Project', hue='Status', data=onlydealers)
plt.title('Type of Project Given')
plt.show()<jupyter_output><empty_output><jupyter_text>The success rate in both type of projects are low and similar<jupyter_code>plt.figure(figsize=(15,8))
sns.countplot(x='No of Windows',hue='Status', data=onlydealers)
plt.show()<jupyter_output><empty_output><jupyter_text>Majority of the order made is for the windows between 1 to 5 and also it has the hisghest success rate<jupyter_code>plt.figure(figsize=(15,7))
sns.countplot(x='Source', data=onlydealers)
plt.show()<jupyter_output><empty_output><jupyter_text>A lot of a order made through internet, so for a company it is important to increase its presence online and inverst on online promotions<jupyter_code>onlydealers['Third Action-Quote Given']=onlydealers['Third Action-Quote Given'].replace('YES','yes')
onlydealers['Second Action-Call Status'].fillna('Not Submitted',inplace=True)
onlydealers['Third Action-Quote Given'].fillna('no',inplace=True)
temp3=onlydealers.groupby(['Dealer Name', 'First Action-Call Status','Second Action-Call Status','Third Action-Quote Given',' Order Recd\Lost ']).count()['Month']
temp4=pd.DataFrame(temp3).reset_index()
temp4.columns = ['Dealer Name', 'First Action-Call Status', 'Second Action-Call Status',
       'Third Action-Quote Given', ' Order Recd\Lost ', 'Counts']
temp4
plt.figure(figsize=(15,8))
sns.barplot(x='Dealer Name', y='Counts', hue=' Order Recd\Lost ', data=temp4)
plt.title('Dealer Peformance with respect to number of clients')
plt.show()<jupyter_output><empty_output><jupyter_text>This graph represent each dealer and what is happening with the orders they received. Only purple line is showing the number of customers they are able to get the order others are the different reasons that dealer lost that client. Insight (in term of clients converted):- ITP is not able to convert its single client and lost them to compeititor, company need to warn this dealer and help them realize the potential and why they are loosing- OXXO has received number of orders but not able to convert most of them. It has lost their clients to competitor. Eventhough, this dealer was able to convert few of the clients, the ratio of success to fail is still very low- Pearlson has lost clients due to all the reasons stated on the board. This dealer is showing potential but still the number lost is far more than success- Rajtechnis is either losing the customer to UPVC oor to aluminium. We need to find out the problem this dealer is facing towards making this sale. - Sunbird has the highest sucess rate out of all the dealers in term of number of clients converted. - Windoor has been alloted a highest number of customers but loosing a lot in comparision to others- Winfratech has low allocation and low conversion.<jupyter_code>onlydealers['sales'] = onlydealers['Order Val. (Rs. Lac)'] * onlydealers['Order QTY']
plt.figure(figsize=(15,8))
sns.barplot(x='Dealer Name', y='sales', data=onlydealers)
plt.title('Dealer performance with respect to sales')
plt.show()<jupyter_output><empty_output><jupyter_text>This graph represent the sales made by each dealers in lacs. Insight (on the basis of sales):- Windoor is providing the highest number of sales followed by OXXO and Pearlson- Eventhough Windoor has lost many clients but the retained clients has high value transaction, same thing apply for OXXO and Pealson- Sunbird has the highest success rate in conversion of clients but most of them are small value client<jupyter_code>temp6 = temp4[temp4[' Order Recd\Lost '] == 'Order Received'].loc[:,['Dealer Name','Counts']]
temp6.columns = ['Dealer Name', 'Converted']
temp6
onlydealers.sales.fillna(0, inplace=True)
temp5=onlydealers.groupby('Dealer Name').agg(['sum','count'])['sales'].reset_index()
temp5['sales per client'] = temp5['sum']/temp5['count']
temp5=temp5.sort_values('sales per client', ascending=False)
temp5
temp7=temp5.merge(temp6, on='Dealer Name', how='outer')
temp7.Converted.fillna(0, inplace=True)
temp7['conversion_rate'] = temp7['Converted']/ temp7['count']
temp7[['Dealer Name','sum','count','Converted', 'conversion_rate','sales per client']]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10735826296743065, 'fraction_numerical': 0.009305531621575047, 'mean_word_length': 6.6569920844327175, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '40459', 'license': 'MIT', 'n_tokens_mistral': 1794, 'n_tokens_neox': 1701, 'n_words': 636, 'path': 'KrishnaPrasanthVenkatesu/Business Analysis.ipynb', 'repo_name': 'Aujasvi-Moudgil/EDA-Miscellaneous-Data', 'size': '5803'}