I've scraped attendance data for all 30 MLB teams over a 25 year period (1990 - 2014) and created a few predictive models. All of my code is available within this repository, and an explanation of my work is available at r-directory.
Data sources are Baseball-Reference.com & Wikipedia.