Generates Report of Sleep Time, Sleep Routine and App Usage using Data from Google MyActivity : myactivity.google.com
Project description
analyseGoogleMyActivity
Generates Reports of Sleep Time, Sleep Routine and App Usage using Data from Google MyActivity : myactivity.google.com
Sleep Data and App Usage Data are generated on the basis of Following Assumptions :
-
Sleep Data :
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.
-
Time Spent on a App : Difference of Time between the opening time of the app and the next app.
First Download Google Activity Data File by following these steps :
1. Login to Google account. Go to : https://takeout.google.com/
2. Under "Select data to include", Click on "Deselect all" .
3. Scroll Down and Select "My Activity" . Click on "Multiple formats". In "Activity records, Choose 'JSON' & then 'ok'.
4. Scroll Down. Click on "Next Step" and then on "Create Export".
5. Wait for the Google Data Download mail to arrive in your Gmail. Download the Zip file.
Installation :
pip install analyseGoogleMyActivity
Requirements : "numpy", "pandas", "matplotlib"
Usage :
By Default, Looks for the Latest Takeout Zip in the current working directory
from analyseGoogleMyActivity import androidReport
reports = androidReport()
Directly Pass the Takeout Zip to the parameter file ( Pass its Path also if the zip file is not in the current working directory)
reports = androidReport(file='takeout-2020XXXXTXXXXXXZ-001.zip')
Parameters :
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
__________________________________________________________
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file analyseGoogleMyActivity-0.6.tar.gz
.
File metadata
- Download URL: analyseGoogleMyActivity-0.6.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91e1504db56a3d0e7f3922625d36a015c91d1a36a84ed1a5e3b174baedb1e55b |
|
MD5 | 1cf83b7a64044d73d610b5925a5c7aec |
|
BLAKE2b-256 | 262d0411c989c813799e4d3e89f1eccd6b57ed4eb05a1f512162834e87e842f8 |