This file does the work of creating a data directory, downloading the data zip file and extracting the contents. It then loads the data(which is separated into training and test sets) and combines the relevent pieces into one data frame. Finally, it splits the data by subject and activity and takes the means of each measurement, which it puts in a new data frame and writes to file.
This file gives descriptions of the variables