Giter Club home page Giter Club logo

daylio-visualisations's Introduction

daylio visualization

This repository contains a collection of scripts that written to visualize the data from the mood tracker "daylio".

All code is written in python3.

Installation

Python dependencies

pip install -r requirements.txt

Getting the data

The scripts assume that you have an entries.db in the current working directory.

Non-rooted phone

The file can be extracted from an android phone using adb backup by running export_from_backup.py. You need to enable USB Debugging first and authorize your computer with your phone.

Rooted phone

You can get this file from a rooted phone with

adb shell 'su -c "cat /data/data/net.daylio/databases/entries.db"' > entries.db

Simulated data

To run the scripts without actual data, run them with the --random-data option.

Visualisations

Show all visualizations

To show all visualizations in one plot, simply run

./main.py

Example of all visualizations

Mood graph

The mood graph is the classical visualization chosen by daylio. It simply shows a graph of all the daily averages and colours the parts of the graph in the mood colours.

Mood graph example

./main.py -t mood_graph

Year in pixels

The first visualization is using matplotlib to generate grid with one row for each month and one pixel for each day. Black pixels are used if the month has less than 31 days. White pixels are days on which no mood was tracked. For all other pixels the colour-scheme from daylio is used.

Example year in pixels

./main.py -t year_in_pixels

Average calculation

Daylio uses a simple average of all mood values during one day to calculate the mood value of the day. This has the disadvantage of disproportionately valuing time in which I often track my mood. These scripts use a different method that is based on the trapezoidal rule. The calculation is done on a daily basis, i.e. it does not use the values of other days.

Difference in mood average using the two methods

./main.py -t average_calculation

Entries per day

The power of trapezoidal average calculation and mood tracking in general is stronger the more often the mood is tracked. entries_per_day.py plots the amount of tracked entries per day.

Plot of the entries per day

./main.py -t entries_per_day

daylio-visualisations's People

Contributors

andynd avatar pajowu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.