Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Few minor tweaks for your tool #16

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

bousqi
Copy link

@bousqi bousqi commented Mar 22, 2022

I was willing to generate heat map from gpx tracks generated by Polar watch (not strava).
Those files are non formatted, everything on the same line. Thus I had to convert those files before processing them.
I also added recursive search in GPX directory (my tracks were sorted by year)
And least important, I had to change one minor thing about tuple for python 3.8 to be supported.

If you think those are of interest, feel free to pull them.

@darrepac
Copy link

darrepac commented May 7, 2022

Interesting fixes

@bousqi
Copy link
Author

bousqi commented May 7, 2022

I plan to add a time lapse feature... I hope to find spare time to do it.
Idea would be to generate heat map per month and make an animation base on my running activity. 😁

Copy link
Owner

@remisalmon remisalmon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read, writing and reading the files again is not exactly efficient, and I would prefer not to modify the files.

We can do those replacements in memory, if you are still up for it.

# converting files
for gpx_file in gpx_files:
print('Converting {}'.format(os.path.basename(gpx_file)))
with open(gpx_file, encoding='utf-8') as file:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding try catch since this is file operation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants