{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "worldwide-blood",
   "metadata": {},
   "source": [
    "# Introduction"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "understanding-numbers",
   "metadata": {},
   "source": [
    "Black & African American Student Population in the US. Primary School vs Undergratuate College (2022)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "greater-circular",
   "metadata": {},
   "source": [
    "How does the Black and African American student population vary by state, from primary school through the first four years of college? "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "appreciated-testimony",
   "metadata": {},
   "source": [
    "Although the National Center for Education Statistics (NCES, 2022) indicates an increasing ethnic diversity across the U.S., my personal experiences as a Black student in primary through graduate schools in Maryland, Georgia, and New York seem inconsistent with this data. This research question aims to help me visualize and synthesize these figures comprehensively."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "permanent-pollution",
   "metadata": {},
   "source": [
    "# Data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "technical-evans",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Include any import statements you will need\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "overhead-sigma",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "False\n"
     ]
    },
    {
     "ename": "FileNotFoundError",
     "evalue": "[Errno 2] No such file or directory: 'data'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mFileNotFoundError\u001b[0m                         Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[4], line 7\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[38;5;66;03m# Print out all the files that exist in the data dir\u001b[39;00m\n\u001b[1;32m      6\u001b[0m data_dir \u001b[38;5;241m=\u001b[39m Path(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdata\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m----> 7\u001b[0m \u001b[38;5;28;43;01mfor\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mfilepath\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mdata_dir\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43miterdir\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\u001b[43m:\u001b[49m\u001b[43m \u001b[49m\n\u001b[1;32m      8\u001b[0m \u001b[43m  \u001b[49m\u001b[38;5;28;43mprint\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mfilepath\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m/opt/homebrew/Cellar/python@3.12/3.12.5/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py:1056\u001b[0m, in \u001b[0;36mPath.iterdir\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m   1050\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21miterdir\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m   1051\u001b[0m \u001b[38;5;250m    \u001b[39m\u001b[38;5;124;03m\"\"\"Yield path objects of the directory contents.\u001b[39;00m\n\u001b[1;32m   1052\u001b[0m \n\u001b[1;32m   1053\u001b[0m \u001b[38;5;124;03m    The children are yielded in arbitrary order, and the\u001b[39;00m\n\u001b[1;32m   1054\u001b[0m \u001b[38;5;124;03m    special entries '.' and '..' are not included.\u001b[39;00m\n\u001b[1;32m   1055\u001b[0m \u001b[38;5;124;03m    \"\"\"\u001b[39;00m\n\u001b[0;32m-> 1056\u001b[0m     \u001b[38;5;28;01mfor\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m \u001b[43mos\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mlistdir\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;28;43mself\u001b[39;49m\u001b[43m)\u001b[49m:\n\u001b[1;32m   1057\u001b[0m         \u001b[38;5;28;01myield\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_make_child_relpath(name)\n",
      "\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: 'data'"
     ]
    }
   ],
   "source": [
    "from pathlib import Path\n",
    "path = Path(\"data/PopulationPrimaryAA2022.csv\")\n",
    "print(path.exists())  # Check whether this path exists\n",
    "\n",
    "# Print out all the files that exist in the data dir\n",
    "data_dir = Path(\"data\")\n",
    "for filepath in data_dir.iterdir(): \n",
    "  print(filepath)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "heated-blade",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'df' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[34], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[43mdf\u001b[49m\u001b[38;5;241m.\u001b[39mhead())\n",
      "\u001b[0;31mNameError\u001b[0m: name 'df' is not defined"
     ]
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "continental-franklin",
   "metadata": {},
   "source": [
    "**Data Overview**\n",
    "\n",
    "*✏️ Write 2-3 sentences describing this dataset. Be sure to include where the data comes from and what it contains.*"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "infinite-instrument",
   "metadata": {},
   "source": [
    "# Methods and Results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "basic-canadian",
   "metadata": {},
   "outputs": [],
   "source": [
    "#Import any helper files you need here"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "recognized-positive",
   "metadata": {},
   "source": [
    "## First Research Question: [✏️ PUT YOUR QUESTION HERE ✏️]\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "graduate-palmer",
   "metadata": {},
   "source": [
    "### Methods"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "endless-variation",
   "metadata": {},
   "source": [
    "*Explain how you will approach this research question below. Consider the following:* \n",
    "  - *Which aspects of the dataset will you use?* \n",
    "  - *How will you reorganize/store the data?* \n",
    "  - *What data science tools/functions will you use and why?* \n",
    "  \n",
    "✏️ *Write your answer below:*\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "portuguese-japan",
   "metadata": {},
   "source": [
    "### Results "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "negative-highlight",
   "metadata": {},
   "outputs": [],
   "source": [
    "#######################################################################\n",
    "### 💻 YOUR WORK GOES HERE TO ANSWER THE FIRST RESEARCH QUESTION 💻 \n",
    "### \n",
    "### Your data analysis may include a statistic and/or a data visualization\n",
    "#######################################################################"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "victorian-burning",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 💻 YOU CAN ADD NEW CELLS WITH THE \"+\" BUTTON "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "collectible-puppy",
   "metadata": {},
   "source": [
    "## Second Research Question: [✏️ PUT YOUR QUESTION HERE ✏️]\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "demographic-future",
   "metadata": {},
   "source": [
    "### Methods"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "incorporate-roller",
   "metadata": {},
   "source": [
    "*Explain how you will approach this research question below. Consider the following:* \n",
    "  - *Which aspects of the dataset will you use?* \n",
    "  - *How will you reorganize/store the data?* \n",
    "  - *What data science tools/functions will you use and why?* \n",
    "\n",
    "✏️ *Write your answer below:*\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "juvenile-creation",
   "metadata": {},
   "source": [
    "### Results "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "pursuant-surrey",
   "metadata": {},
   "outputs": [],
   "source": [
    "#######################################################################\n",
    "### 💻 YOUR WORK GOES HERE TO ANSWER THE SECOND RESEARCH QUESTION 💻 \n",
    "###\n",
    "### Your data analysis may include a statistic and/or a data visualization\n",
    "#######################################################################"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "located-night",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 💻 YOU CAN ADD NEW CELLS WITH THE \"+\" BUTTON "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "infectious-symbol",
   "metadata": {},
   "source": [
    "# Discussion"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "furnished-camping",
   "metadata": {
    "code_folding": []
   },
   "source": [
    "## Considerations"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bearing-stadium",
   "metadata": {},
   "source": [
    "*It's important to recognize the limitations of our research.\n",
    "Consider the following:*\n",
    "\n",
    "- *Do the results give an accurate depiction of your research question? Why or why not?*\n",
    "- *What were limitations of your datset?*\n",
    "- *Are there any known biases in the data?*\n",
    "\n",
    "✏️ *Write your answer below:*"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "beneficial-invasion",
   "metadata": {},
   "source": [
    "## Summary"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "about-raise",
   "metadata": {},
   "source": [
    "*Summarize what you discovered through the research. Consider the following:*\n",
    "\n",
    "- *What did you learn about your media consumption/digital habits?*\n",
    "- *Did the results make sense?*\n",
    "- *What was most surprising?*\n",
    "- *How will this project impact you going forward?*\n",
    "\n",
    "✏️ *Write your answer below:*"
   ]
  }
 ],
 "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.5"
  },
  "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
}
