Refactor code structure for improved readability and maintainability

This commit is contained in:
bolade
2025-10-04 00:06:45 +01:00
parent 6b2c61a48e
commit 7e55ee6954
13 changed files with 806 additions and 35 deletions
+2
View File
@@ -1,3 +1,5 @@
.venv .venv
data/ data/
.env
Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

+10 -34
View File
@@ -2,7 +2,7 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 38, "execution_count": null,
"id": "63f43af5", "id": "63f43af5",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@@ -921,7 +921,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 48, "execution_count": null,
"id": "2056096d", "id": "2056096d",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@@ -938,39 +938,15 @@
], ],
"source": [ "source": [
"body_fat_chart = {\n", "body_fat_chart = {\n",
" \"male\": {\n", " \"male\": { \n",
" \"20-39\": {\n", " \"20-39\": { \"bad\": [(0, 5), (25, 50)], \"okay\": [(5, 10), (20, 25)], \"good\": [(10, 20)] },\n",
" \"bad\": [(0, 5), (25, 50)],\n", " \"40-59\": { \"bad\": [(0, 5), (30, 50)], \"okay\": [(5, 10), (20, 30)], \"good\": [(10, 20)] },\n",
" \"okay\": [(5, 10), (20, 25)],\n", " \"60-79\": { \"bad\": [(0, 5), (30, 50)], \"okay\": [(5, 10), (20, 25)], \"good\": [(10, 25)] }\n",
" \"good\": [(10, 20)]\n",
" },\n", " },\n",
" \"40-59\": {\n", " \"female\": { \n",
" \"bad\": [(0, 5), (30, 50)],\n", " \"20-39\": { \"bad\": [(0, 15), (40, 50)], \"okay\": [(15, 20), (35, 40)], \"good\": [(20, 35)] },\n",
" \"okay\": [(5, 10), (20, 30)],\n", " \"40-59\": { \"bad\": [(0, 20), (40, 50)], \"okay\": [(20, 25), (35, 40)], \"good\": [(25, 35)] },\n",
" \"good\": [(10, 20)]\n", " \"60-79\": { \"bad\": [(0, 20), (40, 50)], \"okay\": [(20, 25), (35, 40)], \"good\": [(25, 35)] }\n",
" },\n",
" \"60-79\": {\n",
" \"bad\": [(0, 5), (30, 50)],\n",
" \"okay\": [(5, 10), (20, 25)],\n",
" \"good\": [(10, 25)]\n",
" }\n",
" },\n",
" \"female\": {\n",
" \"20-39\": {\n",
" \"bad\": [(0, 15), (40, 50)],\n",
" \"okay\": [(15, 20), (35, 40)],\n",
" \"good\": [(20, 35)]\n",
" },\n",
" \"40-59\": {\n",
" \"bad\": [(0, 20), (40, 50)],\n",
" \"okay\": [(20, 25), (35, 40)],\n",
" \"good\": [(25, 35)]\n",
" },\n",
" \"60-79\": {\n",
" \"bad\": [(0, 20), (40, 50)],\n",
" \"okay\": [(20, 25), (35, 40)],\n",
" \"good\": [(25, 35)]\n",
" }\n",
" }\n", " }\n",
"}\n", "}\n",
"\n", "\n",
File diff suppressed because one or more lines are too long