{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Bought a Bike\n",
"\n",
"My bike is 10 years old. \n",
"It cost `$100`, but I still use it today. \n",
"I wondered, **how profitably I invested** that `$100` in my bike?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Profitablity Calc\n",
"\n",
"I have prepared a simple calculator that can help to prevent spontaneous purchases.\n",
"\n",
"The calculator needs the following input parameters:\n",
"\n",
"- `purchase_name` - purchase name;\n",
"- `price` - purchase price;\n",
"- `usage_years` - how many years the purchase will be used;\n",
"- `usage_seasons` - what seasons the purchase will be used, `winter`, `spring`, `summer`, `autumn` are allowed;\n",
"- `usage_per_week` - how many times a week the purchase will be used;\n",
"- `price_sale_pct` - how much the purchase was later sold for."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# Import libs\n",
"import pandas as pd\n",
"import calendar\n",
"import matplotlib.pyplot as plt\n",
"import seaborn as sns"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"def profitability(purchase_name, price, usage_years, usage_seasons, usage_per_week, price_sale_pct=0):\n",
" # Calculate number of weeks in season\n",
" days = 0\n",
" seasons = list(set(usage_seasons))\n",
" for season in seasons:\n",
" if season == 'winter':\n",
" days += calendar.monthrange(1970, 12)[1]\n",
" days += calendar.monthrange(1970, 1)[1]\n",
" days += calendar.monthrange(1970, 2)[1]\n",
" elif season == 'spring':\n",
" days += calendar.monthrange(1970, 3)[1]\n",
" days += calendar.monthrange(1970, 4)[1]\n",
" days += calendar.monthrange(1970, 5)[1]\n",
" elif season == 'summer':\n",
" days += calendar.monthrange(1970, 6)[1]\n",
" days += calendar.monthrange(1970, 7)[1]\n",
" days += calendar.monthrange(1970, 8)[1]\n",
" elif season == 'autumn':\n",
" days += calendar.monthrange(1970, 9)[1]\n",
" days += calendar.monthrange(1970, 10)[1]\n",
" days += calendar.monthrange(1970, 11)[1]\n",
" else:\n",
" return 'ERROR: not a season! Add winter, spring, summer or autumn.'\n",
" usage_weeks = days/7\n",
"\n",
" # How many times have used the purchase\n",
" usage_num = round(usage_years * usage_weeks * usage_per_week)\n",
" # Сost per use\n",
" price_per_usage = round((price - price_sale_pct) / usage_num, 2)\n",
" \n",
" result = pd.DataFrame({'purchase_name':[purchase_name],\n",
" 'price':[price],\n",
" 'usage_years':[usage_years],\n",
" 'usage_seasons':[usage_seasons],\n",
" 'usage_per_week':[usage_per_week],\n",
" 'price_sale_pct':[price_sale_pct],\n",
" 'usage_num':[usage_num],\n",
" 'price_per_usage':[price_per_usage]\n",
" })\n",
"\n",
" return result"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example\n",
"\n",
"Let's test the calculator to answer if my old bike is useful acquisition."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
purchase_name
\n",
"
price
\n",
"
usage_years
\n",
"
usage_seasons
\n",
"
usage_per_week
\n",
"
price_sale_pct
\n",
"
usage_num
\n",
"
price_per_usage
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
my old bike
\n",
"
100
\n",
"
10
\n",
"
[spring, summer]
\n",
"
2
\n",
"
0
\n",
"
526
\n",
"
0.19
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" purchase_name price usage_years usage_seasons usage_per_week \\\n",
"0 my old bike 100 10 [spring, summer] 2 \n",
"\n",
" price_sale_pct usage_num price_per_usage \n",
"0 0 526 0.19 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"profitability('my old bike', 100, 10, ['spring', 'summer'], 2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For 10 years now, I've been cycling twice a week in the spring and summer, and I \"pay\" 19 cents each time.\n",
"It seems to be a bargain.\n",
"\n",
"One use can be understood as one hour of cycling or two hours, for example.\n",
"\n",
"Let's try to reduce the usage years to 1. Leave only summer for cycling."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
purchase_name
\n",
"
price
\n",
"
usage_years
\n",
"
usage_seasons
\n",
"
usage_per_week
\n",
"
price_sale_pct
\n",
"
usage_num
\n",
"
price_per_usage
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
my old bike
\n",
"
100
\n",
"
1
\n",
"
[summer]
\n",
"
2
\n",
"
0
\n",
"
26
\n",
"
3.85
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" purchase_name price usage_years usage_seasons usage_per_week \\\n",
"0 my old bike 100 1 [summer] 2 \n",
"\n",
" price_sale_pct usage_num price_per_usage \n",
"0 0 26 3.85 "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"profitability('my old bike', 100, 1, ['summer'], 2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The cost of `$3.85` at a time (or an hour) is no longer so attractive."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Profitability to Buy a Bike\n",
"\n",
"Recently, I liked a new bike in the store. \n",
"I could have made a spontaneous, thoughtless purchase, given into the mood. \n",
"However, now I want to estimate how much the new bike will actually cost me. Let's do the calcs.\n",
"\n",
"### Getting data\n",
"I will consider some of the uses for my new bike:\n",
"\n",
"- I'll buy it in the store for `$400`.\n",
"- I'll use it 1, 2, 4, 5, 6, 7, 8, 9 or 10 years.\n",
"- I plan to cycle only in summer.\n",
"- I want to cycle, maybe once a week, or on weekends, or time to time, or on weekdays.\n",
"- I'm not going to sell it."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
"
\n",
"
\n",
"
purchase_name
\n",
"
price
\n",
"
usage_years
\n",
"
usage_seasons
\n",
"
usage_per_week
\n",
"
price_sale_pct
\n",
"
usage_num
\n",
"
price_per_usage
\n",
"
\n",
" \n",
" \n",
"
\n",
"
0
\n",
"
bike
\n",
"
400
\n",
"
1.0
\n",
"
[summer]
\n",
"
1
\n",
"
0
\n",
"
13
\n",
"
30.77
\n",
"
\n",
"
\n",
"
0
\n",
"
bike
\n",
"
400
\n",
"
1.0
\n",
"
[summer]
\n",
"
2
\n",
"
0
\n",
"
26
\n",
"
15.38
\n",
"
\n",
"
\n",
"
0
\n",
"
bike
\n",
"
400
\n",
"
1.0
\n",
"
[summer]
\n",
"
3
\n",
"
0
\n",
"
39
\n",
"
10.26
\n",
"
\n",
"
\n",
"
0
\n",
"
bike
\n",
"
400
\n",
"
1.0
\n",
"
[summer]
\n",
"
5
\n",
"
0
\n",
"
66
\n",
"
6.06
\n",
"
\n",
"
\n",
"
0
\n",
"
bike
\n",
"
400
\n",
"
1.5
\n",
"
[summer]
\n",
"
1
\n",
"
0
\n",
"
20
\n",
"
20.00
\n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" purchase_name price usage_years usage_seasons usage_per_week \\\n",
"0 bike 400 1.0 [summer] 1 \n",
"0 bike 400 1.0 [summer] 2 \n",
"0 bike 400 1.0 [summer] 3 \n",
"0 bike 400 1.0 [summer] 5 \n",
"0 bike 400 1.5 [summer] 1 \n",
"\n",
" price_sale_pct usage_num price_per_usage \n",
"0 0 13 30.77 \n",
"0 0 26 15.38 \n",
"0 0 39 10.26 \n",
"0 0 66 6.06 \n",
"0 0 20 20.00 "
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Describe the purchase\n",
"purchase_name_b = 'bike'\n",
"price_b = 400\n",
"usage_years_b = [y/2 for y in range(2, 21, 1)] # from 1 to 10 years\n",
"usage_seasons_b = [['summer']] # cycling only in summer\n",
"usage_per_week_b = [1,2,3,5] # once a week, on weekends, time to time, on weekdays\n",
"price_sale_pct_b = 0 # do not sell\n",
"\n",
"columns = ['purchase_name', 'price', 'usage_years',\n",
" 'usage_seasons', 'usage_per_week', 'profitability'\n",
" ]\n",
"\n",
"profitability_bike = pd.DataFrame()\n",
"for years in usage_years_b:\n",
" for seasons in usage_seasons_b:\n",
" for times in usage_per_week_b:\n",
" pra_bike = profitability(purchase_name_b, price_b, years, seasons, times, price_sale_pct_b)\n",
" profitability_bike = profitability_bike.append(pra_bike)\n",
" \n",
"profitability_bike.head()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
"
],
"text/plain": [
" purchase_name price usage_years usage_seasons usage_per_week \\\n",
"0 bike 400 10.0 [summer] 5 \n",
"0 bike 400 9.5 [summer] 5 \n",
"0 bike 400 9.0 [summer] 5 \n",
"0 bike 400 8.5 [summer] 5 \n",
"0 bike 400 8.0 [summer] 5 \n",
"0 bike 400 7.5 [summer] 5 \n",
"0 bike 400 7.0 [summer] 5 \n",
"0 bike 400 6.5 [summer] 5 \n",
"0 bike 400 6.0 [summer] 5 \n",
"0 bike 400 10.0 [summer] 3 \n",
"0 bike 400 9.5 [summer] 3 \n",
"0 bike 400 5.5 [summer] 5 \n",
"0 bike 400 9.0 [summer] 3 \n",
"0 bike 400 8.5 [summer] 3 \n",
"0 bike 400 5.0 [summer] 5 \n",
"0 bike 400 8.0 [summer] 3 \n",
"0 bike 400 7.5 [summer] 3 \n",
"0 bike 400 4.5 [summer] 5 \n",
"0 bike 400 7.0 [summer] 3 \n",
"0 bike 400 10.0 [summer] 2 \n",
"0 bike 400 4.0 [summer] 5 \n",
"0 bike 400 6.5 [summer] 3 \n",
"0 bike 400 9.5 [summer] 2 \n",
"0 bike 400 9.0 [summer] 2 \n",
"0 bike 400 6.0 [summer] 3 \n",
"0 bike 400 3.5 [summer] 5 \n",
"0 bike 400 8.5 [summer] 2 \n",
"0 bike 400 5.5 [summer] 3 \n",
"0 bike 400 8.0 [summer] 2 \n",
"0 bike 400 3.0 [summer] 5 \n",
"0 bike 400 7.5 [summer] 2 \n",
"0 bike 400 5.0 [summer] 3 \n",
"0 bike 400 7.0 [summer] 2 \n",
"0 bike 400 4.5 [summer] 3 \n",
"0 bike 400 6.5 [summer] 2 \n",
"0 bike 400 2.5 [summer] 5 \n",
"0 bike 400 4.0 [summer] 3 \n",
"0 bike 400 6.0 [summer] 2 \n",
"0 bike 400 5.5 [summer] 2 \n",
"0 bike 400 3.5 [summer] 3 \n",
"0 bike 400 5.0 [summer] 2 \n",
"0 bike 400 10.0 [summer] 1 \n",
"0 bike 400 2.0 [summer] 5 \n",
"0 bike 400 9.5 [summer] 1 \n",
"0 bike 400 9.0 [summer] 1 \n",
"0 bike 400 4.5 [summer] 2 \n",
"0 bike 400 3.0 [summer] 3 \n",
"0 bike 400 8.5 [summer] 1 \n",
"0 bike 400 8.0 [summer] 1 \n",
"0 bike 400 4.0 [summer] 2 \n",
"0 bike 400 1.5 [summer] 5 \n",
"0 bike 400 7.5 [summer] 1 \n",
"0 bike 400 2.5 [summer] 3 \n",
"0 bike 400 7.0 [summer] 1 \n",
"0 bike 400 3.5 [summer] 2 \n",
"0 bike 400 6.5 [summer] 1 \n",
"0 bike 400 3.0 [summer] 2 \n",
"0 bike 400 6.0 [summer] 1 \n",
"0 bike 400 2.0 [summer] 3 \n",
"0 bike 400 5.5 [summer] 1 \n",
"0 bike 400 1.0 [summer] 5 \n",
"0 bike 400 2.5 [summer] 2 \n",
"0 bike 400 5.0 [summer] 1 \n",
"0 bike 400 1.5 [summer] 3 \n",
"0 bike 400 4.5 [summer] 1 \n",
"0 bike 400 2.0 [summer] 2 \n",
"0 bike 400 4.0 [summer] 1 \n",
"0 bike 400 3.5 [summer] 1 \n",
"0 bike 400 3.0 [summer] 1 \n",
"0 bike 400 1.5 [summer] 2 \n",
"0 bike 400 1.0 [summer] 3 \n",
"0 bike 400 2.5 [summer] 1 \n",
"0 bike 400 2.0 [summer] 1 \n",
"0 bike 400 1.0 [summer] 2 \n",
"0 bike 400 1.5 [summer] 1 \n",
"0 bike 400 1.0 [summer] 1 \n",
"\n",
" price_sale_pct usage_num price_per_usage \n",
"0 0 657 0.61 \n",
"0 0 624 0.64 \n",
"0 0 591 0.68 \n",
"0 0 559 0.72 \n",
"0 0 526 0.76 \n",
"0 0 493 0.81 \n",
"0 0 460 0.87 \n",
"0 0 427 0.94 \n",
"0 0 394 1.02 \n",
"0 0 394 1.02 \n",
"0 0 375 1.07 \n",
"0 0 361 1.11 \n",
"0 0 355 1.13 \n",
"0 0 335 1.19 \n",
"0 0 329 1.22 \n",
"0 0 315 1.27 \n",
"0 0 296 1.35 \n",
"0 0 296 1.35 \n",
"0 0 276 1.45 \n",
"0 0 263 1.52 \n",
"0 0 263 1.52 \n",
"0 0 256 1.56 \n",
"0 0 250 1.60 \n",
"0 0 237 1.69 \n",
"0 0 237 1.69 \n",
"0 0 230 1.74 \n",
"0 0 223 1.79 \n",
"0 0 217 1.84 \n",
"0 0 210 1.90 \n",
"0 0 197 2.03 \n",
"0 0 197 2.03 \n",
"0 0 197 2.03 \n",
"0 0 184 2.17 \n",
"0 0 177 2.26 \n",
"0 0 171 2.34 \n",
"0 0 164 2.44 \n",
"0 0 158 2.53 \n",
"0 0 158 2.53 \n",
"0 0 145 2.76 \n",
"0 0 138 2.90 \n",
"0 0 131 3.05 \n",
"0 0 131 3.05 \n",
"0 0 131 3.05 \n",
"0 0 125 3.20 \n",
"0 0 118 3.39 \n",
"0 0 118 3.39 \n",
"0 0 118 3.39 \n",
"0 0 112 3.57 \n",
"0 0 105 3.81 \n",
"0 0 105 3.81 \n",
"0 0 99 4.04 \n",
"0 0 99 4.04 \n",
"0 0 99 4.04 \n",
"0 0 92 4.35 \n",
"0 0 92 4.35 \n",
"0 0 85 4.71 \n",
"0 0 79 5.06 \n",
"0 0 79 5.06 \n",
"0 0 79 5.06 \n",
"0 0 72 5.56 \n",
"0 0 66 6.06 \n",
"0 0 66 6.06 \n",
"0 0 66 6.06 \n",
"0 0 59 6.78 \n",
"0 0 59 6.78 \n",
"0 0 53 7.55 \n",
"0 0 53 7.55 \n",
"0 0 46 8.70 \n",
"0 0 39 10.26 \n",
"0 0 39 10.26 \n",
"0 0 39 10.26 \n",
"0 0 33 12.12 \n",
"0 0 26 15.38 \n",
"0 0 26 15.38 \n",
"0 0 20 20.00 \n",
"0 0 13 30.77 "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Increase the number of rows to display\n",
"pd.set_option('display.max_rows', 100)\n",
"\n",
"profitability_bike.sort_values(by='price_per_usage')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Plotting price per usage"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"\n",
"# Turn on svg rendering\n",
"%config InlineBackend.figure_format = 'svg'\n",
"\n",
"# Color palette for the blog\n",
"snark_palette = ['#e0675a', # red\n",
" '#5ca0af', # green\n",
" '#edde7e', # yellow\n",
" '#211c47' # dark blue\n",
" ]"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
"\r\n",
"\r\n",
"\r\n",
"\r\n"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Color palette for the data\n",
"palette = 'tab10'\n",
"\n",
"# Inscriptions\n",
"title = \"\"\"Bike Profitability\"\"\"\n",
"description = \"\"\"\n",
"The real cost of the bike depending on the frequency of use.\n",
"Data: @data.sugar | Author: @data.sugar\n",
"\"\"\"\n",
"\n",
"# Plot size\n",
"figsize = (6,4)\n",
"\n",
"# Set the figure\n",
"sns.set(context='paper', style='ticks', palette=snark_palette,\n",
" rc={'axes.spines.left': True, 'axes.spines.bottom': True,\n",
" 'axes.spines.right': False, 'axes.spines.top': False\n",
" }\n",
" )\n",
"\n",
"# Create the plot\n",
"fig, ax = plt.subplots(1, 1, figsize=figsize, facecolor='w')\n",
"sns.lineplot(data=profitability_bike,\n",
" x='usage_years', y='price_per_usage',\n",
" hue='usage_per_week',\n",
" lw=2, palette=palette,\n",
" legend='full', ax=ax\n",
" )\n",
"\n",
"# Set some aesthetic params for the plot\n",
"ax.set_title(title, fontdict={'fontsize': 16}, loc='center', pad=10, c=snark_palette[-1]) # set a title of the plot\n",
"ax.annotate(description, xy=(10, -4), size=6, xycoords='figure points', c=snark_palette[-1])\n",
"ax.set_xlabel('years of use', loc='center', size='x-large', c=snark_palette[-1]) # set label of x axis\n",
"ax.set_ylabel('$ per use', loc='center', size='x-large', c=snark_palette[-1]) # set label of y axis\n",
"ax.tick_params(axis='both', labelsize='large', colors=snark_palette[-1]) # set x/y ticks\n",
"ax.spines['bottom'].set_color(snark_palette[-1]) # color x axis\n",
"ax.spines['left'].set_color(snark_palette[-1]) # color y axis\n",
"ax.set_xticks([i for i in range(1, 11)]) # set x ticks labels\n",
"ax.set_xlim(1,10)\n",
"ax.set_ylim(0, 16)\n",
"ax.legend(loc='upper right', frameon=False).texts[0].set_text('')\n",
"ax.text(s='times used\\nper week\\nin summer', x=9.3, y=15, ha='center')\n",
"\n",
"# Save and plot\n",
"plt.savefig('plot.pic/plot.bike.png', dpi=150, bbox_inches='tight')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Do I need a bike?\n",
"\n",
"If renting a bike in my city costs `$1` an hour, then I have to cycle whole summer for at least 6 years to justify the purchase."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Blog Post"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1664"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"blog_post = r\"\"\"\n",
"## 🚴♀️Do I need a bike? \n",
"\n",
"\n",
"My \\#bike is 10 years old. \n",
"It cost \\$100, but I still use it today. \n",
"\n",
"👀Thinking about \\#conscious \\#consumption I wondered how profitably I invested that \\$100 in my bike? \n",
"\n",
"📌I have prepared a simple \\#calculator to help prevent spontaneous purchases. \n",
"\n",
"I have tested it to answer if my old bike is \\#useful acquisition.\n",
"\n",
"✔For 10 years now, I've been cycling twice a week in the spring and summer, and I \"pay\" 19 cents each time. \n",
"It seems to be a bargain.\n",
"\n",
"✔What if reduce the usage years to 1 and leave only summer for cycling? \n",
"The cost has increased to $3.85 at a time (or an hour) and is no longer so attractive.\n",
"\n",
"✔One use can be understood as one hour of cycling or two hours, for example.\n",
"\n",
"🤍Recently, I liked a new bike in the store.\n",
"I could have made a spontaneous, thoughtless purchase, given into the mood.\n",
"However, now I would like to estimate how much the new bike will actually cost me. \n",
"So I did the calcs.\n",
"\n",
"I considered some of the uses for my new bike:\n",
"\n",
"◽I'll buy it in the store for \\$400. \n",
"◽I'll use it 1, 2, 4, 5, 6, 7, 8, 9 or 10 years. \n",
"◽I plan to cycle only in summer. \n",
"◽I want to cycle, maybe once a week, or on weekends, or time to time, or on weekdays. \n",
"◽I'm not going to sell it. \n",
"\n",
"📝Do I still need a bike? \n",
"\n",
"If renting a bike in my city costs $1 an hour, then I have to cycle whole summer for at least 6 years to justify the purchase. \n",
"\n",
"(Need to calc your own purchases? Follow the link in bio for the profitability calc!) \n",
". \n",
". \n",
". \n",
"\\#funtime \\#probably \\#datascience \\#datapower \\#data_sugar_profit \\#consciousconsumption\n",
"\\#data_know_everything_and_nothing \\#linkinbio \\#datajournalism\n",
"\"\"\"\n",
"\n",
"# Check post text length for Instagram\n",
"len(blog_post)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/markdown": [
"\n",
"## 🚴♀️Do I need a bike? \n",
"\n",
"\n",
"My \\#bike is 10 years old. \n",
"It cost \\$100, but I still use it today. \n",
"\n",
"👀Thinking about \\#conscious \\#consumption I wondered how profitably I invested that \\$100 in my bike? \n",
"\n",
"📌I have prepared a simple \\#calculator to help prevent spontaneous purchases. \n",
"\n",
"I have tested it to answer if my old bike is \\#useful acquisition.\n",
"\n",
"✔For 10 years now, I've been cycling twice a week in the spring and summer, and I \"pay\" 19 cents each time. \n",
"It seems to be a bargain.\n",
"\n",
"✔What if reduce the usage years to 1 and leave only summer for cycling? \n",
"The cost has increased to $3.85 at a time (or an hour) and is no longer so attractive.\n",
"\n",
"✔One use can be understood as one hour of cycling or two hours, for example.\n",
"\n",
"🤍Recently, I liked a new bike in the store.\n",
"I could have made a spontaneous, thoughtless purchase, given into the mood.\n",
"However, now I would like to estimate how much the new bike will actually cost me. \n",
"So I did the calcs.\n",
"\n",
"I considered some of the uses for my new bike:\n",
"\n",
"◽I'll buy it in the store for \\$400. \n",
"◽I'll use it 1, 2, 4, 5, 6, 7, 8, 9 or 10 years. \n",
"◽I plan to cycle only in summer. \n",
"◽I want to cycle, maybe once a week, or on weekends, or time to time, or on weekdays. \n",
"◽I'm not going to sell it. \n",
"\n",
"📝Do I still need a bike? \n",
"\n",
"If renting a bike in my city costs $1 an hour, then I have to cycle whole summer for at least 6 years to justify the purchase. \n",
"\n",
"(Need to calc your own purchases? Follow the link in bio for the profitability calc!) \n",
". \n",
". \n",
". \n",
"\\#funtime \\#probably \\#datascience \\#datapower \\#data_sugar_profit \\#consciousconsumption\n",
"\\#data_know_everything_and_nothing \\#linkinbio \\#datajournalism\n"
],
"text/plain": [
""
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from IPython.display import Markdown as md\n",
"md(blog_post)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.1"
}
},
"nbformat": 4,
"nbformat_minor": 4
}