Images

most_popular_hold.jpg five_most_popular_holds.jpg ten_most_popular_holds.jpg ten_most_popular_holds_for_grade_V1.jpg ten_most_popular_holds_for_grade_V2.jpg ten_most_popular_holds_for_grade_V3.jpg ten_most_popular_holds_for_grade_V4.jpg ten_most_popular_holds_for_grade_V5.jpg ten_most_popular_holds_for_grade_V6.jpg ten_most_popular_holds_for_grade_V7.jpg ten_most_popular_holds_for_grade_V8.jpg ten_most_popular_holds_for_grade_V9.jpg ten_most_popular_holds_for_grade_V10.jpg ten_most_popular_holds_for_grade_V12.jpg holds_used_exactly_once.jpg unused_holds.jpg

Route Similarity

  • Stick To the Wall (V7) is most hold-similar to Shut The Door (V7) with hold-inclusion distance 3
  • Wonk Fest RedTape (V7) is most hold-similar to Wonk Fest (V5) with hold-inclusion distance 6
  • A Whimsical And Silly problem (?) is most hold-similar to Anti Tall People (V5) with hold-inclusion distance 6
  • Slap the Jug (V0) is most hold-similar to Meow (?) with hold-inclusion distance 7
  • Cosmology (V3) is most hold-similar to Meow (?) with hold-inclusion distance 7
  • Proud Ant (V5) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 7
  • Lebron 9s (V7) is most hold-similar to Funky Monkey (V6) with hold-inclusion distance 8
  • Walk In The Park (V5) is most hold-similar to Swing Into Action (V4) with hold-inclusion distance 8
  • Bulb Bee Stroke Enough Ski (V0) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 8
  • Open and Shut (V3) is most hold-similar to Bulb Bee Stroke Enough Ski (V0) with hold-inclusion distance 8
  • I Kinda Pulled My Finger On This Climb Somehow (V4) is most hold-similar to Bulb Bee Stroke Enough Ski (V0) with hold-inclusion distance 9
  • Bat Hang? Heel-Toe Cam? (V4) is most hold-similar to Bulb Bee Stroke Enough Ski (V0) with hold-inclusion distance 9
  • Baguette For L(a)unch (V5) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 9
  • Here Come The Rooster (V5) is most hold-similar to Baguette For L(a)unch (V5) with hold-inclusion distance 9
  • Recompense3-2-jug (V1) is most hold-similar to Lay Back And Relax (V4) with hold-inclusion distance 9
  • Lay Back And Relax (V4) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 9
  • Desert Cruise Ruis (V7) is most hold-similar to Recompense3-2-jug (V1) with hold-inclusion distance 9
  • Chino Colab (V5) is most hold-similar to Meow (?) with hold-inclusion distance 10
  • This Is Not A Ladder (V2) is most hold-similar to Orange You Glad (V3) with hold-inclusion distance 10
  • Unfathomable Water-buffalo (V4) is most hold-similar to Optimistic Wallaby (V3) with hold-inclusion distance 10
  • local media reports have been reporting the death (V5) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 10
  • Green And Yellow / Black And Yellow (V1) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 10
  • Smear Of Fear (V3) is most hold-similar to I Kinda Pulled My Finger On This Climb Somehow (V4) with hold-inclusion distance 10
  • A-tension (V5) is most hold-similar to Bulb Bee Stroke Enough Ski (V0) with hold-inclusion distance 10
  • MHAB01 (V5) is most hold-similar to Bumper Boat (V5) with hold-inclusion distance 10
  • Sloper “fun” (V9) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 10
  • rip (V7) is most hold-similar to A-tension (V5) with hold-inclusion distance 10
  • gilette stadium (V7) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 10
  • Luxury Marsh Tour (V6) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 10
  • Josh V5 (V5) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 11
  • Campus Thing (?) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 11
  • Enter The Void (V2) is most hold-similar to Anti Tall People (V5) with hold-inclusion distance 11
  • Golazo (V4) is most hold-similar to Meow (?) with hold-inclusion distance 11
  • Glorified Pullups (V5) is most hold-similar to Josh V5 (V5) with hold-inclusion distance 11
  • Pinch 101 (V2) is most hold-similar to A Whimsical And Silly problem (?) with hold-inclusion distance 11
  • Jug Roulette (V2) is most hold-similar to Moderate In The Middle (V3) with hold-inclusion distance 11
  • Snack Attack (V5) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 11
  • Crop Top (V5) is most hold-similar to Anti Tall People (V5) with hold-inclusion distance 11
  • Conquered Clinging (V10) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 11
  • Chipped and Chopped (V7) is most hold-similar to Meow (?) with hold-inclusion distance 11
  • Oranges (V6) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 11
  • The Splits (V4) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 11
  • Toe Nail Biter (V7) is most hold-similar to Conquered Clinging (V10) with hold-inclusion distance 11
  • Big Chungus (V4) is most hold-similar to A-tension (V5) with hold-inclusion distance 12
  • dripping wet (V7) is most hold-similar to Campus Thing (?) with hold-inclusion distance 12
  • salt lake summer (V7) is most hold-similar to gilette stadium (V7) with hold-inclusion distance 12
  • Batman (V4) is most hold-similar to Bat Hang? Heel-Toe Cam? (V4) with hold-inclusion distance 12
  • Sandshroom (V2) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 12
  • Compression Repression (V3) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 12
  • Pink Lemonade (V8) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 12
  • Everybody Else (V8) is most hold-similar to Luxury Marsh Tour (V6) with hold-inclusion distance 12
  • C Elegans (V5) is most hold-similar to Luxury Marsh Tour (V6) with hold-inclusion distance 12
  • nonstop (V7) is most hold-similar to Meow (?) with hold-inclusion distance 12
  • Superman for Short People (V0) is most hold-similar to Anti Tall People (V5) with hold-inclusion distance 12
  • Temptation Of Christ (V7) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 12
  • Moped Burnout (V5) is most hold-similar to Orange You Glad (V3) with hold-inclusion distance 12
  • Comp Sim 1 (?) is most hold-similar to Snack Attack (V5) with hold-inclusion distance 12
  • 2 Fast 2 Furious (V2) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 12
  • Hand Foot Fun (V8) is most hold-similar to Meow (?) with hold-inclusion distance 12
  • thugtug (V7) is most hold-similar to Pinch 101 (V2) with hold-inclusion distance 12
  • 4frank (V4) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 12
  • Extendo Grip (V4) is most hold-similar to Shut The Door (V7) with hold-inclusion distance 12
  • Turn Heel (V6) is most hold-similar to Bumper Boat (V5) with hold-inclusion distance 12
  • Swinging Around (V4) is most hold-similar to Smear Of Fear (V3) with hold-inclusion distance 12
  • Dad energy (V3) is most hold-similar to Orange You Glad (V3) with hold-inclusion distance 12
  • Commit To Chaos (V8) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 12
  • Unicorn Arms (V1) is most hold-similar to This Is Not A Ladder (V2) with hold-inclusion distance 13
  • Ultimatum (V8) is most hold-similar to Lay Back And Relax (V4) with hold-inclusion distance 13
  • Destination Unknown (V3) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 13
  • Dyno Sore (V4) is most hold-similar to Comp Sim 1 (?) with hold-inclusion distance 13
  • EBRS001 (V3) is most hold-similar to Batman (V4) with hold-inclusion distance 13
  • ™ Ralph Wiggum Warmup (V5) is most hold-similar to Snack Attack (V5) with hold-inclusion distance 13
  • DYNO (V5) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 13
  • Spray Lord (V8) is most hold-similar to Meow (?) with hold-inclusion distance 13
  • trainer1 (V6) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 13
  • Crimprete (V4) is most hold-similar to Josh V5 (V5) with hold-inclusion distance 13
  • Rose Bowl (?) is most hold-similar to Big Chungus (V4) with hold-inclusion distance 14
  • The Floor Is Lava (V7) is most hold-similar to Luxury Marsh Tour (V6) with hold-inclusion distance 14
  • Hot Cheetos (V4) is most hold-similar to Oranges (V6) with hold-inclusion distance 14
  • poopy face (V10) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 14
  • From The Gecko (V6) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 14
  • Super Fly 🤘 (V6) is most hold-similar to Bulb Bee Stroke Enough Ski (V0) with hold-inclusion distance 14
  • Boogie Monday (?) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 14
  • C’s Get Degrees (V3) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 14
  • Captain Toe Hook (V7) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 14
  • 6ish (V6) is most hold-similar to thugtug (V7) with hold-inclusion distance 14
  • sft (V9) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 14
  • Oedipus Flex (?) is most hold-similar to Baguette For L(a)unch (V5) with hold-inclusion distance 14
  • Orange Crush (V4) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 15
  • Threshold of a Dream (V8) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 15
  • Dreamtime Streamline (V5) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 15
  • Non Lo So (V10) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 15
  • Dirac 1 (?) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 15
  • 5 Finger Discount (V6) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 15
  • Wet Hot American Donna Summer (V4) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 15
  • Reading Rainbow (V5) is most hold-similar to Proud Ant (V5) with hold-inclusion distance 15
  • Michael recycles (V7) is most hold-similar to Commit To Chaos (V8) with hold-inclusion distance 15
  • Sidestepper (V6) is most hold-similar to Bulb Bee Stroke Enough Ski (V0) with hold-inclusion distance 15
  • Peaceful Crab (?) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 15
  • Sinking Slinky (V8) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 15
  • Crafty Mink (V4) is most hold-similar to A-tension (V5) with hold-inclusion distance 15
  • Moonboardish (V10) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 15
  • Opposites Attract (V3) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 15
  • tag (V5) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 15
  • big red (V6) is most hold-similar to Proud Ant (V5) with hold-inclusion distance 15
  • Romancing Stone Gossard (V4) is most hold-similar to Anti Tall People (V5) with hold-inclusion distance 15
  • ooga booga (V6) is most hold-similar to Conquered Clinging (V10) with hold-inclusion distance 15
  • Welcome to the Farm (V6) is most hold-similar to Luxury Marsh Tour (V6) with hold-inclusion distance 15
  • Major Malfunction (V8) is most hold-similar to Meow (?) with hold-inclusion distance 16
  • no sleep (?) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 16
  • Rich’s Revenge (V5) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 16
  • Spinout (V6) is most hold-similar to A Whimsical And Silly problem (?) with hold-inclusion distance 16
  • Crimps 1 (V6) is most hold-similar to Bulb Bee Stroke Enough Ski (V0) with hold-inclusion distance 16
  • Hellcave (V8) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 16
  • The People’s Board (V3) is most hold-similar to nonstop (V7) with hold-inclusion distance 16
  • Fission (V8) is most hold-similar to Conquered Clinging (V10) with hold-inclusion distance 16
  • Pinchy Pudding (V5) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 16
  • Paradise (V6) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 16
  • Compression Fracture (V4) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 17
  • I'm Sorry For This One (V7) is most hold-similar to Welcome to the Farm (V6) with hold-inclusion distance 17
  • Tick Tick Boom (V6) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 17
  • Side Kick (V7) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 17
  • Father time (V10) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 17
  • Underworld Dreams (V5) is most hold-similar to Desert Cruise Ruis (V7) with hold-inclusion distance 17
  • Wagon Lite Lite (V8) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 17
  • 4 the Boys (V4) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 17
  • Flying Sausage (V8) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 18
  • Dad Bought A Boat (?) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 18
  • Hans ximmer (V10) is most hold-similar to Meow (?) with hold-inclusion distance 19
  • Smoke And Dagger (V4) is most hold-similar to Lebron 9s (V7) with hold-inclusion distance 19
  • Pinching A Dough (V12) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 19
  • Syrian Coconut (V4) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 19
  • L’atomisa bicipite (V6) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 21
  • Furry Sings The Blues (V4) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 21
  • Heel to the Rescue (V4) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 21
  • V2 Of The Century (V2) is most hold-similar to Meow (?) with hold-inclusion distance 22
  • Steezus Christ (V9) is most hold-similar to Slap the Jug (V0) with hold-inclusion distance 22
  • Solid Circuit (?) is most hold-similar to The Splits (V4) with hold-inclusion distance 25
  • SimuLink-up (V5) is most hold-similar to Crimprete (V4) with hold-inclusion distance 25

