{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "worldwide-blood",
   "metadata": {},
   "source": [
    "# Introduction"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "95683a23-56f0-4077-b631-94e456daa8f4",
   "metadata": {},
   "source": [
    "Argument Project Research - Nelson Mason - November 4, 2025"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "greater-circular",
   "metadata": {},
   "source": [
    "## Overarching Question: \n",
    "I want to know about what relationship exists, if any, between an adult (18 +) person's age and their weight (metric-kg.).\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "permanent-pollution",
   "metadata": {},
   "source": [
    "# Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "technical-evans",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "sns.set_theme()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "overhead-sigma",
   "metadata": {},
   "outputs": [],
   "source": [
    "file_name = \"brfss_2020_cleaned.csv\"\n",
    "dataset_path = \"data/brfss_2020_cleaned.csv\"\n",
    "people = pd.read_csv(\"data/brfss_2020_cleaned.csv\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "77e81e19-a1dd-43f1-bf6a-69ffa08add94",
   "metadata": {},
   "source": [
    "There is a progression of age in terms of the numbers of persons participating in this survey."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "fdd2f3af-ab54-442c-96de-14bc27a215b9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Axes: xlabel='age', ylabel='count'>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 26680 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.countplot(data=people, x=\"age\", hue=\"age\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "376d050c-1088-414a-9a33-037e9d8a97cc",
   "metadata": {},
   "source": [
    "Most persons weigh around 75 kgs. in this survey."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "13abb8a8-b75d-4381-a0cd-92eabb0f2ca7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Axes: xlabel='weight', ylabel='Count'>"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 20660 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.histplot(data=people, x=\"weight\", bins=15)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7fbdae7b-c7c0-472a-a52f-87d158129e25",
   "metadata": {},
   "source": [
    "There is no individual timeline in this dataset, and therefore no direct relationship between age and weight."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "heated-blade",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Axes: xlabel='age', ylabel='weight'>"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 22444 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.barplot(data=people, x=\"age\", y=\"weight\", hue=\"age\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "1503d38c-8fe9-4b12-b8f9-ed3c51550c08",
   "metadata": {},
   "source": [
    "I want to see a distribution of persons by age by weight, with outliers.\n",
    "There are many outliers on the upside for all age groups.\n",
    "There are very few outliers on the downside for all age groups."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "pursuant-surrey",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Axes: xlabel='age', ylabel='weight'>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 35424 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.boxplot(data=people, x=\"age\", y=\"weight\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "14aec0ff-b030-4916-8ce3-3ad8c56aa08f",
   "metadata": {},
   "source": [
    "I want to see the main distribution of persons by age by weight."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "located-night",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Axes: xlabel='age', ylabel='weight'>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "[encoded data, 47276 characters]",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "sns.violinplot(data=people, x=\"age\", y=\"weight\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "infectious-symbol",
   "metadata": {},
   "source": [
    "# Discussion"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "furnished-camping",
   "metadata": {
    "code_folding": []
   },
   "source": [
    "## Considerations"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a912ec72-35a8-4325-8520-4a47d806c287",
   "metadata": {},
   "source": [
    "- Do the results give an accurate depiction of your research question? Yes. Why or why not? The dataset is a valid cross-section of U.S. persons. There are 166,426 records in this database. \"This dataset includes data from 50 states, the District of Columbia, Guam, and Puerto Rico, collected through a combination of landline and cell phone interviews.\" - 2020 Behavioral Risk Factor Surveillance System (BRFSS) annual survey data from the Centers for Disease Control and Prevention (CDC).\n",
    "- What were limitations of your dataset? The person answering the survey has a telephone, and voluntarily and accurately answers the survey questions.\n",
    "- Are there any known biases in the data? No. "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4c170ecf-38a3-484b-8188-af144918199d",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "source": [
    "Conclusions - There is no significant relationship between many persons age and weight because this dataset has no individual timeline. It's only a one-time snapshot."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "beneficial-invasion",
   "metadata": {
    "editable": true,
    "slideshow": {
     "slide_type": ""
    },
    "tags": []
   },
   "source": [
    "## Summary"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b2b17e2e-0d75-4865-ab30-08250f5c8427",
   "metadata": {},
   "source": [
    "I found out that a snapshot dataset cannot discern a direct relationship between many persons age and weight, since there's no timeline in the dataset. What I learned is to be careful in drawing conclusions about datasets based on limited information. "
   ]
  }
 ],
 "metadata": {
  "jupytext": {
   "cell_metadata_json": true,
   "text_representation": {
    "extension": ".Rmd",
    "format_name": "rmarkdown",
    "format_version": "1.2",
    "jupytext_version": "1.9.1"
   }
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "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.12.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
