Skip to main content

Analyze CX economics using NPS and revenue data.

Project description

cx_economics

cx_economics is a Python library designed to analyze the economics of customer experience (CX) using Net Promoter Score (NPS) and revenue data. It supports both B2C and B2B scenarios, providing insights into CX transitions and their financial implications.

Features

  1. Generate synthetic customer or account data with pre- and post-NPS scores and revenue.
  2. Compute Net Promoter Score (NPS) for pre- and post-periods.
  3. Calculate revenue metrics (average, median) for pre- and post-periods.
  4. Analyze customer transitions across NPS categories (Promoter, Passive, Detractor).
  5. Support for B2C and B2B survey types with appropriate data aggregation.

Installation

You can install cx_economics via pip:

pip install cx_economics

Quick Start

1. Import and Initialize the Library

from cx_economics import CXEconomics

# Initialize the CXEconomics class with a seed for reproducibility
cx = CXEconomics(seed=42)

2. Generate Sample Data

# Generate 1000 customer records for a B2C scenario
data = cx.generate_sample_data(num_customers=1000, b2b=False)
print("Sample Data:")
print(data.head())

3. Analyze CX Economics

# Analyze CX economics for a B2C survey
stats = cx.analyze_cx_economics(survey_type='B2C')
print("Analysis Statistics:")
print(stats)

4. Calculate Transition Statistics

# Calculate transition statistics
transitions = cx.get_transition_stats()
print("CX Transitions (DataFrame):")
print(transitions)

Use Cases

  1. Identify CX Trends: Compare pre- and post-NPS scores to track improvements or declines in customer satisfaction.
  2. Revenue Impact Analysis: Understand the financial implications of changes in customer loyalty.
  3. Transition Analysis: Gain insights into how customers move between loyalty categories and their associated revenue impact.
  4. Support for B2B Scenarios: Aggregate data at the account level for business-to-business CX analysis.

License

This library is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cx_economics-1.0.0.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file cx_economics-1.0.0.tar.gz.

File metadata

  • Download URL: cx_economics-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for cx_economics-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7cab998a2942fec53c470cf3f1f078a60e250a140ecfb62bf819db21bc7a13aa
MD5 ac50e366b91e8372bc41de9973de4cd0
BLAKE2b-256 a69e2253ef4c82e06cd7a8e76ea2a81fdceadbd5b12bd78e5a1932bf402d7b2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page