From f3a7f6821c4e63c5c78e9cd98ac185762bb82ab8 Mon Sep 17 00:00:00 2001 From: Allen Downey Date: Fri, 13 Nov 2020 19:36:30 -0500 Subject: [PATCH] Updating notebooks --- 01_query.ipynb | 35 +++++++++++++++++++++-------------- 03_motion.ipynb | 6 +++++- 04_select.ipynb | 12 ++++++++++-- 05_join.ipynb | 30 +++++++++++++++++++++++++----- 07_plot.ipynb | 18 +++++++++++++++--- 5 files changed, 76 insertions(+), 25 deletions(-) diff --git a/01_query.ipynb b/01_query.ipynb index 8c99949..d732d89 100644 --- a/01_query.ipynb +++ b/01_query.ipynb @@ -41,7 +41,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "[This article in *Science* magazine](https://www.sciencemag.org/news/2018/10/streams-stars-reveal-galaxy-s-violent-history-and-perhaps-its-unseen-dark-matter) explains some of the background, including the process that led to the paper and an discussion of the scientific implications:\n", + "[This article in *Science* magazine](https://www.sciencemag.org/news/2018/10/streams-stars-reveal-galaxy-s-violent-history-and-perhaps-its-unseen-dark-matter) explains some of the background, including the process that led to the paper and a discussion of the scientific implications:\n", "\n", "* \"The streams are particularly useful for ... galactic archaeology --- rewinding the cosmic clock to reconstruct the assembly of the Milky Way.\"\n", "\n", @@ -112,7 +112,7 @@ "source": [ "## Query Language\n", "\n", - "In order to select data from a database, you have to compose a query, which is like a program written in a \"query language\".\n", + "In order to select data from a database, you have to compose a query, which is a program written in a \"query language\".\n", "The query language we'll use is ADQL, which stands for \"Astronomical Data Query Language\".\n", "\n", "ADQL is a dialect of [SQL](https://en.wikipedia.org/wiki/SQL) (Structured Query Language), which is by far the most commonly used query language. Almost everything you will learn about ADQL also works in SQL.\n", @@ -123,27 +123,25 @@ }, { "cell_type": "markdown", - "metadata": {}, + "metadata": { + "tags": [ + "remove-cell" + ] + }, "source": [ "## Installing libraries\n", "\n", - "The library we'll use to get Gaia data is [Astroquery](https://astroquery.readthedocs.io/en/latest/).\n", - "\n", "If you are running this notebook on Colab, you can run the following cell to install Astroquery and the other libraries we'll use.\n", "\n", - "If you are running this notebook on your own computer, you might have to install these libraries yourself. \n", - "\n", - "If you are using this notebook as part of a Carpentries workshop, you should have received setup instructions.\n", - "\n", - "TODO: Add a link to the instructions.\n" + "If you are running this notebook on your own computer, you might have to install these libraries yourself. See the instructions in the preface." ] }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 8, "metadata": { "tags": [ - "hide-cell" + "remove-cell" ] }, "outputs": [], @@ -163,6 +161,8 @@ "source": [ "## Connecting to Gaia\n", "\n", + "The library we'll use to get Gaia data is [Astroquery](https://astroquery.readthedocs.io/en/latest/).\n", + "\n", "Astroquery provides `Gaia`, which is an [object that represents a connection to the Gaia database](https://astroquery.readthedocs.io/en/latest/gaia/gaia.html).\n", "\n", "We can connect to the Gaia database like this:" @@ -446,7 +446,11 @@ { "cell_type": "code", "execution_count": null, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -613,8 +617,10 @@ "cell_type": "code", "execution_count": 8, "metadata": { + "scrolled": true, "tags": [ - "remove-cell" + "hide-cell", + "remove-output" ] }, "outputs": [ @@ -1672,6 +1678,7 @@ } ], "metadata": { + "celltoolbar": "Tags", "kernelspec": { "display_name": "Python 3", "language": "python", diff --git a/03_motion.ipynb b/03_motion.ipynb index baf52c9..4d6c997 100644 --- a/03_motion.ipynb +++ b/03_motion.ipynb @@ -1739,7 +1739,11 @@ { "cell_type": "code", "execution_count": 127, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", diff --git a/04_select.ipynb b/04_select.ipynb index 56cda75..50be0fd 100644 --- a/04_select.ipynb +++ b/04_select.ipynb @@ -677,7 +677,11 @@ { "cell_type": "code", "execution_count": 21, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -720,7 +724,11 @@ { "cell_type": "code", "execution_count": 23, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [ { "name": "stdout", diff --git a/05_join.ipynb b/05_join.ipynb index e4d80bf..5b600ba 100644 --- a/05_join.ipynb +++ b/05_join.ipynb @@ -939,7 +939,11 @@ { "cell_type": "code", "execution_count": 24, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -1012,7 +1016,11 @@ { "cell_type": "code", "execution_count": 26, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -1025,7 +1033,11 @@ { "cell_type": "code", "execution_count": 27, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -1038,7 +1050,11 @@ { "cell_type": "code", "execution_count": 28, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -1053,7 +1069,11 @@ { "cell_type": "code", "execution_count": 29, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", diff --git a/07_plot.ipynb b/07_plot.ipynb index 77778eb..90aee03 100644 --- a/07_plot.ipynb +++ b/07_plot.ipynb @@ -239,7 +239,11 @@ { "cell_type": "code", "execution_count": 6, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -298,7 +302,11 @@ { "cell_type": "code", "execution_count": 7, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -978,7 +986,11 @@ { "cell_type": "code", "execution_count": 28, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n",