Strava-local-heatmap icon indicating copy to clipboard operation
Strava-local-heatmap copied to clipboard

Unexpected results when using year filter on "large" dataset

Open bergziege opened this issue 2 years ago • 1 comments

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: heatmap-dresden-all_thumb

Filtered by year 2022: heatmap-dresden-2022_thumb There are some red pixels in the original image. So it wants to show some data.

Used Tracks for 2022: trackmap-dresden-2022_tumb

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.

bergziege avatar May 13 '22 09:05 bergziege

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.

bergziege avatar May 13 '22 09:05 bergziege