Skip to content

Instantly share code, notes, and snippets.

@WouterNieuwerth
Last active February 9, 2020 18:51
Show Gist options
  • Save WouterNieuwerth/4f559eb351b33951a127c0438a88728c to your computer and use it in GitHub Desktop.
Save WouterNieuwerth/4f559eb351b33951a127c0438a88728c to your computer and use it in GitHub Desktop.
GPX analysis - step 2
# All the sections you PB's for in meters:
sections = [1000,(1000*1.60934),3000,5000,(5000*1.60934),10000,15000,(10000*1.60934),20000,21097.5,25000,30000,40000,42195]
# The file you want to import:
file = 'my_run_001.gpx'
# This Pandas DataFrame will contain the final output of our analysis:
df_final = pd.DataFrame(columns=['time', 'distance', 'minutes_per_kilometer'])
gpx_file = open(file, 'r')
gpx = gpxpy.parse(gpx_file)
df = pd.DataFrame(columns=['lon', 'lat', 'alt', 'time'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment