Skip to main content

Tools for the Monks advertising platform

Project description


monkstools: Advertising Delivery ROI Analysis Framework

monkstools is a Python module crafted for a streamlined analysis and visualization of advertising Return on Investment (ROI) across different platforms. This guide offers a concise and clear walkthrough to help you utilize its features effectively.

Overview

  • What is it?
    A template Python framework to analyze and visualize the ROI for product advertising across multiple platforms.

  • Who is it for?
    Programmers, data analysts, and professionals aiming to evaluate advertising ROI.

  • Usage Context:
    While designed for ideation and collaboration, remember that real-world applications would require extensive model training and real data.

Getting Started

1. Installation

Before using monkstools, ensure you have it installed. If not, you can do so using pip:

pip install monkstools

2. Initialize the Framework

Once installed, initiate the ROICalculator to automatically set up both the ProductPreference and TransmissionCost classes.

from monkstools.roi_calculator import ROICalculator  

preference_file = 'path_to_preference_file.csv'
cost_file = 'path_to_cost_file.csv'
roi_calculator = ROICalculator(preference_file, cost_file)

3. Define Products & Platforms

Specify the products and platforms you wish to analyze:

products = ['Example Product 1', ...]
platforms = ['Example Platform 1', ...]

4. Visualize ROI Matrix

Run the following to compute and showcase the ROI matrix:

ROICalculator.display_roi_matrix(roi_calculator, products, platforms)

5. Debugging

For detailed insights or debugging, enable verbose mode:

# For instance:
roi_calculator.calculate(product_name='Example Product 1', platform_name='Example Platform 1', verbose=True)

Hands-On Example

To provide a clearer understanding, here's a complete example using the framework:

import pkg_resources
import matplotlib.pyplot as plt
from monkstools.roi_calculator import ROICalculator  

def test_display_roi_matrix():

    # Specify the paths to your data files
    preference_file = pkg_resources.resource_filename('monkstools', 'd4_data_map_product_costomerType.csv')
    cost_file = pkg_resources.resource_filename('monkstools', 'd3_data_map_delivery_cost_media.csv')

    # Initialize the calculator with the provided data
    roi_calculator = ROICalculator(preference_file, cost_file)

    # Define the products and platforms for analysis
    products = [
        'Toyota Corolla', 'Toyota RAV4', 'Toyota Camry', 'Toyota Land Cruiser', 'Toyota Hilux', 
        'Toyota Prius', 'Toyota Tacoma', 'Toyota Highlander', 'Toyota Sienna', 'Toyota 4Runner'
    ]
    platforms = [
        'Youtube', 'Facebook', 'WhatsApp', 'Instagram', 'WeChat', 'TikTok', 'QQ', 'Weibo', 'Twitter', 
        'LinkedIn', 'Snapchat', 'Pinterest', 'Reddit', 'Telegram', 'LINE', 'Viber', 'IMO', 'Zalo', 'VK', 'Odnoklassniki'
    ]

    # Display the ROI matrix
    roi_calculator.display_roi_matrix(products, platforms) 

    # Post-execution: Verify the chart manually or check the "ROI_Comparison.png" file
    # Optionally, automate assertions based on expected outcomes

if __name__ == "__main__":
    test_display_roi_matrix()
    print("Test executed. Please verify the output chart.")

Run the above script to visualize the ROI across various platforms for the specified products. Ensure you adjust the paths to your data files accordingly.


Documentation updated and compiled by Xiaowen Kang, 2023.8.24.

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

monkstools-0.16.tar.gz (312.6 kB view details)

Uploaded Source

Built Distribution

monkstools-0.16-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file monkstools-0.16.tar.gz.

File metadata

  • Download URL: monkstools-0.16.tar.gz
  • Upload date:
  • Size: 312.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for monkstools-0.16.tar.gz
Algorithm Hash digest
SHA256 7c7d9bbba79f29c7639cc54771a9d25c31211c15ae10bd0c0eab62fd77fb249c
MD5 208611208cc3b21c8be4f0f8b1c8602f
BLAKE2b-256 7fe9d683193009066fc7bb6a61391fa27e8ced972a7c784a161bc8c56dbc0a05

See more details on using hashes here.

Provenance

File details

Details for the file monkstools-0.16-py3-none-any.whl.

File metadata

  • Download URL: monkstools-0.16-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.0

File hashes

Hashes for monkstools-0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 9a227b8b35413280bcb82e3fd7744c93416a7d84ef138a574e7894a7842cda14
MD5 19d6f1668be67722d36016c8a435bb8f
BLAKE2b-256 16bb2da4cd717136da268c33016c8269cd5ce2cf58c071b4ea20f640bc4969e7

See more details on using hashes here.

Provenance

Supported by

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