Coder Social home page Coder Social logo

peter-lam / climbr Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 1.0 73.89 MB

A utility to log, visualize, and highlight climbing strengths, weaknesses, and trends. Built using Python, ElasticSearch, Kibana, and Docker

Home Page: https://www.peterqlam.com

License: MIT License

Python 0.57% Jupyter Notebook 99.32% HTML 0.12% Batchfile 0.01%
docker docker-compose kibana elasticsearch climbing climbing-logbook climbing-gyms visualization data-science data-visualization webscraping webscraper python graphs

climbr's Introduction

Contributors Forks Stargazers Issues LinkedIn License: MIT


Climbr

climbr dashboard demo

Visualize your rock climbing progression and trends.
Website · Screenshots · Wiki · Report Bug · Request Feature

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

python logo docker logo elastic logo kibana logo

Contributors

Peter Lam

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?
      • 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+
  • Python 3.6+ (Optional)
    • Linux: sudo apt-get install python3 && python3 -m pip install -U pip
    • Windows: Ensure 'Add Python to PATH' is selected

Note: Climbr can be run without Docker. The following must be running on your host machine:

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:
    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
        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
      docker-compose up -d --build
      Note: Confirm that the container climbr_bookings is running with the command docker ps
    • Manually: with Python
      python bookings.py ./bookings.py -l Altitude_Gatineau
  4. View Climbr visualizations at: http://localhost:5601/app/dashboard

Getting Started

Please visit the wiki for more information regarding system requirements, set-up, and usage.

climbr's People

Contributors

dependabot[bot] avatar peter-lam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rsaavy

climbr's Issues

When session is full, need to parse result properly.

ValueError: invalid literal for int() with base 10: 'Full. Please make a different selection.'
Session info successfully retrieved! See information at '/workspace/data/output/bookings.json'

Also, if it's the last session of the day and it's full, then it will skip to the next day

Set up poetry and nox

Replace requirements.txt and pip setup with poetry to manage dependencies. Set up nox to manage linters, saftey checks etc.

Also fix any linting issues

Create visualizations for cummalitive booking habits

As climbing gyms begin to remove capacity limits and reservation systems, create some new and update existing visualizations to give climbers a reference point when going to gyms in the future.

What already exists:

  • Popularity by gym & time slot
  • Relative to the current capacity
  • Booking by weather

What could be helpful for the future:

  • Popularity by gym & regular time intervals (every hour)
  • Add a field to data points to show the % full based on the capacity of that time
    • For example: 50 bookings in March when the capacity was 50 ppl means 100% capacity, where as now it's like 50%
  • Update jupyter graphs for weather trends
    • How do other variables influence how busy a gym is (weather, time of the year, events, lockdown)
  • Bonus: Highlight and graph the differences in popularity based on lockdown rules
    • For example: 1st return from lockdown, 2nd ....
    • This would be more accurate if curious on data based on the limit but not 100% needed

Make directories and files not tracked by git

Since "Logs" and "Output" directories are ignored by git, the app needs to make these directories if they don't exists. Currently a fresh install results in an error like:

PS E:\GitHub-Projects\climbr-dev-work> poetry run cli export
Retrieving dashboards and related objects...
Exporting Kibana dashboard and objects...
Traceback (most recent call last):
  File "E:\GitHub-Projects\climbr-dev-work\common\common.py", line 383, in export_kibana
    with open(output, "w+") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'E:\\GitHub-Projects\\climbr-dev-work\\data\\output\\climbr_2021-10-25_19-11-35.ndjson'

During handling of the above exception, another exception occurr

Visualize yearly wrap up

Create a dashboard to summarize the climbing year. Things that would be useful

  • Climber count, who did you climb with the most this year?
  • Breakeven: Did you break even for your membership? Did other climbers?
  • Hardest grade
  • Mostly climbed location

Restructure Climbr CLI

Move related files into a subfolder. For example. /common/args should be in the CLI subfolder.

Idea is to clean up the project into sub folders per program:

  • Climbr CLI
  • webscraper
  • Climbr API

Poetry.lock not present in webscraper

On a fresh clone, poetry lock isn't present so there is a error when running docker-compose. Need to find a better solution than this and also duplicating the pyproject.toml....

Refactoring Bookings for Webscraper

Instead of having to change the input logic when something changes, like the booking from (capacity gauge VS reservation), convert the Booking dictionary to class and standardize the inputs/outputs

Restructure Docker files

Combine webscraper and main project docker files and docker-compose files. These should sit at the top odf the directory,
To restart the webscraper specifically, use: docker-compose restart webscraper or to rebuild the 1 service use: docker-compose up --detach --build webscraper

Warn users about demo data when running "climbr.py update"

If the user runs "demo" command first and then starts to populate their own data. Runing the "Update" command should either warn the user or auto delete demo files

Check for *demo.njson in the ES folder if user uses regular "climbr.py update". If present, should prompt user about deletion

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.