Skip to content

Commit

Permalink
Major CLI and folder restructure. New commands have been added and in…
Browse files Browse the repository at this point in the history
…itial overhead has been reduced for new users.

Commands Options:
- [Added] demo: Uses demo data to populate Climbr enviroment for demo purposes
- [Added] init: intializes Climbr enviroment with default index and visualizations. Also used as a soft reset to defualt settings if settings have been modified
- [Added] import/export: options to import and export visualizations and index patterns
- [Added] quiet: optional argument to suppress system messages
- [Added] force: optional argument to force delete/overwrite existing files and options
- [Modified] update: 'show' command has been merged with the 'update' command. The command now normalizes and updates climbing data and uploads to the Climbr enviroment.
- [Removed] log: user input support has been put into the backlog

Other changes:
- Now tracking cummalitive total for specific projects
- Sample and template data has been updated to accurately reflect current product
- Index mappings have been updated
- Docker image for climbr.py has added to start-up compose file to initialized Climbr settings
  - The image: climbr_cli can now be used to run climbr commands without Python installed on host
- Kibana/ES version has been updated to 7.9.2
- Readme updated with images
- Minor bug fixes
  • Loading branch information
Peter-Lam committed Oct 22, 2020
1 parent a847e09 commit 85d8846
Show file tree
Hide file tree
Showing 101 changed files with 3,844 additions and 949 deletions.
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
**/env/
**/__pycache__
**/.vscode/
**/dev_test
**/dev
**personal.yaml
**.log
# User specific files
**.log
data/input/*.yaml
data/output/*
data/elasticsearch/bulk_data/*_demo.json
166 changes: 132 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,137 @@
# Climbing-Tracker
Tracking and visualizing climbing progression post COVID-19.
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/peter-lam/climbr/blob/master/LICENSE)

## The Goal
- Log climbing sessions and problems
- Use logs to visualize climbing trends, patterns, and statistics
<br />
<p align="center">
<h1 align="center">Climbr</h1>
<a>
<img src="images\trends\trends_dash.png" alt="climbr dashboard dmeo">
</a>
<p align="center">
Visualize your rock climbing progression and trends.
<br />
<a href="https://github.com/Peter-Lam/climbr"> Website</a>
·
<a href="https://github.com/Peter-Lam/climbr/wiki">Wiki</a>
·
<a href="https://github.com/Peter-Lam/climbr/issues">Report Bug</a>
·
<a href="https://github.com/Peter-Lam/climbr/issues">Request Feature</a>
</p>
</p>

# About
**`Climbr`** is a utility that allows users to visualize and highlight their climbing strengths, weaknesses, and trends. From professionals to beginners, trad climbers to indoor boulderers, users can log climbing sessions from a selection of templates and instantly view their trends, patterns, and statistics with pre-configured Kibana dashboards.

In addition, **`Climbr`** provides booking insights on local gyms (Altitude Kanata, Altitude Gatineau, Coyote Rock Gym), to help users find the most optimal climbing time according to location, time of day, and time of week. Climbers can utilize this information to make socially responsible decisions. Those looking to minimize their risk whilst still staying active can easily find the off-peak hours of their local gym.

## Technologies
<p float="left">
<a href="https://www.python.org/">
<img src="images\misc\python.png" alt="python logo" width="100">
</a>
<a href="https://www.docker.com/">
<img src="images\misc\docker.png" alt="docker logo" width="100">
</a>
<a href="https://www.elastic.co/">
<img src="images\misc\elasticsearch.png" alt="elastic logo" width="100">
</a>
<a href="https://www.elastic.co/kibana">
<img src="images\misc\kibana.png" alt="kibana logo" width="100">
</a>
</p>

## Contributors
### Peter Lam
- [Website](peterqlam.com)
- [Linkedin](https://www.linkedin.com/in/peter-lam-612a00138/)
- [Resume](https://www.peterqlam.com/s/Peter-Lam-Resume.pdf)
# Features

- Log your climbing sessions and projects using yaml files
- Visualize climbing trends, patterns, and statistics with dashboards
- Climbing Stats and Metrics
- Map of visited locations
- Most common climbing discipline (Lead, Bouldering, Trad)
- Grade counter
- Climbing Trends and Progression
- Progression in grades over time
- What's your flash grade? project grade?
- Hard problem climbed outdoors
- Most common climbing discipline (Lead, Bouldering, Trad)
- Most common climbing style
- Weakest climbing style
- Strongest/Weakest climbing style? What areas should I improve?
-
- Bookings
- Busiest time to climb
- Best time to climb to avoid crowds
- Average bookings based on gym
- Use data to influence your training regime and pinpoint weaknesses
- Make responsible decisions based on booking data


# Host Requirements
- [Docker 19+](https://www.docker.com/products/docker-desktop)
- Python 3.6+ (Optional)
- Linux: `sudo apt-get install python3 && python3 -m pip install -U pip`
- [Windows:](https://www.python.org/downloads/) Ensure *'Add Python to PATH'* is selected

**Note**: Climbr can be run without Docker.
The following must be running on your host machine:
- [ElasticSearch 7.9.2](https://www.elastic.co/downloads/elasticsearch)
- [Kibana 7.9.2](https://www.elastic.co/downloads/kibana)
- [Python 3.6+](https://www.python.org/downloads/)
# Quick Start
## Climbr
1. Open Command Prompt/Terminal
2. Change directories to this the root of this repository
3. Build and start up ElasticSearch, Kibana, and Climbr containers with:
```shell
docker-compose up -d --build
```
**Note:** This process may take a while to build
4. Confirm that all containers are running
- Run `docker ps`, the containers *climbr_cli*, *climbr_kibana*, and *climbr_es* should be running
- You should be able to establish a connection to http://localhost:5601
- If the link is not reachable, wait a couple minutes and try again
5. Run the demo visualizations and data
- If python is installed:
1. Run the command `python ./climbr.py demo`
- Otherwise:
1. Copy the `CONTAINER ID` into your clipboard for the docker container of name `climber_cli`
2. Run the following command to initialize the demo
```shell
docker exec <CONTAINER_ID> bash -c "python ./climbr.py demo"
```
6. View Climbr visualizations at: http://localhost:5601/app/dashboard
## Bookings
1. Open Command Prompt/Terminal
2. Change directories `<PATH_TO_REPO>/web_scraper`
3. Run webscraper
- Automated: start up bookings container by running
```shell
docker-compose up -d --build
```
**Note:** Confirm that the container `climbr_bookings` is running with the command `docker ps`
- Manually: with Python
```shell
python bookings.py ./bookings.py -l Altitude_Gatineau
```
4. View Climbr visualizations at: http://localhost:5601/app/dashboard

# Getting Started
Please visit the [wiki](https://github.com/Peter-Lam/climbr/wiki) for more information regarding system requirements, set-up, and usage.


## TO DO
- [ ] Develop Python scripts to automate logging process
- [ ] Containerize scripts, elasticsearch, and kibana for easy plug and play capabilities
- [ ] Investigate hybrid application stacks
- [ ] Develop

### Logging Capabilities
- Track number of problems/routes completed or attempted in session
- Grade
- Onsight / Flash / Redpoint / Repeat / Attempts
- Track specific climbs
- Useful for tracking progress on a project
- Who you climb with
- Average session length
- Heatmap / World map of locations climbed
- Track climbs over time
- Hardest climb completed
- Project grade
- Flash grade
- Filter by location, climbing style, climbing disciplines
- Track project progress

Design choices:
- Not personally tracking Onsights for indoor bouldering (Completing a problem on your first try without prior knowledge of beta)
- properties file for preferences V-scale, Font... ?? maybe not
[contributors-shield]: https://img.shields.io/github/contributors/peter-lam/climbr.svg?style=flat-square
[contributors-url]: https://github.com/peter-lam/climbr/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/peter-lam/climbr.svg?style=flat-square
[forks-url]: https://github.com/peter-lam/climbr/network/members
[stars-shield]: https://img.shields.io/github/stars/peter-lam/climbr.svg?style=flat-square
[stars-url]: https://github.com/peter-lam/climbr/stargazers
[issues-shield]: https://img.shields.io/github/issues/peter-lam/climbr.svg?style=flat-square
[issues-url]: https://github.com/peter-lam/climbr/issues
[license-shield]: https://img.shields.io/github/license/peter-lam/climbr/.svg?style=flat-square
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/in/peter-lam-612a00138/
136 changes: 0 additions & 136 deletions climb.py

This file was deleted.

Loading

0 comments on commit 85d8846

Please sign in to comment.