使用Google MyActivity的数据生成睡眠时间、睡眠程序和应用程序使用情况的报告:myactivity.google.com
analyseGoogleMyActivit的Python项目详细描述
分析GoogleMyActivity
使用Google MyActivity的数据生成睡眠时间、睡眠程序和应用程序使用情况的报告:myactivity.google.com在
睡眠数据和应用程序使用数据是基于以下假设生成的:
- 在
睡眠数据:
在Bed Time : Time at which User stops using phone and goes to bed. Wake Up Time : After bed time, the First Time at which User starts using phone.
- 在
在应用程序上花费的时间:应用程序和下一个应用程序的打开时间之间的时间差。在
在
首先按照以下步骤下载Google活动数据文件:
^{pr2}$安装:
pip install analyseGoogleMyActivity
要求:“numpy”,“pandas”,“matplotlib”
用法:
默认情况下,在当前工作目录中查找最新的抽头Zip
from analyseGoogleMyActivity import androidReport
reports = androidReport()
直接将抽头Zip传递到参数文件(如果Zip文件不在当前工作目录中,也传递其路径)
reports = androidReport(file='takeout-2020XXXXTXXXXXXZ-001.zip')
参数:
file : str, optional
Pass MyActivity JSON file or Takeout zip file with path. The default is 'MyActivity.json'.
apps : int or list , optional
No. of Top Apps or List of Apps to find usage for. The default is 12.
timezone : str
Pass the timezone region code. The default is 'in' for Indian Standard Time (IST).
excludeapps : List
List of app names to Exclude from App Usage calculation. The default is ['com.miui.home' ].
idealsleeptime : int
Ideal Sleep Time. The default is 8.
inlineimg : 0 or 1,
To include image in the Report itself or not. The default is 1.
showmarkerday: 0 or 1,
To show day on each marker in sleep routine graphs. The default is 0.
output : 0 or 1, optional
If 1 , Returns Dictionary with Results in Pandas DataFrames, otherwise returns Reports names. The default is 1.
yeartabs : 0 or 1, optional
To Show Year & its Data in Tabs, The default is 1.
verbose : 0 or 1, optional
Shows Additional Progess during Report Generation. The default is 0.
Returns
Dictionary if Parameter output = 1 OR
Tuple having Generated Report names if output = 0
-------
Dictionary with Following Keys having Values
'AppUsage': Time at which an App is opened, Pandas DataFrame
'AppDailyUsage': Day wise data of App opened, Pandas DataFrame
'SleepData': Bed Time & WakeUp Time with Sleep Duration , Pandas DataFrame
'SleepYearlyTable': Yearly Stats of Sleep Time & Sleep Routine
'SleepMonthlyTable': Monthly Stats of Sleep Time & Sleep Routine
'AppYearlyTable': Yearly App Usage Stats
'AppMonthlyTable': Monthly App Usage Stats
__________________________________________________________
- 项目
标签: