From c491fe8829c939bb20aeaf5661b645ea98089217 Mon Sep 17 00:00:00 2001 From: Allen Downey Date: Fri, 13 Nov 2020 11:13:07 -0500 Subject: [PATCH] Updating --- 01_query.ipynb | 85 +++++++++++++++++++++++++++++++++++++++++--------- 05_join.ipynb | 2 +- 2 files changed, 71 insertions(+), 16 deletions(-) diff --git a/01_query.ipynb b/01_query.ipynb index fb70e3e..8c99949 100644 --- a/01_query.ipynb +++ b/01_query.ipynb @@ -141,7 +141,11 @@ { "cell_type": "code", "execution_count": 1, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# If we're running on Colab, install libraries\n", @@ -194,9 +198,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "**Optional detail**\n", - "\n", - "> Running this import statement has the effect of creating a [TAP+](http://www.ivoa.net/documents/TAP/) connection; TAP stands for \"Table Access Protocol\". It is a network protocol for sending queries to the database and getting back the results. We're not sure why it seems to create two connections." + "Running this import statement has the effect of creating a [TAP+](http://www.ivoa.net/documents/TAP/) connection; TAP stands for \"Table Access Protocol\". It is a network protocol for sending queries to the database and getting back the results. We're not sure why it seems to create two connections." ] }, { @@ -236,7 +238,11 @@ { "cell_type": "code", "execution_count": 4, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [ { "name": "stdout", @@ -362,7 +368,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -377,10 +383,10 @@ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 5, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -437,6 +443,27 @@ "What happens? Is the error message helpful? If you had not made this error deliberately, would you have been able to figure it out?" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Solution\n", + "\n", + "# The error message, last time we tried, was\n", + "\n", + "# Retrieving table 'gaiadr2.gaiadr2.gaia_source'\n", + "# 500 Error 500:\n", + "# esavo.tap.TAPException: esavo.tap.TAPException: Schema cannot be null\n", + "\n", + "# Which is not remotely helpful.\n", + "\n", + "# The point of this exercise is to alert the participants to the difficulty\n", + "# of debugging queries with VERY limited feedback. So developing and testing\n", + "# incrementally is very important." + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -449,7 +476,11 @@ { "cell_type": "code", "execution_count": 7, - "metadata": {}, + "metadata": { + "tags": [ + "hide-output" + ] + }, "outputs": [ { "name": "stdout", @@ -581,7 +612,11 @@ { "cell_type": "code", "execution_count": 8, - "metadata": {}, + "metadata": { + "tags": [ + "remove-cell" + ] + }, "outputs": [ { "name": "stdout", @@ -670,7 +705,11 @@ { "cell_type": "code", "execution_count": 9, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [ { "name": "stdout", @@ -1166,7 +1205,11 @@ { "cell_type": "code", "execution_count": 18, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -1184,7 +1227,11 @@ { "cell_type": "code", "execution_count": 19, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -1507,7 +1554,11 @@ { "cell_type": "code", "execution_count": 29, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [], "source": [ "# Solution\n", @@ -1523,7 +1574,11 @@ { "cell_type": "code", "execution_count": 30, - "metadata": {}, + "metadata": { + "tags": [ + "hide-cell" + ] + }, "outputs": [ { "name": "stdout", diff --git a/05_join.ipynb b/05_join.ipynb index 1484d3d..e4d80bf 100644 --- a/05_join.ipynb +++ b/05_join.ipynb @@ -167,7 +167,7 @@ "\n", "Selecting stars with `bp-rp` less than 2 excludes many class M dwarf stars, which are low temperature, low luminosity. A star like that at GD-1's distance would be hard to detect, so if it is detected, it it more likely to be in the foreground.\n", "\n", - "Now, to select stars with the age and metal richness we expect in GD-1, we will use `g − i` color and apparent `g`-band magnitude, which are available from the Pan-STARRS survey." + "Now, to select stars with the age and metal richness we expect in GD-1, we will use `g - i` color and apparent `g`-band magnitude, which are available from the Pan-STARRS survey." ] }, {