Strava-local-heatmap
Strava-local-heatmap copied to clipboard
Unexpected results when using year filter on "large" dataset
Problem
When using the year filter and at the end the script uses only about 500 tracks from over 15000 (1 year out of 10) my plotted heatmap is nearly completely black.
Assumption
When calculating the strenght/glow/... when drawing the heatmap seems to work with the count of all files and not only filtered ones. So when taking into account all the tracks from all years the tracks from 2022 will only be a tiny part of them resulting in a nearly black image. But I am not able to find that place in the code.
Examples
All data:
Filtered by year 2022:
There are some red pixels in the original image. So it wants to show some data.
Used Tracks for 2022:
Possible workaround (well, not really)
In addition to one folder containing all files on could create separate folders for each year .... but at he same time this would make the year filter obsolete.
Well, as expected.
At line 248
the overall count of all gpx files is used instead of the filtered ones.
m = max(1.0, np.round((1.0/5.0)*res_pixel*len(gpx_files)))
I will have a look at python and create a merge request later.