Process RunGap output file of a workout and load data into Apple Numbers Spreadsheet and my website with API calls

Overview
BSD 3-Clause License
Copyright (c) 2020, Mike Bromberek
All rights reserved.

ProcessWorkout

Exercise data is exported in JSON format to iCloud using the app RunGap on my iPhone. This program reads the JSON file to get the details about an exercises (type, duration, distance, start time, end time, start and end GPS coordinates).

Stores the information about the exercise in Apple Numbers spreadsheet. The path is configurable. Based on the day of the week the script predicts what category the exercise should be (long run, easy run, training) and the Gear being used (name of shoes used or bike used).

Technolgies

  • Uses API calls to DarkSky gets the weather conditions for the start and end of the exercise.
  • Uses AppleScript to update the Apple Numbers spreadsheet.
  • Run_ProcessRunGap.applescript will setup the environment and run the Python script.

Details saved in sheet

  • Date and time of start of run
  • Type of Exercise
  • Time/Duration
  • Distance in miles
  • Minutes per Mile
  • Notes - Contains the start and end weather conditions
  • Category
  • Gear (name of shoes or bike used)
  • Elevation in feet
  • Heart Rate
  • Calories

Setup Environment

Had to run the install certificates in the install directory for Python to get the HTTPS connections to DarkSkies work

cd /Applications/Python\ 3.8/
./Install\ Certificates.command

Need to specify the path to the ProcessRunGap.py script in the `Run_ProcessRunGap.applescript script. ``

Create Virtual Environment and install libraries

mkvirtualenv ProcessWorkout
pip install -r requirements.txt
deactivate
workon ProcessWorkout #Activate ProcessWorkout Virtual Environment
workon #See all projects

python3 -m venv $HOME/.virtualenvironments/ProcessWorkout
source $HOME/.virtualenvironments/ProcessWorkout/bin/activate
pip install -r requirements.txt
deactivate

WorkoutAnalyze

Reads workout details of an exercise from the app RunGap. The workout data is stored in two files *.rungap.json and *.metadata.json. The rungap file has the GPS locations and updates for the workout stats each second of the workout. Both files store the data in JSON format.

The program WorkoutAnalyze can be run to process a specific file or the rungap/normWrkt function normalize_activity can be called passing it the rungap data to be normalized into a summary of the activity to export to a CSV or group by splits like mile or pauses.

Arguments

WorkoutAnalyze.py -i <inputfile> -o <outputdir>
-i, --ifile arg  : Input filename to process
--idir arg       : Input directory with file name
-o, --odir arg   : Output directory for results
--osplit arg     : Segments to generate in file, default is all (CURRENTLY NOT SETUP)
                    options are mile, segment, kilometer, pause, all
Owner
Mike Bromberek
I enjoy programming, watching Anime, reading books, and running
Mike Bromberek
Checks for Vaccine Availability at your district and notifies you using E-mail, subscribe to our website.

Vaccine Availability Notifier Project Description Checks for Vaccine Availability at your district and notifies you using E-mail every 10 mins. Kindly

Farhan Hai Khan 19 Jun 03, 2021
Repositório de código de curso de Djavue ministrado na Python Brasil 2021

djavue-python-brasil Repositório de código de curso de Djavue ministrado na Python Brasil 2021 Completamente baseado no curso Djavue. A diferença está

Buser 15 Dec 26, 2022
A web app that is written entirely in Python

University Project About I made this web app to finish a project assigned by my teacher. It is written entirely in Python, thanks to streamlit to make

15 Nov 27, 2022
take home quiz

guess the correlation data inspection a pretty normal distribution train/val/test split splitting amount .dataset: 150000 instances ├─8

HR Wu 1 Nov 04, 2021
With Christmas and New Year ahead, it is time for some festive coding. Here is a Christmas Card for you all!

Christmas Card With Christmas and New Year ahead, it is time for some festive coding! Here is a Christmas Card for you all! NOTE: I have not made this

CodeMaster7000 1 Dec 25, 2021
Код файнтюнинга оригинального CLIP на русский язык

О чем репозиторий В этом репозитории представлен способ файтюнить оригинальный CLIP на новый язык Почему модель не видит женщину и откуда на картинке

Valentina Biryukova 7 Feb 06, 2022
Check COVID locations of interest against Google location history

Location of Interest Checker Script to compare COVID locations of interest to Google location history. The script produces a map plot (as shown below)

9 Mar 30, 2022
A feed generator. Currently supports generating RSS feeds from Google, Bing, and Yahoo news.

A feed generator. Currently supports generating RSS feeds from Google, Bing, and Yahoo news.

Josh Cardenzana 0 Dec 13, 2021
Easy way to build a SaaS application using Python and Dash

EasySaaS This project will be attempt to make a great starting point for your next big business as easy and efficent as possible. This project will cr

xianhu 3 Nov 17, 2022
NASH 2021 project... this may or may not end up working 🤷‍♂️

wavespace synthesiser this is my NASH 2021 project, which may or may not end up working 🤷‍♂️ what is going on? imagine you have a big folder of audio

Ben Hayes 12 May 17, 2022
An example using debezium and mysql with docker-compose

debezium-mysql An example using debezium and mysql with docker-compose The docker compose starts the Zookeeper, Kafka, Mysql and Debezium Connect. Aft

Horácio Dias Baptista Neto 4 May 21, 2022
This is the key combo trainer for League of Legends and Dota 2 players.

This is the key combo trainer for League of Legends and Dota 2 players. Place the mouse cursor on the blue point and press the key combo from the upper-left side of the screen.

Ilya Shpigor 1 Jan 31, 2022
Experimental proxy for dumping the unencrypted packet data from Brawl Stars (WIP)

Brawl Stars Proxy Experimental proxy for version 39.99 of Brawl Stars. It allows you to capture the packets being sent between the Brawl Stars client

4 Oct 29, 2021
1 May 12, 2022
JimShapedCoding Python Crash Course 2021

Python CRASH Course by JimShapedCoding - Click Here to Start! This Repository includes the code and MORE exercises on each section of the entire cours

Jim Erg 64 Dec 23, 2022
How to access and display MyEnergi data

MyEnergi-Python-Example How to access and display MyEnergi data Windows PC Install a version of Python typically 3.10 The Python code here needs addit

G6EJD 8 Nov 28, 2022
Digitales Raumbuch

Helios Digitales Raumbuch Settings Moved to settings. Basic Commands Setting Up Your Users To create a normal user account, just go to Sign Up and fil

1 Nov 19, 2021
Usos Semester average helper

Usos Semester average helper Dzieki temu skryptowi mozesz sprawdzic srednia ocen na kazdy odbyty przez ciebie semestr PARAMETERS required: '--username

2 Jan 17, 2022
Python template for Advent of Code event

Advent of Code Python Starter A tamplate for Advent of Code write in Python. Usage The project use poetry for project manager. Clone this repository a

Leonardo Gago 6 Dec 31, 2022
Diff Match Patch is a high-performance library in multiple languages that manipulates plain text.

The Diff Match and Patch libraries offer robust algorithms to perform the operations required for synchronizing plain text. Diff: Compare two blocks o

Google 5.9k Dec 30, 2022