Fix an issue with how quarters were calculated

Ended up throwing off the final estimate by 6 quarters.
content
Bradlee Speice 2016-04-06 20:41:16 -04:00
parent f685c2ce5d
commit a9039d5269
1 changed files with 16 additions and 16 deletions

View File

@ -60,7 +60,7 @@
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
"collapsed": false
},
"outputs": [],
"source": [
@ -389,7 +389,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 12,
"metadata": {
"collapsed": false
},
@ -398,7 +398,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Quarters left starting 2068: 2\n",
"Quarters left starting 2068: 8\n",
"Remaining heartbeats after that: 4760716\n"
]
}
@ -407,7 +407,7 @@
"remaining_leap = remaining_4y - leap_day_count\n",
"# Ignore leap day in the data set\n",
"heartbeats_quarter = hr_df_full[(hr_df_full.index.month != 2) &\n",
" (hr_df_full.index.day != 29)]['value'].sum() * 4\n",
" (hr_df_full.index.day != 29)]['value'].sum()\n",
"quarters_left = remaining_leap // heartbeats_quarter\n",
"remaining_year = remaining_leap - quarters_left * heartbeats_quarter\n",
"\n",
@ -419,12 +419,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"So, that analysis gets me through the 2<sup>nd</sup> quarter in 2068, specifically to June 1<sup>st</sup>, 2068. Final step, using that minute estimate to figure out how many minutes past that I'm predicted to have:"
"So, that analysis gets me through until January 1<sup>st</sup> 2070. Final step, using that minute estimate to figure out how many minutes past that I'm predicted to have:"
]
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 13,
"metadata": {
"collapsed": false
},
@ -432,10 +432,10 @@
{
"data": {
"text/plain": [
"datetime.datetime(2069, 8, 23, 5, 28)"
"datetime.datetime(2070, 2, 23, 5, 28)"
]
},
"execution_count": 14,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
@ -443,7 +443,7 @@
"source": [
"from datetime import timedelta\n",
"\n",
"base = datetime(2068, 7, 1)\n",
"base = datetime(2070, 1, 1)\n",
"minutes_left = remaining_year // minute_mean\n",
"\n",
"kaput = timedelta(minutes=minutes_left)\n",
@ -454,11 +454,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"According to this, I've got until August 23<sup>rd</sup>, 2069 at 5:28 PM in the evening before my heart gives out.\n",
"According to this, I've got until February 23<sup>rd</sup>, 2070 at 5:28 PM in the evening before my heart gives out.\n",
"\n",
"# Summary\n",
"\n",
"Well, that's kind of a creepy date to know. As I said at the top though, **this number is totally useless in any medical context**. It ignores the rate at which we continue to get better at making people live longer, and is extrapolating from 3 months' worth of data the rest of my life.\n",
"Well, that's kind of a creepy date to know. As I said at the top though, **this number is totally useless in any medical context**. It ignores the rate at which we continue to get better at making people live longer, and is extrapolating from 3 months' worth of data the rest of my life. Additionally, throughout my time developing this post I made many minor mistakes. I think they're all fixed now, but it's easy to mix a number up here or there and the analysis gets thrown off by a couple years.\n",
"\n",
"Even still, I think philosophically humans have a desire to know how much time we have left in the world. [Man is but a breath](https://www.biblegateway.com/passage/?search=psalm+144&version=ESV), and it's scary to think just how quickly that date may be coming up. This analysis asks an important question though: what are you going to do with the time you have left?\n",
"\n",
@ -468,21 +468,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"display_name": "Python 3",
"language": "python",
"name": "python2"
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.10"
"pygments_lexer": "ipython3",
"version": "3.5.1"
}
},
"nbformat": 4,