diff --git a/README.md b/README.md index dd85aa8..2fee0f9 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ data from: * Web browser * Loop Habits +* * Nextcloud backup * Taskwarrior +* * Run 'task export' * Wallabag * Journal * RSS stars diff --git a/notebook.ipynb b/notebook.ipynb index 458435b..69c86f2 100644 --- a/notebook.ipynb +++ b/notebook.ipynb @@ -9,14 +9,15 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 103, "metadata": {}, "outputs": [], "source": [ "import json\n", "from tasklib import TaskWarrior\n", "import datetime\n", - "import pandas as pd" + "import pandas as pd\n", + "import matplotlib.pyplot as plt" ] }, { @@ -43,34 +44,54 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": 100, "metadata": {}, "outputs": [], "source": [ "with open('data/task.json', 'r') as myfile:\n", " task = json.load(myfile)\n", "\n", - "tasks = pd.DataFrame.from_dict(task)" + "tasks = pd.DataFrame.from_dict(task)\n", + "tasks.set_axis(tasks['entry'], axis='index', inplace=True)\n", + "tasks = tasks.drop(['annotations', 'depends', 'description', 'parent', 'uuid', 'entry'], axis=1)\n", + "only2019(tasks).count()" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 105, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "(array([164., 3., 27., 2., 11., 1., 2., 1., 2., 2.]),\n", + " array([ 0. , 1.5, 3. , 4.5, 6. , 7.5, 9. , 10.5, 12. , 13.5, 15. ]),\n", + " )" + ] + }, + "execution_count": 105, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAGbpJREFUeJzt3Xu4XVV97vHvK+GumEA2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aajYLKdN1bm9S7mfTmaH9d+eeB3SLi7Abb7EG6YHljxzq8BUZ6bG3uYxfSE8NBW/AKZ5tV2hW9WfHylfaJpDdw69ftQ7qy/PJW7tZWI+lw0qvR/+eQHxlf0ZuZFc5X9GZmhXPQm5kVzkFvZlY4B72ZWeEc9GZmhXPQm5kV7v8DqVU+C7hdbGQAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], "source": [ - "# this was dumb, using a list\n", + "l = only2019(tasks).tags.dropna().to_list()\n", + "flat_list = [item for sublist in l for item in sublist]\n", "\n", - "tagslist = []\n", - "for e in task:\n", - " # filter based on date\n", - " ###\n", - " # only check tags where they exist\n", - " if 'tags' in e.keys():\n", - " count += 1\n", - " tagslist.append(e[\"tags\"])\n", - "\n", - "print(tagslist)" + "plt.hist(flat_list)" ] }, { @@ -317,7 +338,7 @@ }, { "cell_type": "code", - "execution_count": 182, + "execution_count": 69, "metadata": {}, "outputs": [], "source": [