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

Heatmap bbox from clustering #18

Open
joetimmerman opened this issue Mar 18, 2018 · 1 comment
Open

Heatmap bbox from clustering #18

joetimmerman opened this issue Mar 18, 2018 · 1 comment

Comments

@joetimmerman
Copy link
Contributor

joetimmerman commented Mar 18, 2018

Decided to try tackling #7 by using DBSCAN to cluster the (center points of the) tracks, then only create the heatmap for the first cluster. The code is very messy right now -- just a PoC to see if I could get it work -- and I'm not an expert on clustering algorithms, but it seems to be working well enough for me. Without customizing the heatmap center/radius, my heatmap was gibberish. Adding in the clustering, I get this nice result:

selection_002

If anyone wants to give it a try, it's in my fork -- I'd love to hear feedback/if it works for data other than mine. I've included a new requirements file, requirements-with-cluster.txt. The only changes are to heatmap_drawer.py, where I've added a new variable _cluster, which can be toggled on or off. You can tweak the eps parameter of DBSCAN to get different cluster sizes -- I'd imagine a cyclist doing 200 mile rides might need this set differently than a runner.

Edit: These changes are now present in this branch of my fork, but nost master.

@flopp
Copy link
Owner

flopp commented Mar 18, 2018

Looks like your home turf is NYC ;)

I really like the idea of using an automatic clustering algorithm for creating "meaningful" heatmap posters. I will give it a try...

lowtower added a commit to lowtower/GpxTrackPoster that referenced this issue Jan 14, 2022
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

No branches or pull requests

2 participants