Individual User Windfall: Facebook, Inc. Consumer Privacy User Profile Litigation
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner
    import pandas as pd
    import numpy as np
    
    users = 240000000
    penalty = 725000000
    avail_money = 543700000
    fb_val = 544750000000
    
    penalty_pct = (penalty/fb_val) * 100
    
    penalty_pct

    Penalty is 0.13% of Meta's Market Cap Value as of 4/21/23

    avail_money/penalty * 100
    def payout(pct_users):
        if pct_users == 0:
            return 0
        
        user_claims = (pct_users / 100) * users
        
        return np.around(avail_money/user_claims, 2)
    
    def formatted_money(x):
        return "${:.2f}".format(x)
    
    def tot_users(pct_users):
        return (pct_users / 100) * users
    
    print(f'Total Users: {tot_users(1)}')
    tiers = [(x, tot_users(x), payout(x)) for x in range(0, 110, 10)]
    
    df = pd.DataFrame(tiers, columns=['pct_users_filed', 'qty_users_filed', 'payout_per_user'])
    
    df
    import matplotlib.pyplot as plt
    import matplotlib.ticker as ticker
    
    fig, ax = plt.subplots(figsize=(10, 8), dpi=100)
    
    # Calculate size of markers based on payout per user
    sizes = 400 * np.sqrt(df['payout_per_user']) / np.max(np.sqrt(df['payout_per_user']))
    
    # Set the y-axis tick format to include two decimal places
    plt.gca().yaxis.set_major_formatter(ticker.FormatStrFormatter('%.2f'))
    
    # Create scatter plot
    plt.scatter(df['pct_users_filed'], df['payout_per_user'], 
                c=df['qty_users_filed'], cmap='plasma', alpha=0.8, edgecolor='black', s=sizes)
    
    # Add labels and title
    plt.xlabel('% Of American Users Filing A Claim', fontsize=12, labelpad=15)
    plt.ylabel('Payout Per User ($)', fontsize=12, labelpad=15)
    plt.title('Facebook Class Action Lawsuit Payout (By User Participation)', fontsize=14, pad=20)
    
    # Format ytick labels
    # ytick_labels = ['{:.2f}'.format(y) for y in ax.get_yticks()]
    # ax.set_yticklabels(ytick_labels)
    
    # Set tick label font size
    plt.xticks(fontsize=10)
    plt.yticks(fontsize=10)
    
    # Add colorbar
    cbar = plt.colorbar()
    cbar.set_ticks([0, 50000000, 100000000, 150000000, 200000000, 245000000])
    cbar.set_ticklabels(['0', '50M', '100M', '150M', '200M', '250M'])
    cbar.ax.set_ylabel('Qty Users Filing A Claim (millions)', fontsize=12, labelpad=15)
    
    # Add space between the title and the plot
    plt.tight_layout()
    
    # Show plot
    plt.show()
    
    sample_net_worth = 1000000
    
    penalty_pct/100 * sample_net_worth
    # Values
    penalty = 725000000
    fb_val = 544750000000
    
    # Labels
    labels = ['Class Action Lawsuit Penalty', 'Facebook Market Cap']
    
    # Sizes
    sizes = [penalty, fb_val]
    
    # Plot
    fig, ax = plt.subplots()
    ax.pie(sizes, labels=labels, autopct='%1.1f%%', startangle=90)
    
    # Set equal aspect ratio to make the pie chart circular
    ax.axis('equal')
    
    # Title
    ax.set_title('Facebook Market Cap vs. Class Action Lawsuit Penalty')
    
    plt.show()