
## Plot
P.Revenue <- 
{
  ggplot() + 
    geom_bar(stat="identity", data=DT.Acc.Using.perDPt, aes(x=Month, y=Orchard_Revenue, fill=Product_Tier)) + 
    scale_y_continuous(labels=dollar) + 
    scale_fill_manual(values=Colors) + 

    ## Moving Average
    geom_line(data=DT.Acc.Using.perD, aes(x=Month, y=Orchard_Revenue_MA), color="red") +
    labs(x="Date", y="The Orchard's Monthly Revenue (in USD)"
        , title="SPOTIFY\nMonthly Revenue by Product Tier\n\nRed line is 3-month MA of monthly totals."
        , fill="Product Tier")
}

P.ARPU <- 
{
  ggplot(data=DT.Acc.Using.perD, aes(x=Month)) + 
    geom_bar(stat="identity", aes(y=Spotify_Revenue_Per_User_Annua), fill="#5800ff", alpha=0.8) + 
    scale_y_continuous(labels=dollar) + 
    # scale_fill_manual(values=Colors) + 
    ## Moving Average
    geom_text(aes(label=asCurr(Spotify_Revenue_Per_User_Annua), y=Spotify_Revenue_Per_User_Annua*1.025)
        , width=rel(.28), size=4) +
    geom_line(aes(y=Spotify_Revenue_Per_User_Annua_MA), color="red") +
    labs(x="Date", y="Annualized Revenue Per User (in USD)"
        , title="SPOTIFY\nAnnualized Revenue Per User 2013\n(based on Spotify ) \n\nRed line is 3-month MA.")
}



## Plot
P.Usership <- 
{
  ggplot() + 
    geom_bar(stat="identity", data=DT.Acc.Using.perDPt, aes(x=Month, y=Spotify_Registered_Users, fill=Product_Tier)) + 
    millions.y() + 
    scale_fill_manual(values=Colors) + 
    ## Moving Average
    geom_line(data=DT.Acc.Using.perD, aes(x=Month, y=Spotify_Registered_Users_MA), color="red") +

    ## Average streams per user
    geom_line(data=DT.Acc.Using.perD, aes(x=Month, y=Spotify_Streams_Per_User*1e6), color="Blue")  + 

    ## Revenue from fact_sales
#    geom_line(data=qres.rev, aes(x=Month, y=net), color="dark blue") + 

    labs(x="Date", y="Registered Users (in Millions)"
        , title="SPOTIFY\nUsership by Product Tier\n\nRed line is 3-month MA of monthly totals (in millions).\nBlue line is average number of streams per user (in units)."
        , fill="Product Tier")
}



NEVER MIND.....  I dont have "users per tier"

in fact... doubld check how you got to the current numbers

ArpuTier <- DT.Acc.Using.perDPt[Month < "2014-01-01"][, (Spotify_Gross_Revenue / Spotify_Registered_Users) * 12, keyby="Product_Tier,Month" ]
ArpuTier

P.ARPU.tier <- 
{
  ggplot(data=ArpuTier, aes(x=Month)) + 
    geom_bar(stat="identity", aes(y=V1, fill=Product_Tier), alpha=0.8) + 
    scale_y_continuous(labels=dollar) + 
    # scale_fill_manual(values=Colors) + 
    ## Moving Average
    # geom_text(aes(label=asCurr(Spotify_Revenue_Per_User_Annua), y=Spotify_Revenue_Per_User_Annua*1.025)
    #     , width=rel(.28), size=4) +
    # geom_line(aes(y=Spotify_Revenue_Per_User_Annua_MA), color="red") +
    scale_fill_manual(values=Colors) +
    facet_grid(Product_Tier~.) +
    labs(x="Date", y="Annualized Revenue Per User (in USD)"
        , title="SPOTIFY\nAnnualized Revenue Per User 2013\n\nRed line is 3-month MA.") 
}

printToPDF(list(P.Revenue, P.Usership, P.ARPU), f.name="Spotify_ARPU.pdf", ncol=2, sub=orchardFootNote(), main="\nSPOTIFY\n", width=10, height=6)

