{ "cells": [ { "cell_type": "markdown", "id": "f3d8eafe-eb4f-42fb-a18e-7d197252d334", "metadata": {}, "source": [ "# Generating core data visualizations on the Central Park weather dataset in Python" ] }, { "cell_type": "markdown", "id": "7ab931c9-83ac-43a1-9272-76d69b4b3c4d", "metadata": {}, "source": [ "## Introduction" ] }, { "cell_type": "markdown", "id": "26b0fa66-56ee-408a-84a4-1e74a70b0665", "metadata": {}, "source": [ "We learned four key plot types in the lecture on Data Visualization: **timeseries**, **box-and-whisker**, **histogram**, and **scatterplot**. This included both what they represent/how to interpret them *and* how to plot them in a Jupyter notebook using matplotlib and numpy. We also learned how to read in netCDF files from disk---such as the Central Park weather station dataset---using the `netCDF4` package.\n", "\n", "In this assignment, you'll generate these plots for all of the variables in that dataset." ] }, { "cell_type": "markdown", "id": "21277a26-4aff-42d8-9ce0-731b29e2cbe3", "metadata": {}, "source": [ "## A toy example" ] }, { "cell_type": "markdown", "id": "bc815967-1178-4503-90da-4934e72dbcc2", "metadata": {}, "source": [ "To provide concrete examples of what you'll create, first I'll create a fake dataset that's the same length as the Central Park data. \n", "\n", "(This involves things that we haven't yet covered in class, so it's no problem if you don't follow the lines of code below.)" ] }, { "cell_type": "code", "execution_count": 3, "id": "1b14a1e1-f0c9-4d04-a7c0-1e60b7e52687", "metadata": { "editable": true, "slideshow": { "slide_type": "" }, "tags": [] }, "outputs": [ { "data": { "text/html": [ "
<xarray.DataArray 'toy' (time: 56520)>\n", "array([ 0.85875537, -0.24913133, -0.56981586, ..., -0.48240508,\n", " -0.6090622 , -1.52678376])\n", "Coordinates:\n", " * time (time) datetime64[ns] 1869-01-01 1869-01-02 ... 2023-09-30