{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# ezplot Tutorial\n", "Welcome to the Plot-Hero package documentation! This package provides an easy-to-use function, plot_histogram, for creating beautiful visualizations of your data. Here, we’ll walk through the functionality with a fun, real-life example starring Alex, a budding data scientist on a quest to uncover insights in marketing data." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Alex's Data Visualization Quest\n", "Alex, an intern at a marketing firm, was tasked with analyzing campaign data to understand what works and what doesn’t. However, Alex knew that numbers alone weren’t enough—they needed visualizations to make their insights shine. That’s where Plot-Hero came to the rescue with the mighty plot_histogram function!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Step 1: Setup\n", "Alex began their journey by loading the marketing dataset, which contained details about campaign types, success rates, and even the channels used to target specific audiences." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.1.0\n" ] } ], "source": [ "import dsci_524_ezplot\n", "\n", "print(dsci_524_ezplot.__version__)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from dsci_524_ezplot.plot_histogram import plot_histogram\n", "from dsci_524_ezplot.plot_line import plot_line\n", "from dsci_524_ezplot.plot_scatterplot import plot_scatterplot\n", "from dsci_524_ezplot.plot_heatmap import plot_heatmap" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "
| \n", " | Campaign_ID | \n", "Company | \n", "Campaign_Type | \n", "Target_Audience | \n", "Duration | \n", "Channel_Used | \n", "Conversion_Rate | \n", "Acquisition_Cost | \n", "ROI | \n", "Location | \n", "Language | \n", "Clicks | \n", "Impressions | \n", "Engagement_Score | \n", "Customer_Segment | \n", "Date | \n", "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", "1 | \n", "Innovate Industries | \n", "Men 18-24 | \n", "30 days | \n", "Google Ads | \n", "0.040000 | \n", "$16,174.00 | \n", "6.290000 | \n", "Chicago | \n", "Spanish | \n", "506 | \n", "1922 | \n", "6 | \n", "Health & Wellness | \n", "2021-01-01 | \n", "|
| 1 | \n", "2 | \n", "NexGen Systems | \n", "Women 35-44 | \n", "60 days | \n", "Google Ads | \n", "0.120000 | \n", "$11,566.00 | \n", "5.610000 | \n", "New York | \n", "German | \n", "116 | \n", "7523 | \n", "7 | \n", "Fashionistas | \n", "2021-01-02 | \n", "|
| 2 | \n", "3 | \n", "Alpha Innovations | \n", "Influencer | \n", "Men 25-34 | \n", "30 days | \n", "YouTube | \n", "0.070000 | \n", "$10,200.00 | \n", "7.180000 | \n", "Los Angeles | \n", "French | \n", "584 | \n", "7698 | \n", "1 | \n", "Outdoor Adventurers | \n", "2021-01-03 | \n", "
| 3 | \n", "4 | \n", "DataTech Solutions | \n", "Display | \n", "All Ages | \n", "60 days | \n", "YouTube | \n", "0.110000 | \n", "$12,724.00 | \n", "5.550000 | \n", "Miami | \n", "Mandarin | \n", "217 | \n", "1820 | \n", "7 | \n", "Health & Wellness | \n", "2021-01-04 | \n", "
| 4 | \n", "5 | \n", "NexGen Systems | \n", "Men 25-34 | \n", "15 days | \n", "YouTube | \n", "0.050000 | \n", "$16,452.00 | \n", "6.500000 | \n", "Los Angeles | \n", "Mandarin | \n", "379 | \n", "4201 | \n", "3 | \n", "Health & Wellness | \n", "2021-01-05 | \n", "