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
A log likelihood fit for extracting neutrino oscillation parameters

A-log-likelihood-fit-for-extracting-neutrino-oscillation-parameters Minimised the negative log-likelihood fit to extract neutrino oscillation paramete

Vid Homsak 1 Jan 23, 2022
Домашние задания, выполненные на 3ем семестре РТУ МИРЭА, по дисциплине

ДЗ по курсу "Конфигурационное управление" в РТУ МИРЭА Описание В данном репозитории находятся домашние задания, выполненные на 3ем семестре РТУ МИРЭА,

Semyon Esaev 4 Dec 22, 2022
an opensourced roblox group finder writen in python 100% free and virus-free

Roblox-Group-Finder an opensourced roblox group finder writen in python 100% free and virus-free note : if you don't want install python or just use w

mollomm1 1 Nov 11, 2021
Flight Reservation App With Python

Flight Reservation App With Python

victor-h. 1 Nov 21, 2021
Control your gtps with gtps-tools!

Note Please give credit to me! Do not try to sell this app, because this app is 100% open source! Do not try to reupload and rename the creator app! S

Jesen N 6 Feb 16, 2022
This is a multi-app executor that it used when we have some different task in a our applications and want to run them at the same time

This is a multi-app executor that it used when we have some different task in a our applications and want to run them at the same time. It uses SQLAlchemy for ORM and Alembic for database migrations.

Majid Iranpour 5 Apr 16, 2022
Strawberry Benchmark With Python

Strawberry benchmarks these benchmarks have been made to compare the performance of dataloaders and joined database queries. How to use You can run th

Doctor 4 Feb 23, 2022
A complete python calculator with 2 modes Float and Int numbers.

Python Calculator This program is made for learning purpose. Getting started This Program runs using python, install it via terminal or from thier ofi

Felix Sanchez 1 Jan 18, 2022
jonny is a stack based programming language

jonny-lang jonny is a stack based programming language also compiling jonny files currently doesnt work on windows you can probably compile jonny file

1 Nov 24, 2021
Shopping-card - Shopping Card Project With Python

Shopping Card Project this application was built to handle problems with saving

moein98 1 May 06, 2022
Semester Project on Signal Processing @CS UCU 2021

Blur Detection with Haar Wavelet Transform Requirements Python3 opencv-python PyWavelets Install these using the following command: $ pip install -r r

ButynetsD 2 Oct 15, 2022
Inspect the resources of your android projects and understand which ones are not being used and could potentially be removed.

Android Resources Checker What This program will inspect the resources of your app and help you understand which ones are not being used and could pot

Fábio Carballo 39 Feb 08, 2022
Python Freecell Solver

freecell Python Freecell Solver Very early version right now. You can pick a board by changing the file path in freecell.py If you want to play a game

Ben Kaufman 1 Nov 26, 2021
Use Ghidra Structs in Python

Strudra Welcome to Strudra, a way to craft Ghidra structs in python, using ghidra_bridge. Example First, init Strudra - you can pass in a custom Ghidr

Dominik Maier 27 Nov 24, 2022
An extension for Arma 3 that lets you write extensions in Python 3

An Arma 3 extension that lets you to write python extensions for Arma 3. And it's really simple and straightforward to use!

Lukasz Taczuk 48 Dec 18, 2022
A Python library for inspecting JVM class files (.class)

lawu Lawu is a human-friendly library for assembling, disassembling, and exploring JVM class files. It's highly suitable for automation tasks. Documen

Tyler Kennedy 45 Oct 23, 2022
rebalance is a simple Python 3.9+ library for rebalancing investment portfolios

rebalance rebalance is a simple Python 3.9+ library for rebalancing investment portfolios. It supports cash flow rebalancing with contributions and wi

Darik Harter 5 Feb 26, 2022
Google Scholar App Using Python

Google Scholar App Watch the tutorial video How to build a Google Scholar App | Streamlit #30 Demo Launch the web app: Reproducing this web app To rec

Chanin Nantasenamat 4 Jun 05, 2022
Nuclei - Burp Extension allows to run nuclei scanner directly from burp and transforms json results into the issues

Nuclei - Burp Extension Simple extension that allows to run nuclei scanner directly from burp and transforms json results into the issues. Installatio

106 Dec 22, 2022
banking system with python, beginner friendly, preadvanced level

banking-system-python banking system with python, beginner friendly, preadvanced level Used topics Functions else/if/elif dicts methods parameters hol

Razi Falah 1 Feb 03, 2022