
percs <- data.table(perc=seq(0, 1, by=0.01), key="perc")
rownames(percs) <- fwp(percs)

---

# OLD 
# selloutPercs <- 
# t(sapply(percs, function(perc)
#      dat[attendance / capacity >= perc, 
#          sum(attendPerc==1) / length(attendPerc), by=netCapGrp][, V1]  ))

percs <- 
 percs[ , dat[attendance / capacity >= perc 
             , list(perc_of_conc_soldOut = sum(attendPerc==1) / length(attendPerc))
             , by=netCapGrp]
        , by=perc]


ggplot(percs, aes(x=perc, y=perc_of_conc_soldOut, color=netCapGrp)) + 
    geom_line(alpha=0.4)


ggplot(percs, aes(x=perc, y=perc_of_conc_soldOut)) + 
    geom_line(alpha=0.4) + 
    # ylim(c(0, 4)) + 
    facet_grid(netCapGrp~.)