Source Code

from matplotlib import pyplot as plt, patches, nxutils
import json

class RouteDrawing():
    def __init__(self, wall_image_path):
        self.wall_image_path = wall_image_path

    @staticmethod
    def type2color(hold_type):
        if hold_type == "F":  # feet only
            return 'blue'
        if hold_type == "T":  # top/finish hold
            return 'red'
        elif hold_type == 'O':  # on.
            return 'black'
        elif hold_type == 'S':  # start.
            return 'green'
        else:
            raise Exception("idk what this hold type is: " + hold_type)

    @staticmethod
    def polygon_to_image_coordinates(polygon: patches.Polygon):
        vertices = polygon.get_path().vertices
        """Return image mask given by mask creator"""
        h, w = shape
        y, x = np.mgrid[:h, :w]
        points = np.transpose((x.ravel(), y.ravel()))
        mask = nxutils.points_inside_poly(points, self.verts)
        return mask.reshape(h, w)

        transform = polygon.get_patch_transform()
        return transform.transform(vertices)


    def draw_route(self, holds, title="", save_loc=None):
        assert all(["polygonStr" in hold.keys() for hold in holds]), "all holds must have polygonStr"

        dpi = 100
        image = plt.imread(self.wall_image_path)
        height, width, depth = image.shape
        figsize = width / float(dpi), height / float(dpi)

        fig = plt.figure(figsize=figsize)
        ax = fig.add_axes([0, 0, 1, 1])

        # add title.
        ax.set_title(title, fontsize=72)

        # Create a polygon patch
        for hold in holds:
            polygon_coordinates = [list(map(float, point.split(","))) for point in hold["polygonStr"].split()]
            if "type" not in hold.keys():
                hold["type"] = "O"
            polygon_patch = patches.Polygon(polygon_coordinates, linewidth=7, edgecolor=RouteDrawing.type2color(hold["type"]),
                                            facecolor='none', alpha=1.0)
            # get image coordinates from patch.
            image_coordinates = RouteDrawing.polygon_to_image_coordinates(polygon_patch)

            # Add the polygon patch to the axis
            ax.add_patch(polygon_patch)

        # Set the aspect ratio of the axis to match the image
        ax.set_aspect('equal')
        plt.axis('off')

        # Display the image
        ax.imshow(image, alpha=0.8)

        # Show the plot
        if save_loc is None:
            plt.show()
        else:
            plt.savefig(save_loc, bbox_inches='tight')
        plt.close()


