Skip to main content
Quarantined

This project has been quarantined by PyPI admins. It cannot be installed or modified until a security review is complete.


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.

Metadata

Release files for monkstools 0.16

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

Source distribution (sdist)

Source distribution for monkstools 0.16
File Size Uploaded Provenance Actions
monkstools-0.16.tar.gz 312.6 kB Without provenance Details for monkstools-0.16.tar.gz

Built distribution (wheel)

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

Total release size: 330.4 kB

Release files / monkstools-0.16.tar.gz

Download URL monkstools-0.16.tar.gz
Size 312.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7c7d9bbba79f29c7639cc54771a9d25c31211c15ae10bd0c0eab62fd77fb249c
BLAKE2b-256 checksum
How to use checksums
7fe9d683193009066fc7bb6a61391fa27e8ced972a7c784a161bc8c56dbc0a05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.0

Release files / monkstools-0.16-py3-none-any.whl

Download URL monkstools-0.16-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a227b8b35413280bcb82e3fd7744c93416a7d84ef138a574e7894a7842cda14
BLAKE2b-256 checksum
How to use checksums
16bb2da4cd717136da268c33016c8269cd5ce2cf58c071b4ea20f640bc4969e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.0

Security for monkstools 0.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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