Coder Social home page Coder Social logo

Filter on handhold distance about climbdex HOT 3 OPEN

btmccord avatar btmccord commented on September 25, 2024
Filter on handhold distance

from climbdex.

Comments (3)

lemeryfertitta avatar lemeryfertitta commented on September 25, 2024

Thanks for the ideas! Both are possible but non-trivial.

Filter by number of hand holds

This requires parsing the frame string to find the roles of each hold, and then counting the number of placements that have a role designated for hands. This would likely have to be done in Python instead of the SQLite query, so it will probably be a bit slower, but I'd imagine it should still be performant enough, especially on smaller queries.

Filter by hand hold distance

This would be on top of the previous (first identify all of the hand holds), then map the placements to the x y coordinates of the board (holes table), then some algorithm to score overall "distance" - maybe something like finding the min distance between each point and every other point, and then summing that min distance for each point. It would be interesting to see if an algorithm like that actually captures the spirit of the filter, given that you do not always move between the closest hand holds in a climb.

from climbdex.

btmccord avatar btmccord commented on September 25, 2024

I am not very familiar with SQLite but it seems like something like this would work for the number of hand holds?

SELECT frames, (length(frames) - length(replace(frames, 'r13', ''))) / 3 AS holdCount FROM climbs WHERE holdCount BETWEEN 5 and 10

from climbdex.

lemeryfertitta avatar lemeryfertitta commented on September 25, 2024

Filtering on hold count has been deployed. Leaving the issue open for the the idea of filtering on distance.

from climbdex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.