if __name__ == "__main__":
    routes = json.load(open("routes_normalized.json", "r"))
    wall_config = json.load(open("wall_config.json", "r"))
    wall_holds = dict()
    for hold in wall_config["holds"]:
        wall_holds[hold["id"]] = hold

    RouteDrawing("wall.jpg").draw_route(routes[0]["normalizedHolds"], title="Route 0", save_loc="route0.png")
import json
from copy import copy

if __name__ == "__main__":
    routes = json.load(open("framingham_routes.json", "r"))

    # NOTE: to get wall config, unselect the  gym then reselct the gym while mitmproxy.
    # should look somethign like https://www.sostokt.com/api/faces/2b9954be-ca1b-442d-a92b-40b488f56027/setup
    # save the image from img = requests.get("https://sostokt.com/media/" + wall_config["picture"]["name"])
    wall_config = json.load(open("wall_config.json", "r"))
    # img_width = wall_config["picture"]["width"]
    # img_height = wall_config["picture"]["height"]

    # hold ids -> holds.
    wall_holds = dict()
    for hold in wall_config["holds"]:
        wall_holds[hold["id"]] = hold

    for route in routes:
        # get route holds from IDs.
        # In the route holds list, the first character is the hold type (start, foot, etc.), and the rest is the hold id
        # as found in the wall config.
        # We need to get the route holds from the wall_holds.
        route_hold_ids = [( hold[0] , int(hold[1:]) )
                 for hold in
                 route["holdsList"].split(" ")
        ]
        route_holds = []
        for hold_id in route_hold_ids:
            hold_type = hold_id[0]
            hold_num_id = hold_id[1]
            hold = copy(wall_holds[hold_num_id])
            hold["type"] = hold_type
            route_holds.append(hold)

        route["normalizedHolds"] = route_holds
        # print(route.keys())
        # print(route["crowdGrade"]["hueco"])
        # draw_polygons("wall.jpg", route_holds)

    open("framingham_routes_normalized.json", "w").write(json.dumps(routes, indent=4))
