finished some jrnl analysis, not sure what more to do other than NLP stuff maybe

This commit is contained in:
Anish Lakhwara 2020-01-31 01:47:09 +11:00
parent 10fb8fb585
commit 58c3ee7775
2 changed files with 161 additions and 6 deletions

View file

@ -6,7 +6,7 @@ data from:
* Web browser
* Loop Habits
* * Nextcloud backup
* * Nextcloud backup -> rename 'Date' to 'date'
* Taskwarrior
* * Run 'task export'
* Wallabag

View file

@ -17,6 +17,151 @@
" return df.filter(like='2019', axis=0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Shaarli"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Journal"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### make a journal_fixer script \n",
"\n",
"### import journal into habits data"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"According to habits I have 49 Journal entries\n",
"\n",
"\n",
"Let's compare that with this data"
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {},
"outputs": [],
"source": [
"import json"
]
},
{
"cell_type": "code",
"execution_count": 106,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"tags 87\n",
"text 88\n",
"title 88\n",
"dtype: int64"
]
},
"execution_count": 106,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"with open('data/tiddlers.json' , 'r') as file:\n",
" tiddly = json.load(file)\n",
"\n",
"jrnl = pd.DataFrame.from_dict(tiddly)\n",
"jrnl.set_axis(jrnl['title'], axis='index', inplace=True)\n",
"jrnl = only2019(jrnl.drop(['created', 'modified'], axis=1))\n",
"jrnl.count()"
]
},
{
"cell_type": "code",
"execution_count": 107,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"tags 30\n",
"text 30\n",
"title 30\n",
"dtype: int64"
]
},
"execution_count": 107,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sameDay = jrnl\n",
"sameDay['title'] = sameDay.title.map(lambda x: x[:-8])\n",
"sameDay[sameDay['title'].duplicated(keep=False)].count()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Where are the [87-15=(73)] - 49 = 23 entries that exist but aren't in my loop Habits?\n",
"\n",
"23 Entries before March?"
]
},
{
"cell_type": "code",
"execution_count": 119,
"metadata": {},
"outputs": [],
"source": [
"def beforeMarch(df):\n",
" return df.filter(regex='(January|Febuary|March)', axis=0)"
]
},
{
"cell_type": "code",
"execution_count": 121,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"tags 23\n",
"text 23\n",
"title 23\n",
"dtype: int64"
]
},
"execution_count": 121,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"beforeMarch(jrnl).count()"
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -185,6 +330,16 @@
" print(\" \" + e)"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [],
"source": [
"# Most described task?\n",
"## TODO"
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -194,7 +349,7 @@
},
{
"cell_type": "code",
"execution_count": 69,
"execution_count": 100,
"metadata": {},
"outputs": [],
"source": [
@ -206,7 +361,7 @@
},
{
"cell_type": "code",
"execution_count": 183,
"execution_count": 105,
"metadata": {},
"outputs": [
{
@ -404,14 +559,14 @@
"12 0.387097 0.548387 1.096774 0.709677 0.612903 0.000000 0.612903"
]
},
"execution_count": 183,
"execution_count": 105,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#colNames = ['date', 'Godmode', 'Meditate', 'Exercise', 'Piano','Read', 'Journal', 'Gratitude', 'devlog','Plants', 'Job', 'Draw']\n",
"checks = pd.read_csv('LoopHabits/Checkmarks.csv', header=0)\n",
"checks = pd.read_csv('data/LoopHabits/Checkmarks.csv', header=0)\n",
"checks.set_axis(checks['date'], axis='index', inplace=True)\n",
"checks = checks.drop(['Godmode', 'Piano', 'Gratitude', 'Job', 'date'], axis=1)\n",
"df = MarchOnwards(only2019(checks))\n",
@ -429,7 +584,7 @@
},
{
"cell_type": "code",
"execution_count": 69,
"execution_count": 102,
"metadata": {},
"outputs": [],
"source": [