Skip to content

dippedrusk/running-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CMPT 318 Final Project: Running-analysis

Get up and running quickly

Download all files and run

python3 running_analysis.py GPSdata_sample.csv

Be warned that nothing new will happen. All the graphs generated by the program are already in this repo. To use my code with your data, scroll down to the 'Order of execution' section.

Dependencies

  • Python (version 3.4)
  • NumPy (version 1.13)
  • Pandas (version 0.20.3)
  • SciPy (version 0.19.1)
  • MatPlotLib (version 2.0.2)
  • Seaborn (version 0.8.0)

Contents of this repo

  • running_analysis.py
    • This is the driver program of sorts.
    • It expects a .csv file as an argument with three columns - filename, datetime and temperature
    • Running it produces the graphs and statistics explained and analysed in the report.
  • butterworth_distance.py
    • This is a module with functions to calculate distance from a .gpx file
    • It is called by running_analysis.py, you will not need to run it.
    • It does XML parsing, Butterworth filter smoothing, distance calculation.
  • GPSfilenames_CSV.py
    • This is a script I wrote to put a list of all my .gpx filenames in a CSV.
    • If you ever want to run my code with your own .gpx files, run this with no arguments to generate GPSdata.csv
    • You will have to hardcode the required temperature values as I have not programmed for that to be automatic, use GPSdata_sample.csv as an example of what your final file should look like.
  • .csv files
    • GPSdata.csv is required as input for running_analysis.py
    • GPSdata_sample.csv is currently the same thing but will not be overwritten if you run GPSfilenames_CSV.py by accident or on your own data.
  • .gpx files
    • These are real data from my RunKeeper-tracked runs.
    • A list of the filenames is in GPSdata.csv
  • .png files
    • These are graphs generated by running_analysis.py
  • Pilot.ipynb
    • This was a rough jupyter-notebook I used to quickly test things as I went along.
    • You will not need to use this, and I cannot guarantee that the code in it will work because I have moved things around in there a lot.

Order of execution

  • Run GPSfilenames_CSV.py like so
python3 GPSfilenames_CSV.py
  • Open the newly generated GPSdata.csv and hardcode an extra column for temperature and temperature values (units only matter for the graph labels, but I used °C)
  • Run the main script like so
python3 running_analysis.py GPSdata.csv
  • Enjoy your pretty graphs and statistical analysis

Me

I'm Vasundhara, the author of this project. I had a lot of fun creating this and analysing my running data. Don't stalk me and make me regret putting up GPS data of my runs online for science.

About

Doing cool stats on .gpx data from my runs for my CMPT 318 final project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages