{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "5d372d26",
   "metadata": {},
   "source": "# Preface  \n\nThese lecture notes are prepared for IST-3420, Introduction to Data Science and Management at Missouri University of Science and Technology (MS&T) at Rolla, Missouri. The course aims to provide you with a solid foundation in data science concepts and practices, supporting the learner's future academic and career development. "
  },
  {
   "cell_type": "markdown",
   "id": "65b1e1ca",
   "metadata": {},
   "source": "## Navigating the Book\n\nThis resource is divided into five main sections:\n\n* **<a class=\"part-overview-link\" href=\"../parts/part_01_fundamentals.html\">Part I: Fundamentals</a>** – Setting up your environment and mastering Python syntax.\n* **<a class=\"part-overview-link\" href=\"../parts/part_02_working_with_data.html\">Part II: Working with Data</a>** – Deep dives into `NumPy` and `Pandas`.\n* **<a class=\"part-overview-link\" href=\"../parts/part_03_data_visualization.html\">Part III: Visualization</a>** – Learning to tell stories with data using `Matplotlib` and `Seaborn`.\n* **<a class=\"part-overview-link\" href=\"../parts/part_04_inferential_statistics.html\">Part IV: Inferential Statistics</a>** – Understanding probability, hypothesis testing, and regression.\n* **<a class=\"part-overview-link\" href=\"../parts/part_05_machine_learning.html\">Part V: Machine Learning</a>** – Applying models for classification and clustering."
  },
  {
   "cell_type": "markdown",
   "id": "c2fe2da9",
   "metadata": {},
   "source": "## How to Use This Book\n\nEach chapter section is an interactive Jupyter Notebook. You can:\n- Read through the rendered content\n- Interact with the code directly by downloading the notebooks locally using Binder or github\n- Sign in and use the live code cells to practice"
  },
  {
   "cell_type": "markdown",
   "id": "0f889f8f",
   "metadata": {},
   "source": "Learning is all about **connecting the dots** – you need to collect enough dots first. To achieve expertise, you need to do two things:\n\n1. **Repeat**: Keep collecting (learning) more dots.\n2. **Associate**: Keep connecting the dots to make sense. \n\n\n```{figure} ../../figures/knowledge-experience-creativity.jpg\n:name: experience-knowledge-creativity\n:width: 60%\n:align: left\n\n[Experience, Knowledge, and Creativity](https://www.facebook.com/TEDxGateway/photos/knowledge-vs-experience-vs-creativitybased-on-original-art-by-gapingvoid/627069164013335/?paipv=0&eav=AfYVOOD8qoGjRftPun8PAZ2Q1nNGXXKVHVEVnJx3_FUzUav6XkGyqLhPur3V84uT-y0&_rdr) (*[Nikolaos Arvanitis](https://www.linkedin.com/pulse/knowledge-experience-nikolaos-arvanitis/) says that the original graph (knowledge & experience) is done by cartoonist [Hugh McLeod](https://www.linkedin.com/in/hughmacleod/?originalSubdomain=uk). I personally would frame the constructs as information => knowledge => Expertise)\n```"
  },
  {
   "cell_type": "markdown",
   "id": "89f77d69",
   "metadata": {},
   "source": "## Live Coding \n\nMost code cells on these pages are live. Sign in from the account menu in the upper right corner, and you can edit and run the cells right on the page, in any browser and on your cell phone. The code runs on ThinkPress, so there is nothing to launch and no session to wait for. Run a cell with its **run** button or Shift+Enter. Your edits are saved as you type and come back when you return to the page, on any device; **reset** restores a cell's original code. The live coding cells allow you to practice the concepts and skills you learn in the section."
  },
  {
   "cell_type": "markdown",
   "id": "82877a84",
   "metadata": {},
   "source": "(download-function)=\n## Custom Code \nIf you get the notebook files and place them in a folder in your project directory, or you write your own notebooks and want to use some features such as `jupyturtle` in this book, you may need additional functionalities. For this, the cell below downloads the files specifically used for this book. You don't need to understand this code yet, but you can see that this code downloads some `*.py` files from Dr. Allen Downey's GitHub repository to enable the required functionalities. \n\nYou then create a folder in your project folder called `shared` and place the downloaded files in it and add an empty file called `__init__.py`, which makes the shared folder a `package`. Later in any of your project notebook, you can import the `modules` to use the `functions` in the modules in the notebook:\n\n```python\nfrom shared import [module]\n```"
  },
  {
   "cell_type": "markdown",
   "id": "49fc1b5e",
   "metadata": {},
   "source": "**The download function**:\n\n```python\nfrom os.path import basename, exists\n\ndef download(url):\n    filename = basename(url)\n    if not exists(filename):\n        from urllib.request import urlretrieve\n\n        local, _ = urlretrieve(url, filename)\n        print(\"Downloaded \" + str(local))\n    return filename\n```\n\n- thinkpython: 'https://github.com/AllenDowney/ThinkPython/raw/v3/thinkpython.py'\n- diagram: 'https://github.com/AllenDowney/ThinkPython/raw/v3/diagram.py'\n- jupyturtle: 'https://github.com/ramalho/jupyturtle/releases/download/2024-03/jupyturtle.py'"
  },
  {
   "cell_type": "markdown",
   "id": "909cbc73",
   "metadata": {},
   "source": "To use the downloaded files as modules, create a directory in the project root, call it `shared`, and drop the files in it. In each of the notebooks that you need to import the modules, place this code snippet below at the beginning of the notebook.\n\n```python\nimport sys\nfrom pathlib import Path\n\ncurrent = Path.cwd()\nfor parent in [current, *current.parents]:\n    if (parent / '_config.yml').exists():\n        project_root = parent  # ← Add project root, not chapters\n        break\nelse:\n    project_root = Path.cwd().parent.parent\n\nsys.path.insert(0, str(project_root))\n\nfrom shared import thinkpython, diagram, jupyturtle\n```"
  },
  {
   "cell_type": "markdown",
   "id": "64133097-8c24-4a30-ac3a-5d965667fedd",
   "metadata": {},
   "source": "## AI in Jupyter Notebook\n\nTo install AI components in Jupyter Notebook, you may try:\n\n```python\n%pip install \"jupyter-ai\"\n```\n\n- Don't forget to comment out the %pip install line after installation.\n- To learn about `jupyter-ai`, visit the [Jupyter AI](https://jupyter-ai.readthedocs.io/en/v2/users/index.html) documentation site."
  },
  {
   "cell_type": "markdown",
   "id": "embedded-videos-notice",
   "metadata": {},
   "source": "## Embedded Videos\n\nVideos throughout this book are embedded via YouTube's official player and remain the property of their original creators. No ownership or affiliation is claimed. Embedded videos may become unavailable if creators remove them or disable embedding. Rightsholders with concerns may contact [support@thinkdsm.org](mailto:support@thinkdsm.org)."
  },
  {
   "cell_type": "markdown",
   "id": "fcdb2a22",
   "metadata": {},
   "source": "## Credits\n\nThese notes draw on several open educational resources that have informed the structure and examples used throughout the book.\n\nParts of the Python material are adapted from Allen Downey's [Think Python](https://allendowney.github.io/ThinkPython/), which is an excellent introduction to Python programming. Some of the statistics material was developed with reference to UC Berkeley's [Data 8](https://inferentialthinking.com) materials, which were used in earlier offerings of this course. Additional sources are cited in the relevant chapters.\n\nThis book's original code is shared under the [MIT License](https://mit-license.org/).\nThis book's original text is shared under the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/)."
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv (3.13.13)",
   "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.13.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
