Metadata-Version: 2.1
Name: SuRFM
Version: 2.0.0
Summary: SuRFM is a Python package for conducting RFM (Recency, Frequency, Monetary) analysis of customers. It provides tools for segmenting customers based on their transaction behavior and identifying high-value segments.
Author: Artur Avagyan, Elen Galoyan, Hrag Sousani, Ina Karapetyan, Khoren Movsisyan
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: annotated-types
Requires-Dist: anyio
Requires-Dist: exceptiongroup
Requires-Dist: Faker
Requires-Dist: fastapi
Requires-Dist: greenlet
Requires-Dist: idna
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: pydantic
Requires-Dist: pydantic_core
Requires-Dist: python-dateutil
Requires-Dist: pytz
Requires-Dist: six
Requires-Dist: sniffio
Requires-Dist: SQLAlchemy
Requires-Dist: starlette
Requires-Dist: typing_extensions
Requires-Dist: tzdata
Requires-Dist: appnope
Requires-Dist: asttokens
Requires-Dist: certifi
Requires-Dist: charset-normalizer
Requires-Dist: click
Requires-Dist: comm
Requires-Dist: debugpy
Requires-Dist: decorator
Requires-Dist: executing
Requires-Dist: h11
Requires-Dist: httptools
Requires-Dist: importlib_metadata
Requires-Dist: ipykernel
Requires-Dist: ipython
Requires-Dist: jedi
Requires-Dist: jupyter_client
Requires-Dist: jupyter_core
Requires-Dist: matplotlib-inline
Requires-Dist: nest-asyncio
Requires-Dist: packaging
Requires-Dist: parso
Requires-Dist: pexpect
Requires-Dist: platformdirs
Requires-Dist: prompt-toolkit
Requires-Dist: psutil
Requires-Dist: ptyprocess
Requires-Dist: pure-eval
Requires-Dist: Pygments
Requires-Dist: python-dotenv
Requires-Dist: PyYAML
Requires-Dist: pyzmq
Requires-Dist: requests
Requires-Dist: stack-data
Requires-Dist: tornado
Requires-Dist: traitlets
Requires-Dist: urllib3
Requires-Dist: uvicorn
Requires-Dist: uvloop
Requires-Dist: watchfiles
Requires-Dist: wcwidth
Requires-Dist: websockets
Requires-Dist: zipp

# SuRFM: Surfing the Subscribers RFM

## Group 6 - Marketing Analytics Project for Streaming Services

### Project Objective

Our project aims to address the issue of declining customer retention and subscriber attrition in subscription-based companies, particularly in the context of streaming services. We propose the development of a Python package named SuRFM, leveraging RFM analysis to offer insights into behavior patterns, client segmentation, and their likelihood of churn.

Find our project on [PyPi](https://pypi.org/project/SuRFM/).

Read our documentation [here](https://arturavagyan2.github.io/MA_Group_Project/).

## How It Works

1. **Data Input**: The SuRFM package requires subscription data, including subscriber activity and transaction history. If you want to run the package on your data, please visit *csv_files/README.md* to understand how the database should be updated.
2. **Analysis**: The RFM model segments subscribers based on their recency, frequency, and monetary value contributions to the service.
3. **Insights and Actions**: Based on the analysis, SuRFM provides actionable insights for improving customer retention strategies.


## Step 1: Generate Data and Populate the Database

### 1. Data Generation Process

Navigate to the `db` folder within SuRFM. You'll find four files there. Begin by generating the data using the provided tools. Run the `save_to_csv.py` script to store the generated data in CSV format.

### 2. Database Construction

Execute the `schema.py` script to initialize the database. This action creates empty tables within `subscription_database.db`.

### 3. Data Population

To transfer the generated data from CSV files into the database, run the `basic_rfm.py` script. This step fills the tables in the database with the relevant information.

### BONUS: Using Flake8 for Code Quality Checking

Introduction

Flake8 is a powerful tool for ensuring code quality and adherence to PEP 8 style guidelines in Python projects. It combines several tools in one package, including PyFlakes, pycodestyle (formerly known as pep8), and McCabe.

- It is added in the `requirenments.txt`, yet you can install it with 

```bash
pip install flake8
```

- For this project, run the project using the command to run on the whole project and see the errors on the terminal

```bash
flake8 --exclude __init__.py 
```

- The path to file may be added in the end of the command if we need to run flake8 on specific part of the project

```bash
flake8 path/to/MA_GROUP_PROJECT/subdirectory/or/file
```
After this, with **red** the codes and explanations of the errors will be shown. Please check all of them and then push to the directory.
### Additional Notes:

- Make sure to have Python installed on your system.
- Ensure all dependencies are met before executing the scripts.
- For any issues or inquiries, feel free to reach out to the repository maintainers.
  
Have a great time exploring the possibilities of our package! 📊✨
