Skip to main content

businessmodels package made by Business Brio team members.

Table of Contents

Introduction

This python package has several modules to work for data analysis.

Installation

Following code is to install package.

pip install businessmodels

DOCUMENTATION

businessmodels is a helpful package in data science. It contains several modules to get desired analysis output. Most of the modules are dedicated to business analysis purposes. You can find the documentation here

  • Customer Segmentation

Data Overview: image

Function Call - Perform customer segmentation using the 'businessmodels' library and 'customersegmentation.cust_seg' is a function in the library, so it takes the 'df' DataFrame and a date (Ex.- '2023-04-02') as arguments.

from businessmodels import customersegmentation
Segments = customersegmentation.cust_seg(df, '2023-04-02')
Customer_rfm,active_customer_segments,inactive_customers,segments_summary = Segments.Daily()

image By changing the Segments.daily to Weekly, Monthly, Quarterly get others segments customers.

  • Price Elasticity of Products

Data Overview: image

Function Call - Calculate price elasticity using the 'pricing' function from the 'price_elasticity' module. Get the results of price elasticity, separating products into different categories

  • 'Elastic_Products' are products with elastic demand
  • 'Unit_Elastic_Products' are products with unitary elastic demand
  • 'Inelastic_Products' are products with inelastic demand
from businessmodels import price_elasticity
Separated = price_elasticity.pricing(df)
Elastic_Products,Unit_Elastic_Products,Inelastic_Products = Separated.price_elasticity()

image

  • Recommendation Engine

Data Overview: image

Function Call - Call the 'recommendation' method from the recommendation_engine module and pass the 'df' DataFrame as an argument than Call the 'final_recomendations' method on the 'run' object to generate the list of recommended products. Print or use the 'product_list' variable, which contains the recommended products.

from businessmodels import recommendation_engine
run = recommendation_engine.recommendation(df)
product_list = run.final_recomendations()

image

  • GET SLA Module

Data Overview: The data used to demonstrate this module is basically a sales data having time taken to contact lead for the very first time units in minutes(Lead2FirstIntr_datedifference_Minute), Sale non-sale column(saleflag) with 0 referring to non-sale and 1 referring sale, date of order(order_date), lead generation date(lead_date), number of interactions done by sales team after the generation of lead(interactions) and difference of date between order date and lead generation date(Lead_to_Sale_diff).

The module needs to be imported from the businessmodels package using the following line of code Function Call -

from businessmodels import get_sla
sla_determination = get_sla.SLADetermination(df)
sla_determination.filter_and_convert_dates(st,et)
sla_determination.calculate_lead_to_sale_diff()
x,y = sla_determination.categorize_lead_to_sale_calculate()
  • GET SLA DETERMINATION Module

Data Overview: The data used to demonstrate this module is basically a sales data having time taken to contact lead for the very first time units in minutes(Lead2FirstIntr_datedifference_Minute), Sale non-sale column(saleflag) with 0 referring to non-sale and 1 referring sale, date of order(order_date), lead generation date(lead_date).

The module needs to be imported from the businessmodels package using the following line of code Function Call -

from businessmodels import sla_determine
column = "Required Column Name"
sla_check = sla_determine.SLA_Determination(df, column)
a,b,c,d = sla_check.calculate_sla(st, et)
  • Performance Rank

Function Call -

from businessmodels import performance_rank

Data where columns are as follow: column1: Individual associate id(s) or name. column2: Saleflag or success of individual where 0 is unfulfiled (unsold) and 1 is fulfiled (sold). column3: Market type containing two labels for each affiliate. For example- urban_market and rural_market It contains following methods:

  • feed_data(data, percentage, column1, column2, column3): Feed the dataframe, set percentage to get interpretetion, name of first column (e.g. "salesman_id"), name of second column (e.g. "saleflag"), name of third column (e.g. "market_type") N.B: percentage will help to classify top n% and bottom n% associates for each market type according to their performance. Create an instance with the feed_data method.
  • interpret(): Call this method on the created feed_data instance. This will return a dictionary containing interpreted performance result of each associate.
  • output_table(): Call this method on the early created instance of feed_data and get a dictionary containing mathematical results (salesman_id, actual_fulfiled, actual_unfulfiled, expected fulfiled, chi fulfiled value, sale percentage)

The result is generated by using chi square method for each salesman and the "sale percentage" is nothing but the percentage of fulfiled cases from the total amount of opportunities (fulfiled and unfulfiled) one associate got.

Good or bad performer in the interpreted dictionary is distinguished by observing each associate's actual fulfiled and expected fulfiled amount. If expected fulfiled is more than actual fulfiled then the associate is labeled as bad. If expected fulfiled is less than actual fulfiled then the associate is labeled as good.

  • SAM From Voronoi Tessellation

Function Call -

from businessmodels import SAMfromVTess

Extraction of Serviceable Addressable Market(SAM) for a business unit/entity (DMU for DEA Models) by taking inputs for GIS coordinates for the specifics business unit's catchment area as received after running Voronoi Tessellation.

MAIN FEATURES

  • performance rank model (model name: performance_rank)
    • Get affiliates' ranked table on basis of their performance and their interpreted result. This module's documentation is here:
  • customer segmentation model (model name: customersegmentation)
  • to compute Price Elasticity of Products (model name: price_elasticity)
  • recommendate a product to a customer (model name: recommendation_engine)
  • get sla model (model name: get_sla)

CONTRIBUTORS

Gautam Banerjee, Bhargab Ganguli, Shuvadeep Maity, Manas Roy, Arnab Basak, Ayan Chakraborty, Riddhiman Syed, Tanuka Chattaraj, Anasua Ghosh .

LICENSE

It is licensed under OSI approved MIT open license.

Metadata

Release files for businessmodels 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for businessmodels 0.3.0
File Size Uploaded
businessmodels-0.3.0.tar.gz 28.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for businessmodels 0.3.0
File Interpreter ABI Platform
businessmodels-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.3 kB

Release files / businessmodels-0.3.0.tar.gz

Download URL businessmodels-0.3.0.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
784cec35ef767904b2f5e71054f3c025ba8f44b181bcc4b754618c7d71306ba6
BLAKE2b-256 checksum
How to use checksums
24a47424c8eda30c76c701294fe54847b70edda8dbe420bb0a8351d9d0c7f42d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.6

Release files / businessmodels-0.3.0-py3-none-any.whl

Download URL businessmodels-0.3.0-py3-none-any.whl
Size 27.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae014004dd21dc4d98e17bc9b851f8ecb1075122c0ada63be18c0b37f1518cbf
BLAKE2b-256 checksum
How to use checksums
55827277128827ea9f67aa2a2130367acbb72f1feadeb5b54e9485782d1bf502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page