Skip to content

mzks/apple_health

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apple_health

Data manager to export iPhone health data as pandas.DataFrame


Nowadays, there are many devices to measure our health. For example, smart watch, body scale, and app to record our diet. Frequently, they are able to export their data, however, the formats have much varieties. It requires a lot of work to investigate the formats for every device. Fortunately, these data are integrated to Health.app on iPhone. Of course, we can see the data and nice graphs on our iPhone, but we want to analyze and visualize the data by ourselves! This repository provides a conversion tool of the data to panda's DataFrame on python environment.

Example of data visualization

Table of Contents

Installation

On your system,

$ python -m pip install git+https://github.com/mzks/apple_health

Export data

Step by step explaination is here

Simple Usage

Online usage on notebook is here.

Getting started is,

from apple_health import manager
man = manager()
man.add_path('/path/to/your/zipfile/directory/')
man.set_zip_name('export.zip')
man.as_datetime = True # If you want to obtain the data as datetime type.

Then, df = man.get_df() (takes a few minutes) will generate data as pandas.DataFrame.

Development

Please make issues and pull-requests freely.