import json
import requests

if __name__ == "__main__":
    cookie_string = pass
    csrftoken=Eu7rN8H9rUZ3gtGmtJb43A4Df3kGZqJINGQDQyEmbjXmsx8vtr1BuGA1qe6NEYAf"
    url = "https://www.sostokt.com/api/faces/2b9954be-ca1b-442d-a92b-40b488f56027/latest-climbs/paginated?grade_from=V0&grade_to=%3F&ordering=most_recent&tags=&search=&exclude_mine=false&show_circuit_only=false"
    user_agent = "Stkt/5 CFNetwork/1408.0.4 Darwin/22.5.0"
    authorization = pass

    headers = {
        "Cookie": cookie_string,
        "Authorization": authorization,
        "User-Agent": user_agent
    }

    data = []  # List to store the downloaded data

    page = 1
    page_url = url

    while page_url:
        response = requests.get(page_url, headers=headers)
        if response.status_code == 200:
            page_data = response.json()
            data.append(page_data)

            page_url = page_data.get("next", False)  # Adjust this based on your JSON structure
            page += 1
        else:
            print("Failed to download data. Status code:", response.status_code)
            break

    # concatenate all route data together.
    routes = []
    for page in data:
        for route in page["results"]:
            routes.append(route)

    print("Downloaded data:", data)
    with open("framingham_boulders.json", "w") as fh:
        fh.write(json.dumps(data))
    with open("framingham_routes.json", "w") as fh:
        fh.write(json.dumps(routes))