The Mountain Bike Rider and Trail Metrics application aims to provide mountain bikers with a personalized lense into how they are performing, and where their training may take them next. The application integrates your performance metrics with crowd-sourced mountain bike trail data to help inform riders on which trails near them may be a safe, incremental challenge in their training journey.
The app provides 2 novel performance measurements: Trail score and Rider score.
- Rider Score = Informed personal rating based on a rider's activity history
- 1-10 scale
- Trail Score = Crowd-sourced trail details and user input, including measurements such as average speed and average duration, which provides riders with grounding information which can be used as suggestions of what trails are truly approachable around their current rider performance level.
- 1-10 scale
Much of our motivation extends from the fact that personalized performance insight has become a booming field in the fitness space, yet personalized trail suggestions seem to be largely underexplored. The MTB IMBA Trail Difficulty Scale was created as a helpful generalized guide for riders to follow (you may recognize this as the ski/snowboarding difficulty scale), however this is far too generalized and cannot provide adaptive insight as bikers train and improve. The Rider Score and Trail Score aim to alleivate this descrepancy by integrating current rider performance metrics alongside up-to-date trail difficulty insight. This migration aims to improve safety for riders, encourage trail discovery, and motivate bikers to incrementally challenge themselves while having fun at the same time.
- Must have
npx
installed - Must have an iOS device
- Note: The app can be run in the iOS simulator as well
- Must have the Expo Go mobile app installed on your smartphone
- Clone the project
- Run
npm install
to install the necessary depenedencies
Start the application server:
npx expo start
- Then, open the Camera app on your iPhone. In your terminal, you should see a QR code is generated. Scan the QR code with your camera.
- This will prompt the Expo Go application to launch.
- Allow the app to load, and you will see the application render.
- Press
CTRL + C
to kill the current server process.
- Our Backend API is being host live at bike.langswap.app
- Endpoint Documentation: https://bike.langswap.app/docs
- Backend Gitlab Repository: https://gitlab.com/ama952/mountain-bike
- In order to test our score calculations, please visit our FastAPI Swagger endpoint, which serves as the source of our backend documentation and playground for interfacing with our score logic.
- All backend code is located in this Gitlab
Data:
- If data is not already populated, execute the
/mock/
endpoint. This causes the following steps:
- One user created (
factory.py
) - 6 trail sources created (
factory.py
) - 6 Trail completion source created (
factory.py
) - Sensors and Signals area added
- See our Google Sheet and specifically the
signals db
sheet- All columns except
lat, long, trail_id, user_id, and time
are treated as sensors - Thus, all rows of the table are treated as signals
- All columns except
- See our Google Sheet and specifically the
- After
/mock/
endpoint is executed, you can add additional data as you wish. Be sure you create uniquetrail_id
anduser_id
for any new items. For instance, if you try to create new trail_completion withuser_id=1
andtrail_id=1
, the system will return an error. - Currently not all CRUD operations are covered. There are no endpoints to delete objects (but you can always reset dataset with default data by using
/mock/
). There are also no endpoints to update objects.
Scores:
- Trail score and Rider score are re-calculated each time
GET
is executed. Score is represented if fetching a single object only (i.e./users/<id>
but not/users/
- Front-end Application: React Native with Expo
- API: FastAPI
- Backend Platform: Amazon EC2
- Database: Postgres
- Data Parsing & Processing: Python