Run "PBP scrape.R" to scrape NBA play-by-play data from NBA.com with stints calculated.
"RAPM Analyze.R" has the analysis used to calculate RAPM. The RAPM Analyze file is a bit of a mess... The PBP data files for the analysis have not been uploaded on here so you will have to run the PBP scrape file if you wish to have the data.
Update: Recently I've noticed that I get blocked from NBA.com when I try scraping too much data so it's sort of a pain now. If you want the data shoot me a message and I'll send it to you.