{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "**YOUR NAME HERE**\n", "\n", "Fall 2026\n", "\n", "CS 251/2: Data Analysis and Visualization\n", "\n", "Project 1: Data Analysis and Visualization\n", "\n", "#### Week 2: Start this after Week 2 lab (Lab 1b)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Task 2: Update `Data` class for data selection\n", "\n", "You will update `Data` to allow the user to select one or more data variables based on their string name. This will give you some practice working with numpy basics.\n", "\n", "Implement the following methods in `Data`:\n", "- `get_all_data()`\n", "- `head()`: Return the 1st five data samples (all variables)\n", "- `tail()`: Return the last five data samples (all variables)\n", "- `limit_samples(start_row, end_row)`: Update the data so that the object only stores the samples in the contiguous range `[start_row, end_row)`.\n", "- `shuffle(inds)`: Use the list of indices `inds` to change the order of samples in the dataset.\n", "- `select_data(headers, rows=[])`: Return data samples corresponding to the variable names in `headers`. If `rows` is empty, return all samples, otherwise return samples at the indices specified by the `rows` list." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from data import Data\n", "import numpy as np\n", "\n", "# Automatically reload external modules\n", "%load_ext autoreload\n", "%autoreload 2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2a. Test `get_all_data`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (i) Basic test" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_filename = 'data/iris.csv'\n", "iris_data = Data(iris_filename)\n", "dat = iris_data.get_all_data()\n", "dat[0,:] = -9999\n", "new_dat = iris_data.get_all_data()\n", "if new_dat[0, 0] == -9999.:\n", " print('!!You did not return a copy of your data!!\\n')\n", "else:\n", " print('get_all_data seems ok!')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (ii) Test with passing ndarray into constructor" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "test_ii = np.arange(12).reshape([3, 4])\n", "test_ii_data = Data(data=test_ii)\n", "test_ii_data_get = test_ii_data.get_all_data()\n", "print(f'After passing in test data ndarray into your Data object, the data returned is:\\n{test_ii_data_get}')\n", "print('It should be:')\n", "print('''[[ 0 1 2 3]\n", " [ 4 5 6 7]\n", " [ 8 9 10 11]]''')\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2b. Test `head` and `tail`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (i) Iris" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_filename = 'data/iris.csv'\n", "iris_data = Data(iris_filename)\n", "print(f'Your Iris head (shape={iris_data.head().shape}) is:\\n{iris_data.head()}')\n", "print(f'Your Iris tail (shape={iris_data.head().shape}) is:\\n{iris_data.tail()}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You should see:\n", "\n", " Your Iris head (shape=(5, 5)) is:\n", " [[5.1 3.5 1.4 0.2 0. ]\n", " [4.9 3. 1.4 0.2 0. ]\n", " [4.7 3.2 1.3 0.2 0. ]\n", " [4.6 3.1 1.5 0.2 0. ]\n", " [5. 3.6 1.4 0.2 0. ]]\n", " Your Iris tail (shape=(5, 5)) is:\n", " [[6.7 3. 5.2 2.3 2. ]\n", " [6.3 2.5 5. 1.9 2. ]\n", " [6.5 3. 5.2 2. 2. ]\n", " [6.2 3.4 5.4 2.3 2. ]\n", " [5.9 3. 5.1 1.8 2. ]]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (ii) Data with small number of samples" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "test_filename = 'data/test_data_spaces.csv'\n", "test_data = Data(test_filename)\n", "print(f'Your test head (shape={test_data.head().shape}) is:\\n{test_data.head()}')\n", "print(f'Your test tail (shape={test_data.head().shape}) is:\\n{test_data.tail()}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You should see:\n", "\n", " Your test head (shape=(3, 4)) is:\n", " [[ 1. 2. 3. 4.]\n", " [ 5. 6. 7. 8.]\n", " [ 9. 10. 11. 12.]]\n", " Your test tail (shape=(3, 4)) is:\n", " [[ 1. 2. 3. 4.]\n", " [ 5. 6. 7. 8.]\n", " [ 9. 10. 11. 12.]]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2c. Test `limit_samples`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_filename = 'data/iris.csv'\n", "iris_data = Data(iris_filename)\n", "iris_data.limit_samples(50, 100)\n", "print(f'After limiting samples, your test head is:\\n{iris_data.head()}')\n", "print(f'After limiting samples, your test tail is:\\n{iris_data.tail()}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You should see:\n", "\n", " After limiting samples, your test head is:\n", " [[7. 3.2 4.7 1.4 1. ]\n", " [6.4 3.2 4.5 1.5 1. ]\n", " [6.9 3.1 4.9 1.5 1. ]\n", " [5.5 2.3 4. 1.3 1. ]\n", " [6.5 2.8 4.6 1.5 1. ]]\n", " After limiting samples, your test tail is:\n", " [[5.7 3. 4.2 1.2 1. ]\n", " [5.7 2.9 4.2 1.3 1. ]\n", " [6.2 2.9 4.3 1.3 1. ]\n", " [5.1 2.5 3. 1.1 1. ]\n", " [5.7 2.8 4.1 1.3 1. ]]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2d. Test `shuffle`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_filename = 'data/iris.csv'\n", "iris_data = Data(iris_filename)\n", "\n", "np.random.seed(0)\n", "inds = np.random.permutation(iris_data.get_num_samples())\n", "iris_data.shuffle(inds)\n", "print(f'After shuffling samples, your test head is:\\n{iris_data.head()}')\n", "print(f'After shuffling samples, your test tail is:\\n{iris_data.tail()}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You should see:\n", "\n", " After shuffling samples, your test head is:\n", " [[5.8 2.8 5.1 2.4 2. ]\n", " [6. 2.2 4. 1. 1. ]\n", " [5.5 4.2 1.4 0.2 0. ]\n", " [7.3 2.9 6.3 1.8 2. ]\n", " [5. 3.4 1.5 0.2 0. ]]\n", " After shuffling samples, your test tail is:\n", " [[4.9 3.1 1.5 0.1 0. ]\n", " [6.3 2.9 5.6 1.8 2. ]\n", " [5.8 2.7 4.1 1. 1. ]\n", " [7.7 3.8 6.7 2.2 2. ]\n", " [4.6 3.2 1.4 0.2 0. ]]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2e. Test `select_data`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (i) Test data with spaces" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "test_filename = 'data/test_data_spaces.csv'\n", "test_data = Data(test_filename)\n", "\n", "one = test_data.select_data(['spaces'])\n", "print(f'All data in the \"spaces\" variable (shape={one.shape}): \\n{one}')\n", "\n", "two = test_data.select_data(['spaces', 'places'])\n", "print(f'All data in the \"spaces\" and \"places\" variables (shape={two.shape}): \\n{two}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You should see:\n", "\n", " All data in the \"spaces\" variable (shape=(3, 1)): \n", " [[ 2.]\n", " [ 6.]\n", " [10.]]\n", " All data in the \"spaces\" and \"places\" variables (shape=(3, 2)): \n", " [[ 2. 4.]\n", " [ 6. 8.]\n", " [10. 12.]]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (ii) Test data with spaces, some samples" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "test_filename = 'data/test_data_spaces.csv'\n", "test_data = Data(test_filename)\n", "\n", "rows = [1, 2]\n", "\n", "one = test_data.select_data(['spaces'], rows=rows)\n", "print(f'All data in the \"spaces\" variable (shape={one.shape}): \\n{one}')\n", "\n", "two = test_data.select_data(['spaces', 'places'], rows=rows)\n", "print(f'All data in the \"spaces\" and \"places\" variables (shape={two.shape}): \\n{two}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You should see:\n", "\n", " All data in the \"spaces\" variable (shape=(2, 1)): \n", " [[ 6.]\n", " [10.]]\n", " All data in the \"spaces\" and \"places\" variables (shape=(2, 2)): \n", " [[ 6. 8.]\n", " [10. 12.]]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (iii) Test data with spaces, non-contiguous samples" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "test_filename = 'data/test_data_spaces.csv'\n", "test_data = Data(test_filename)\n", "\n", "rows = [0, 2]\n", "\n", "one = test_data.select_data(['spaces'], rows=rows)\n", "print(f'All data in the \"spaces\" variable (shape={one.shape}): \\n{one}')\n", "\n", "two = test_data.select_data(['bad', 'places'], rows=rows)\n", "print(f'All data in the \"bad\" and \"places\" variables (shape={two.shape}): \\n{two}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You should see:\n", "\n", " All data in the \"spaces\" variable (shape=(2, 1)): \n", " [[ 2.]\n", " [10.]]\n", " All data in the \"bad\" and \"places\" variables (shape=(2, 2)): \n", " [[ 3. 4.]\n", " [11. 12.]]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Task 3: `Analysis` class\n", "\n", "In this task, you will implement the `Analysis` class that analyzes and visualizes complex datasets comprised of many variables. After creating `Analysis`, you’ll use it alongside your `Data` class to analyze an open-access scientific dataset. *Can you use the tools you’ve developed to extract real-world truths from data?*\n", "\n", "You will build on this object-oriented approach to do advanced data analysis in future projects, making it easier for you to apply the tools you develop this week to a wide range of datasets.\n", "\n", "It is crucial for your success in CS251 to become fluent in the **vectorization** of matrix operations (**NO LOOPS**) with Numpy and the visualization of data with Matplotlib. We will use these Python packages each and every week. Please bring your questions to class and office hours so that we can help you get comfortable with these essential tools before the math gets more complex and interesting.\n", "\n", "In method docstrings that state that loops are not allowed, **we will take off points for every loop that we see — vectorized computations only in analysis functions!** You may use loops in plotting-related methods.\n", "\n", "**TODO:**\n", "- Download the `analysis.py` code template." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Analysis and summary statistic methods\n", "\n", "To actually perform computations on data, you will implement the following methods in `analysis.py`, modeled off of common functions in the `pandas` python package (https://pandas.pydata.org/pandas-docs/stable/user_guide/computation.html) that we will adopt later in the semester:\n", "\n", "- `set_data(data)`\n", "- `min(headers, rows=[])`: Computes the minimum of each variable in `headers` in the data object. Possibly only in a subset of data samples (`rows`) if `rows` is not empty.\n", "- `max(headers, rows=[])`: Computes the maximum of each variable in `headers` in the data object.\n", "- `range(headers, rows=[])`: Computes the range [min, max] for each variable in `headers` in the data object.\n", "- `mean(headers, rows=[])`: Computes the mean for each variable in `headers` in the data object. Equation for mean: $$\\bar{x} = \\frac{1}{N} \\sum_{i=1}^N x_i$$ where $x_i$ is the $i^{th}$ data sample and $N$ is the total number of data samples in the dataset.\n", "- `var(headers, rows=[])`: Computes the variance for each variable in `headers` in the data object. Equation for sample variance: $$s^2 = \\frac{1}{N-1} \\sum_{i=1}^N (x_i - \\bar{x})^2$$ where $x_i$ is the $i^{th}$ data sample, $N$ is the total number of data samples in the dataset, $\\bar{x}$ is the mean.\n", "- `std(headers, rows=[])`: Computes the standard deviation for each variable in `headers` in the data object. Equation for sample standard deviation: $$s^2 = \\sqrt{\\frac{1}{N-1} \\sum_{i=1}^N (x_i - \\bar{x})^2}$$ where $x_i$ is the $i^{th}$ data sample, $N$ is the total number of data samples in the dataset, $\\bar{x}$ is the mean." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from analysis import Analysis\n", "\n", "iris_filename = 'data/iris.csv'\n", "iris_data = Data(iris_filename)\n", "an = Analysis(iris_data)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (i) Test `min`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(f\"Your minimum values for length vars (all samples) are\\n{an.min(['sepal_length', 'petal_length'])}\\nand should be\\n[4.3 1. ]\")\n", "print(f\"Your minimum values for length vars (1st 10 samples) are\\n{an.min(['sepal_length', 'petal_length'], rows=np.arange(10))}\\nand should be\\n[4.4 1.3]\")\n", "print(f\"Your shape is {an.min(['sepal_length', 'petal_length']).shape}\\nand should be (2,)\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (ii) Test `range`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "all_mins, all_maxs = an.range(['sepal_length', 'sepal_width'])\n", "some_mins, some_maxs = an.range(['sepal_length', 'sepal_width'], rows=np.arange(10))\n", "print(f\"Your range for sepal vars (all samples) is\\nmins:{all_mins}\\nmaxs:{all_maxs}\\nand should be\\nmins:[4.3 2. ]\\nmaxs:[7.9 4.4]\\n\")\n", "print(f\"Your range for sepal vars (1st 10 samples) is\\nmins:{some_mins}\\nmaxs:{some_maxs}\\nand should be\\nmins:[4.4 2.9]\\nmaxs:[5.4 3.9]\\n\")\n", "print(f\"Your min shape is {all_mins.shape}\\nand should be (2,)\")\n", "print(f\"Your max shape is {all_maxs.shape}\\nand should be (2,)\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (iii) Test `mean`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(f\"Your mean values for length vars (all samples) are\\n{an.mean(['sepal_length', 'petal_length'])}\\nand should be\\n[5.84333333 3.758 ]\")\n", "print(f\"Your mean values for length vars (1st 10 samples) are\\n{an.mean(['sepal_length', 'petal_length'], rows=np.arange(10))}\\nand should be\\n[4.86 1.45]\")\n", "print(f\"Your shape is {an.mean(['sepal_length', 'petal_length']).shape}\\nand should be (2,)\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (iv) Test `var`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(f\"Your variance values for all vars (all samples) are\\n{an.var(an.data.get_headers()[:-1])}\\nand should be\\n[0.68569351 0.18997942 3.11627785 0.58100626]\")\n", "print(f\"Your variance values for all vars (1st 10 samples) are\\n{an.var(an.data.get_headers()[:-1], rows=np.arange(10))}\\nand should be\\n[0.08488889 0.09433333 0.01166667 0.00622222]\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### (v) Test `std`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(f\"Your stdev values for all vars (all samples) are\\n{an.std(an.data.get_headers()[:-1])}\\nand should be\\n[0.82806613 0.43586628 1.76529823 0.76223767]\")\n", "print(f\"Your stdev values for all vars (1st 10 samples) are\\n{an.std(an.data.get_headers()[:-1], rows=np.arange(10))}\\nand should be\\n[0.29135698 0.30713732 0.10801234 0.07888106]\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Task 4: Data visualization with matplotlib\n", "\n", "In this task, you will create some plots to practice using matplotlib. You will write several functions to make some kinds of plots that will come up frequently in the coming weeks." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4a. Join data with a smooth curve\n", "\n", "In the cell below, create a single plot of the functions $sin(x)$, $sin(x)^3$, and $sin(x)^5$ in different colors in the range [-6.28, 6.28]. Points should be connected with a smooth curve in each case. Plug in more than 50 x values otherwise your curves will look jagged.\n", "\n", "Your plots should be \"high quality\", which means that they should contain:\n", "- a helpful title\n", "- clearly differentiated curve colors. **Do not use the default colors, pick your own colors.**\n", "- a legend showing which color scales map onto which curves\n", "- only the x tick marks -6.28, -3.14, 0, +3.14, +6.28\n", "- only the y tick marks -1, 0, +1\n", "- there should be no garbage text output below, just the plot" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "deletable": false, "nbgrader": { "cell_type": "code", "checksum": "7f053783b1a33d2ca6c5b89834aa9129", "grade": false, "grade_id": "cell-50e97ce963dfd99f", "locked": false, "schema_version": 3, "solution": true, "task": false } }, "outputs": [], "source": [ "# YOUR CODE HERE" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4b. Anscombe's Quartet: Create a 2x2 grid of plots \n", "\n", "In the cell below, create a SINGLE figure with four *scatter plots* in it (2 rows, 2 columns). This should leverage matplotlib's `subplots` function and create ONE cell output (not 4).\n", "\n", "1. You are plotting the data in `anscombe.csv`: The first set of points should be plotted on the top-left (row indices 0-10), the second set should be on the top-right (row indices 11-21), the third set should be on the bottom-left (row indices 22-32), and the last set on the bottom-right (row indices 33-43).\n", "2. Make the markers in each subplot a different shape for fun.\n", "3. You should not have connected curves in these plots.\n", "4. The x/y plot limits should the same in all plots (and include all data samples).\n", "5. You should label your axes." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "deletable": false, "nbgrader": { "cell_type": "code", "checksum": "5791908d52d087f23110bcc907ecb9a7", "grade": false, "grade_id": "cell-b654361adb33d516", "locked": false, "schema_version": 3, "solution": true, "task": false } }, "outputs": [], "source": [ "# YOUR CODE HERE" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4c. `scatter` method in `Analysis`\n", "\n", "Scatter plots will come up a lot in this course. Fill in the `scatter` method in the `Analysis` class to automate the process of selecting (x, y) data from a dataset, creating a scatter plot, labeling axes, and labeling the plot with a title." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_filename = 'data/iris.csv'\n", "iris_data = Data(iris_filename)\n", "iris_an = Analysis(iris_data)\n", "\n", "x_samps, y_samps = iris_an.scatter('sepal_length', 'sepal_width', 'Iris Sepal width vs. length')\n", "iris_an.show()\n", "\n", "print(f'Your x sample shape is {x_samps.shape} and should be (150,) or (150, 1)')\n", "print(f'Your y sample shape is {y_samps.shape} and should be (150,) or (150, 1)')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4d. `pair_plot` method in `Analysis`\n", "\n", "When doing exploratory data analysis, it is often helpful to create scatter plots of all pairs of variables to visually discover relationships and develop hypotheses to explore quantitatively. For example, if we have variables A, B, C, we would create scatter plots (x=A, y=B), (x=A, y=C), (x=B, y=C). A grid of subplots showing all these scatter plots is called a **pair plot**. If there are $M$ variables, then the grid of plots is $M\\times M$.\n", "\n", "- In `Analysis`, implement `pair_plot` and test your implementation below on the Iris data.\n", " - The y axis of the FIRST column should be labeled with the appropriate variable being plotted there.\n", " - The x axis of the LAST row should be labeled with the appropriate variable being plotted there.\n", " - Only label the axes and ticks on the FIRST column and LAST row. There should be no labels on other plots (it looks too cluttered otherwise!).\n", " - Do have tick MARKS on all plots (just not the labels)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Your plot on the bottom-left should look like:\n", "\n", "![pairplot_bottomleft.png](images/pairplot_bottomleft.png)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "iris_filename = 'data/iris.csv'\n", "iris_data = Data(iris_filename)\n", "iris_an = Analysis(iris_data)\n", "\n", "fig, axes = iris_an.pair_plot(iris_data.get_headers())\n", "iris_an.show()\n", "\n", "print(f'Do you have a 5x5 grid of plots? {axes.shape[0] == 5 and axes.shape[1] == 5}')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Task 5: Real-world application\n", "\n", "Analyze one real-world dataset of your choice: [e.g. wine quality dataset, Old Faithful geyser dataset, Auto MPG dataset, tips dataset]. Use your **existing** visualization and analysis tools to try to learn something about the real world from this dataset (*you can implement other analyses and explore other visualizations as extensions; see suggestions in the Project 1 Extensions post on Google Classroom*). \n", "\n", "In your analysis, include the following:\n", "\n", "1. Important information about the dataset.\n", " - Who created it and when.\n", " - Why was it created / what information does it contain about the real world?\n", " - How many samples and variables. The name and meaning of each variable (*including units!*).\n", "2. Use scatter plot, pair plot, or other visualizations and determine which helps you learn the most about your dataset.\n", " - Create at least one \"good\" graph that presents the data in a helpful way and at least one “bad” graph that is not helpful for gleaning insight into your dataset.\n", "3. Briefly (but completely) explain your findings in the Markdown cell below alongside well-labeled graphs that support your conclusions.\n", "4. Compute summary statistics (i.e. range, mean, standard deviation) of key variables in the dataset. Provide information about the units of the summary statistics and explain what they mean about the world.\n", "5. Briefly assess the degree to which the dataset is **biased**. *For example, if the dataset measures aspects of people or geographies, are any excluded/undersampled (or conversely, oversampled)?* If there is bias, how does this affect the conclusions/observations of your analysis?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Code to import your dataset and create visualizations here.\n", "# You may decide to split up the plots across multiple cells and interleave them with markdown cells" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Explain your findings below:**\n", "\n", "*Feel free to merge/revise the order of the items below to suit your preferred style/flow. However, be sure to address all the key points from above.*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. **Dataset information:**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "2. **\"Good\" and \"bad\" plot**:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "3. **Findings from plots:** " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "4. **Summary statistics:**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "5. **Bias in dataset:**" ] } ], "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.13.9" }, "vscode": { "interpreter": { "hash": "aee8b7b246df8f9039afb4144a1f6fd8d2ca17a180786b69acc140d282b71a49" } } }, "nbformat": 4, "nbformat_minor": 4 }