Happy 2022! I wanted to give you an update on our progress. A big thank you to all of the volunteers who have been working quietly behind the scenes. Here’s an overview of our 3 most active projects on GitHub.
Warning: this blog post contains a lot of technical jargons.
1. SandBag
GitHub: https://github.com/OpenBeta/sandbag
License: MIT
SandBag is a JavaScript/TypeScript library for climbing grade comparison and conversion. Available as an NPM module.
Have you ever worked on a climbing app project and needed to validate YDS grades or sort/filter a list of climbs by difficulty? And what the heck is 5.10c/d? Is it easier or harder than 5.10+? The library helps you get through these boring tasks and more.
Supported grade systems
✔️ YDS, V-scale, and French.
We need your help adding support for other systems such as British and Australian Ewbank. Contributions are most welcome!
Examples
Install the library:
# Using npm
npm install @openbeta/sandbag
# or yarn
yarn add @openbeta/sandbag
Compare two YDS grades:
import { YosemiteDecimal } from '@openbeta/sandbag'
const easier = YosemiteDecimal.getScoreForSort('5.6')
const harder = YosemiteDecimal.getScoreForSort('5.10')
console.log('Is 5.6 easier than 5.10?', easier < harder)
// Output: Is 5.6 easier than 5.10? true
2. Climbing GraphQL API
GitHub: https://github.com/OpenBeta/openbeta-graphql
Code License: AGPL v3
Content License: CreativeCommons Public Domain (CC0)
Endpoint: https://api.openbeta.io
As announced in the December newsletter, we are developing a new and more powerful API based on GraphQL. The API enables programmatic access to the climbing data —get crags and climbs for a certain area, filter climbs by disciplines and difficulty.
Why GraphQL? As a long time user of REST, I was initially skeptical of the value of GraphQL until I started analyzing the climbing data.
A tree structure is a natural way to organize climbing information.
By design, GraphQL queries have the same shape as the data they return.
GraphQL allows us to specify in the queries exactly what we need.
For example, we can model USA climbing areas as follows:
# An area contains one or more sub-areas
# Leaf areas contain one or more climbs
USA
├─ California
│ ...
├─ Colorado
├─ Boulder
├─ Flatirons
├─ First Flatiron
├─ Direct East Face (5.6)
├─ Yellow Brick Road (5.7)
...
├─ Eldorado Canyon State Park
...
Let’s say you are interested in area statistics for Boulder and immediate sub-areas. Your query will look like this:
query AreasInBoulder {
areas(filter: {
area_name: {
match: "Boulder", exactMatch: true
}
}) {
area_name
totalClimbs
children {
area_name
totalClimbs
}
}
}
# Result
{
"data": {
"areas": [
{
"area_name": "Boulder",
"totalClimbs": 5140
"children": [
{
"area_name": "Flatirons",
"totalClimbs": 1300
},
{
"area_name": "Eldorado Canyon State Park"
"totalClimbs": 1219
},
...
]
}]
}
}
Interactive playground
Developer ergonomics is an important consideration when adopting a new framework. We run our API service with introspection enabled, which allows you to explore and test the API with an online playground.
3. OpenTacos
GitHub: https://github.com/OpenBeta/open-tacos
Code License: AGPL v3
Content License: CreativeCommons Public Domain (CC0)
Live site: https://tacos.openbeta.io
OpenTacos is a free and editable catalog of climbing routes inspired by Wikipedia and OpenStreetMap. We build this tool to help climbers research climbing areas, and ultimately, help us identify inaccuracies and improve the underlying datasets.
Completed:
✔️ Find climbs by name, description, or FA.
Work in progress:
- Find climbs near a city or a well-known landmark.
- Filter climbs by disciplines or difficulty.
- Filter areas by climbing seasons.
We want your feedback
The core volunteer team wants to hear from the climbing community to guide our directions. Visit the GitHub Kanban board to learn more about planned features and milestones. Note: You need a GitHub account to comment on issues.
You can also chat with us on Discord.