Code for first appearance calculator at https://mclapham.shinyapps.io/firstApp/