Skip to content

Private repository for the Cozie-Apple deployment leady be Ben

License

Notifications You must be signed in to change notification settings

buds-lab/calma-esse-heat-stress-public

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calma-esse-heat-stress-internal

Table of Contents
  1. About The Project
  2. Getting Started
  3. License
  4. Contact
  5. Acknowledgments

About The Project

This project is part of a Masterthesis of Ben Gottkehaskamp at the Chair for Building Technology and Climate Responsive Design at the Technical University of Munich (TUM) and in cooperation with the budslab at the National University of Singapore (NUS).

Calma

'Calma' is the debugging phase of this project, which consisted of two subprojects. One testing the final study procedure for 'Esse' and one to test features like the geolocation features.

Calma debugging

need to fill up.

Data Collection: 100% Documentation: 0%

Geo-location testing

This survey serves as a validation tool for assessing the geospatial capabilities of Cozie. Its purpose is to conduct multiple passes along specific routes to identify discrepancies in longitude and latitude data, while also incorporating supplementary metadata for in-depth analysis of various influences. The primary focus is on outdoor locations and travel patterns following periods spent indoors. Besides the retreived Cozie data the following features are available in form of survey data: tag/q_location_area tag/q_location_time tag/q_connection_network tag/q_connection_people tag/q_envi_traversion tag/q_envi_sky tag/q_envi_rain, as well as some additional features that categorize the run like tag/q_study tag/q_study_amount tag/q_study_setpoint.

Esse

Esse is the official study. Need to fill up.

Overview of all data column names:

Index column, or main time column is 'time_index'

Cozie Data (ws_, ts_, q_)

Main Variables from Cozie V3:, with ID fields 'id_', watch survey data 'ws_' and time series data 'ts_', questionnaire data 'q_'

Name Description
id_participant Unique identifier for each participant
ws_HRV Heart Rate Variability in ms, provided by Apple HealthKit
ws/ts_heart_rate Heart rate in bpm, provided by Apple HealthKit
ws/ts_altitude Altitude in m
ws/ts_latitude Latitude in °
ws/ts_longitude Longitude in °
ws/ts_location_accuracy_horizontal Horizontal positioning accuracy in m
ws/ts_location_accuracy_vertical Vertical positioning accuracy in m
ws/ts_oxygen_saturation Blood oxygen saturation in % provided by Apple HealthKit
ws/ts_resting_heart_rate Resting heart rate in bpm, provided by Apple HealthKit
ws/ts_stand_time Stand time in min?, provided by Apple HealthKit
ws/ts_step_count Number of steps walked, provided by Apple HealthKit.
ws/ts_walking_distance Distance walked in m, provided by Apple HealthKit
q_ ... Have a look at the ws.json file for further columns
Computed Data (c_, tw_, flag_)

Computed generally have the prefix of 'c_', some are specifically computed for the thermal walk, and have the prefix 'tw_' and flags, showing something is off 'flag_' for checking during the experiment

Name Description
c_difference_time_ws XX
c_run_number XX
c_run_change XX
c_ws_step_count XX
c_ws_step_count_intensity XX
c_ws_step_count XX
c_latitude XX
c_longitude XX
c_distance XX
c_movespeed XX
c_flag_difference XX
flag_c_movespeed XX
flag_ws_step_count XX
tw_run_number XX
Scoria Data (Scoria_)

From Scoria have the prefix 'Scoria_'

Name Description
Scoria_latitude XX
Scoria_longitude XX
Scoria_horizontal_accuracy XX
Scoria_msl_altitude XX
Scoria_ellipsoid_altitude XX
Scoria_story XX
Scoria_speed XX
Scoria_speed_accuracy XX
Skintemperature Data (Skintemp_)

From Scoria have the prefix 'Skintemp_'

Name Description
Skintemp_Value XX

Scoria

The file 'Scoria.py' should be executed via the terminal window in order to be able to decrypt the Scoria data. This file has its own dependencies, only the decrypted data will be used in the other source code files.

Prerequisites

Install at least SQLITE Versoin 3.37.0 due to problems with STRICT KEYWORD, I used an testet it with SQlite Version 3.38.2 and higher Version should work as well.

Move your '.sqlite' files to the 'sqlite3.exe' location from the installation, in my case it is under C:\sqlite\Library\bin. Copy the file path directory as text.

Then, open the terminal on windows with 'windows' + 'Key-R'

Locate yourself and run the python 'Scoria.py' file with:

python 'path/Scoria.py'

The program task you to enter a file_id, which is the filename without the extension. Do this for every file you want to decrypt:

Enter file ID (or 'exit' to quit): esse07_03_Scoria_Export_2024-03-12_13-51-19

The result should look something like this if successful and a result 'filename.csv':

C:/sqlite/Library/bin/esse07_03_Scoria_Export_2024-03-12_13-51-19
C:/sqlite/Library/bin/sqlite3.exe
.open C:/sqlite/Library/bin/esse07_03_Scoria_Export_2024-03-12_13-51-19.sqlite
.mode csv
.headers on
.once C:/sqlite/Library/bin/esse07_03_Scoria_Export_2024-03-12_13-51-19.csv
SELECT * FROM location;
.quit

Built With

Languages: Python Jupyter Notebook

Libaries: Pandas Matplotlib NumPy Plotly Geopandas request coziepy add more

Getting Started

Prerequisites

  • Create and activate a virtual Python environment.
  • Install the requirements.txt: (are currently not up to date!)
pip install -r /path/to/requirements.txt 

versionDisplay

Check via cmd 'pip list' your current version installed.

coziepy       ==0.0.15
DateTime      ==5.2
geopandas     ==0.13.2
jupyter_core  ==5.3.2
matplotlib    ==3.7.2
numpy         ==1.25.2
pandas        ==2.1.0
plotly        ==5.16.1
requests      ==2.31.0
seaborn       ==0.12.2

Installation

  • Clone the repository
  • Follow the Prerequisites steps
  • Setup the config.py file wit the following inputs under Esse\src\config.py
API_KEY  = #Enter Your API Key here. It is provided by the [Cozie](https://cozie-apple.app). Please contact us at cozie.app@gmail.com if you need one. 

License

Distributed under the MIT License. See LICENSE.txt for more information.

Acknowledgments

Thank you for your contributions and support in this project:

About

Private repository for the Cozie-Apple deployment leady be Ben

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages