使用Google MyActivity的数据生成睡眠时间、睡眠程序和应用程序使用情况的报告:myactivity.google.com

analyseGoogleMyActivit的Python项目详细描述


分析GoogleMyActivity

使用Google MyActivity的数据生成睡眠时间、睡眠程序和应用程序使用情况的报告:myactivity.google.com在

睡眠数据和应用程序使用数据是基于以下假设生成的:

  1. 睡眠数据:

       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.
    
  2. 在应用程序上花费的时间:应用程序和下一个应用程序的打开时间之间的时间差。在

首先按照以下步骤下载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
 __________________________________________________________

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Selenium Webdrive(Java)使用名称的预定义部分生成变量   java如何在Android Studio中创建水平滚动的标题?   Java中的层次枚举   java从响应获取对象列表   从向后兼容的可序列化对象中提取java超类   使用放大按钮在滚动条上显示java ChangeListener   java Jsp默认日期格式   java广播接收器未接收   当字符不是来自英文字母表时,java Datadog字符串编码   java GWT将字符串转换为小数点后2位的浮点值   java Android SMS API   java在codenameone中同时滚动X和Y窗格   Java应用程序使用Datacap WTM服务中止ibm data studio批处理   java如何在Struts配置文件中配置文件夹中的文件路径