Skip to content

Grade trail difficulty on ascent, not distance alone #1004

Description

@glennmichael123

Part of #1002. Blocked on #1003.

Problem

Trail difficulty is inferred from distance alone, because ascent is not available. Across a 400-trail production sample that produces 310 easy, 21 moderate, 69 hard — a grading that says almost nothing true:

  • A 0.1-mile scramble straight up a cliff grades easy.
  • A flat 250-mile rail-trail grades hard.
  • /trails sorted longest-first therefore opens on a wall of national scenic trails all badged HARD, which is the first impression the catalog makes.

Every difficulty filter in the product is currently sorting by distance a second time, and the badge on each card is telling people something we have not measured.

Acceptance

  • Difficulty derived from distance and ascent once Backfill elevation gain for the whole trail catalog (0 of 400 sampled have it) #1003 has filled it.
  • A trail with no elevation data shows no grade rather than a distance-derived guess — an absent badge is better than a wrong one.
  • The rule lives in one shared pure function used by the API, the cards and the filter, so the three cannot drift.
  • Reviewer difficulty votes (already collected) stay separate and keep being shown as what people who walked it thought.
  • Tests covering the short-and-steep and long-and-flat cases that are wrong today.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend, data model, infraenhancementNew feature or requestmajor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions