# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
# %matplotlib inline

import numpy as np
import pandas as pd
from scipy import stats, integrate
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(color_codes=True)
import pandas as pd
import json
from pandas.io.json import json_normalize


# +
alldata = pd.read_json('./data/MDData.db.json')
dt = pd.DataFrame(alldata['MDData.db']['dailyActivityLog'], columns = ['Id','steps', 'calories', 'recordedForDate'])
mt = pd.DataFrame( alldata['MDData.db']['minutelyActivityLog'], columns = ['Id', 'steps', 'calories', 'recordedForDate'])
dt['Id'] = dt['Id'].astype('int64')
dt['steps'] = dt['steps'].astype('int64')
dt['recordedForDate'] = dt['recordedForDate'].astype('int32')
dt['recordedForDateHR'] = pd.to_datetime(dt['recordedForDate'], unit='s')
dt = dt.sort_values(['Id'], ascending=[False])

mt['Id'] = mt['Id'].astype('int64')
mt['steps'] = mt['steps'].astype('int64')
mt['recordedForDate'] = mt['recordedForDate'].astype('int32')
mt['recordedForDateHR'] = pd.to_datetime(mt['recordedForDate'], unit='s')
mt = mt.sort_values(['Id'], ascending=[False])
# -

dt





StarcoderdataJupyterScriptsDedupFiltered