Coder Social home page Coder Social logo

tuur29 / timespandash Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 776 KB

A small tool to generate statistics and graphs from a list of timestamps

Home Page: https://tuur29.github.io/timespandash/

License: GNU General Public License v3.0

Shell 1.25% JavaScript 0.67% TypeScript 96.22% HTML 0.31% SCSS 1.55%

timespandash's Introduction

Timespan Dashboard

A small tool to generate statistics and graphs form a list of timestamps.

Configuration

You can edit all the settings in /config.json, these are all possible options:

{
  "url": "https://<URL>:<SERVER_PORT>/<PATH>?keywords=",
  "defaultKeywords": "sleep,wake",
  "allPossibleKeywords": [
    { "keywords": "boot,shut", "description": "PC" },
    { "keywords": "sleep,wake", "description": "Sleep" }
  ],
  "settings": {
		"mergebreaks": { "enabled": true, "value": "10" },
		"remshortenthan": { "enabled": true, "value": "10" },
		"split": {"enabled": true },
		"avg": {"value": "7" },
		"median": {"enabled": true }
	}
}

You can find additional settings by searching for 'new Setting' in this repo: link.

Example input

start at Mon Dec 26 10:01:39 GMT+0100 2016
stop at Mon Dec 26 22:55:33 GMT+0100 2016
start at Tue Dec 27 09:26:36 GMT+0100 2016
stop at Tue Dec 27 21:30:59 GMT+0100 2016

There is also a complete test dataset called /sampledata.txt.

Development server

Run npm start for a dev server. Navigate to http://localhost:4200/. The frontend will automatically reload if you change any of the source files.

Build & Deploy

Run npm run build --prod -prod --no-aot --aot=false --base-href ./ to build the project. The build artifacts will be stored in the dist/ directory.

Github Pages

When building for Github Pages you should build with add: --base-href "https://USERNAME.github.io/REPOSITORY_NAME/". Next, duplicate the index.html file and name it 404.html .

To publish it, remove /dist from .gitignore, make a local commit and push to the gh-pages branch with:

$ git push origin `git subtree split --prefix dist master`:gh-pages --force

Lastly undo the edit in .gitignore and reset your master branch with git reset HEAD~. Don't forget to re-enable your custom domain if you are using one.

More Info

Automated deploy

The script deploy.sh should do all the above actions automatically. You should have completed the process manually first before you use the script.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

timespandash's People

Contributors

tuur29 avatar

Stargazers

Panagiotis Mirmigkis avatar

Watchers

James Cloos avatar  avatar

timespandash's Issues

New view ideas

  • Add graph with percentage of time taken up every day, week, month
  • Add boxplot for length & count (also mention Q1 & Q3)
  • Add line graphs for each week or year to compare between it and average of all
  • Add graph to show diff between data and average length -> "How has avg time spent on session changed?"

Fix writing panel visible state to localstorage

Also mentioned as: "Fix unable to change localstorage on some instances of app"

Seems to me like this only happens when a JS error occurs in another part of the program. Might be 'fixable' by using try {} catch (e) {}.

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.