{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Using these notebooks" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This workbench is created using Jupyter notebooks. Jupyter lets you combine text, images, and live code within a single web page. So not only can you read about collections data, you can download it, analyse it, and visualise it – all within your browser!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Running code cells" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Most of the notebooks here include snippets of real code contained within cells. To run these snippets, just click on the cell and hit **Shift+Enter**. Try it with the cell below!" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# CLICK ON ME AND THEN HIT SHIFT+ENTER!\n", "\n", "# This makes the datetime module available to use\n", "import datetime\n", "\n", "# This creates a variable called 'date_now' and uses the datetime.date.today() function to set it to today's date.\n", "date_now = datetime.date.today()\n", "\n", "# This displays a nicely-formatted string containing the date\n", "print(\"Congratulations! On {} you ran the code in this cell.\".format(date_now))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
**Help! Nothing happens when I click!**
\n", "\n", "\n", "If nothing happens when you click on a cell or hit **Shift+Enter** it's probably because you're viewing a static version of the notebook. See Introduction for setting up a live version.\n", "\n", "**Help! I get a weird 'Name Error' saying that 'date_now' is not defined.**
\n", "If you get a message about a NameError, make sure that you've run the first code cell (where we create the 'date_now' variable, before this one.\n", "\n", "