Awesome Open Source
Awesome Open Source

Visualization for selfspy | Plots for selfstats

Examples

🐭 Clicks

Last hours (bar chart)

Clicks Hours

Total (pie chart)

Clicks Total

🎹 Keystrokes

Last hours (bar chart)

Keystrokes Hours

Total (pie chart)

Keystrokes Total

Other visualizations

Not yet 🎅.

made-with-python


Command line

The graphs above have been generated by these commands.

You need to add selfvis.py in your PATH. And then run:

$ selfvis.py --human-readable --pactive --back 8 h

Or:

$ selfvis.py --human-readable --ratios --back 8 h

Installation

Install selfspy, then the requirements with pip :

$ pip install -r requirements.txt

You might need to give it sudo rights :

$ sudo pip install -r requirements.txt

Usage

The script is a modified version of the selfstats program. The same options apply. Try e.g.

$ python selfvis.py

Code status

Currently implemented is a breakdown of hours (stacked bar chart) and a pie chart (all time totals). Both plots are saved for clicks and for keypresses, respectively.

It's very likely that long intervals aren't split correctly.

🔧 Options

Filtering options of original selfstats continue to work. See here.


📝 Config

In ~/.selfspy/simplification_rules.txt, add rules of the form regexp --> name

For examples:

^\s*::\s*$ --> unknown
^(.+)::\s*$ --> \1
^(.+)::.*$ --> \1
# ^(.+)::(\w+).*$ --> \1:\2
^Firefox::.*YouTube.*$ --> Browser (Youtube)
^Firefox::.*GitHub.*$ --> Browser (GitHub)
^Firefox::.*Google Search.*$ --> Browser (search)
# ^.*Skype.*$ --> Skype
# ^.*Zimbra.*$ --> Mail
# ^.*\bmutt\b.*$ --> Mail
# ^.*\bzsh\b.*$ --> shell

to keep descriptions in legends short and expressive. Last matching rule (LHS) wins.

See this example for the rules I like.


FAQ 🔍

Q: Is there a nice webpage to display the graphs?

A: Yes, use this HTML file, host it locally.

  1. Download it raw from here,
  2. Put it somewhere where your local web server can find it (~/Public/, ~/www/ or whatever, depending on your system),
  3. Generate the graphs in the same folder (you can do it on a daily basis, e.g. with a cron job,
  4. Access the page on your web-browser. Tadaa!

It uses StrapDown.js.

Q: Is it supposed to be that slow?

A: Yup, don't expect your graphs to be produced in two seconds, it can take up-to 15 seconds.

A: Note: You can use an option to shorten the time window used for the plot: for instance selfvis.py --back 8 h only uses the data from the last 8h.

Q: Can I ...?

A: Yes, as long as you respect the terms of the GPLv3 License.


Other self-quantified projects ?

  • uLogMe: keep track of your computer activity throughout the day: visualize your active window titles and the number and frequency of keystrokes, in beautiful and responsive HTML timelines.
  • Munin, can also help to keep track of the uptime (and many more stats) of your (Linux) machine. See these plugins I wrote for my Munin.
  • My minimalist dashboard, generated every hour (with a crontab file), with this bash script GenerateStatsMarkdown.sh.

💁 About

📝 Authors?

📜 License ? GitHub license

GPLv3 Licensed (file LICENSE). Lilian Besson, 2016.

Maintenance Ask Me Anything ! Analytics

ForTheBadge built-with-swag

ForTheBadge uses-badges ForTheBadge uses-git

ForTheBadge uses-html ForTheBadge uses-css ForTheBadge uses-js


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Python (1,140,957) 
Open Source (7,589) 
Visualization (5,538) 
Related Projects
Advertising 📦 9
All Projects
Application Programming Interfaces 📦 120
Applications 📦 181
Artificial Intelligence 📦 72
Blockchain 📦 70
Build Tools 📦 111
Cloud Computing 📦 79
Code Quality 📦 28
Collaboration 📦 30
Command Line Interface 📦 48
Community 📦 81
Companies 📦 60
Compilers 📦 60
Computer Science 📦 74
Configuration Management 📦 39
Content Management 📦 167
Control Flow 📦 197
Data Formats 📦 77
Data Processing 📦 266
Data Storage 📦 132
Economics 📦 60
Frameworks 📦 198
Games 📦 122
Graphics 📦 103
Hardware 📦 148
Integrated Development Environments 📦 47
Learning Resources 📦 147
Legal 📦 28
Libraries 📦 119
Lists Of Projects 📦 21
Machine Learning 📦 336
Mapping 📦 61
Marketing 📦 15
Mathematics 📦 55
Media 📦 228
Messaging 📦 97
Networking 📦 304
Operating Systems 📦 84
Operations 📦 120
Package Managers 📦 52
Programming Languages 📦 229
Runtime Environments 📦 96
Science 📦 42
Security 📦 375
Social Media 📦 26
Software Architecture 📦 70
Software Development 📦 68
Software Performance 📦 57
Software Quality 📦 127
Text Editors 📦 45
Text Processing 📦 131
User Interface 📦 310
User Interface Components 📦 465
Version Control 📦 29
Virtualization 📦 68
Web Browsers 📦 38
Web Servers 📦 25
Web User Interface 📦 194