Donations Analysis on Polar-bar Chart
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    Where to focus a marketing campaign?

    📖 Background

    You are a data analyst at a crowdfunding site. For the next quarter, your company will be running a marketing campaign. The marketing manager wants to target those segments that have donated the most in the past year. She turned to you to help her with her upcoming meeting with the CEO.

    💾 The data

    You have access to the following information:

    Historic crowdfunding donations
    • "category" - "Sports", "Fashion", "Technology", etc.
    • "device" - the type of device used.
    • "gender" - gender of the user.
    • "age range" - one of five age brackets.
    • "amount" - how much the user donated in Euros.
    import pandas as pd
    import plotly.express as px
    df = pd.read_csv('./data/crowdfunding.csv')
    df.head()

    💪 Challenge

    Create a single visualization that the marketing manager can use to explore the data. Include:

    1. What are the top three categories in terms of total donations?
    2. What device type has historically provided the most contributions?
    3. What age bracket should the campaign target?

    🧑‍⚖️ Judging criteria

    This is a community-based competition. The top 5 most upvoted entries will win.

    The winners will receive DataCamp merchandise.

    ✅ Checklist before publishing

    • Rename your workspace to make it descriptive of your work. N.B. you should leave the notebook name as notebook.ipynb.
    • Remove redundant cells like the judging criteria, so the workbook is focused on your answers.
    • Check that all the cells run without error.

    ⌛️ Time is ticking. Good luck!

    0) Get to know the data (without any visualizations)

    print('DataFrame has', df.shape[0], 'rows &', df.shape[1], 'colunms')

    Are there any missing values?

    df.isna().sum()

    How much total Euros were donated?

    df.amount.sum()

    Are there any donation amounts with 0 or negative values ? if so, I will drop them

    if df.amount.min() <=0.0:
        print('There are invalid values for amount column !')
    else:
        print('All donations have valid amounts')