From 1e6f8876c94672864815de4e48caa57094d4cbb4 Mon Sep 17 00:00:00 2001 From: Floris Calkoen <44444001+FlorisCalkoen@users.noreply.github.com> Date: Thu, 25 Jan 2024 09:08:41 -0800 Subject: [PATCH] Make questions from questionbank (#45) * Move questions to .json file * Update 1_coastal_classification.ipynb * comments and question bank example * formatting * suggestions from floris * Moved all import and directory statements to main notebook. Initializer is now empty * re-labelled questions from part 2 of notebook 1 * Removed unnecessary import and directory statements * rename classification json file --------- Co-authored-by: Kevin Co-authored-by: floriscalkoen --- cookbook/question_types.ipynb | 6 +- notebooks/1_coastal_classification.ipynb | 932 +++--------------- .../initialize/1_coastal_classification.ipynb | 156 ++- .../questions/01_coastal_classification.json | 37 - .../questions/1_coastal_classification.json | 785 +++++++++++++++ 5 files changed, 1001 insertions(+), 915 deletions(-) delete mode 100644 notebooks/questions/01_coastal_classification.json create mode 100644 notebooks/questions/1_coastal_classification.json diff --git a/cookbook/question_types.ipynb b/cookbook/question_types.ipynb index 9aaa0e8..2156e88 100644 --- a/cookbook/question_types.ipynb +++ b/cookbook/question_types.ipynb @@ -29,7 +29,7 @@ "# with the questions as they are ATM to a JSON file, watch out for trailing comma's. Your code error will warn you. But if you\n", "# cannot read the JSON file with the function, it's probably related to that.\n", "QUESTION_DIR = pathlib.Path.cwd().parent / \"notebooks\" / \"questions\"\n", - "question_fp = QUESTION_DIR / \"01_coastal_classification.json\"\n", + "question_fp = QUESTION_DIR / \"1_coastal_classification.json\"\n", "\n", "# The coastal dynamics package now contains a small utilty function to load the questions from a JSON file\n", "questions = load_questions(question_fp)\n", @@ -307,9 +307,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python [conda env:coastal]", + "display_name": "Python [conda env:jl-full] *", "language": "python", - "name": "conda-env-coastal-py" + "name": "conda-env-jl-full-py" }, "language_info": { "codemirror_mode": { diff --git a/notebooks/1_coastal_classification.ipynb b/notebooks/1_coastal_classification.ipynb index e8cbb39..507f0ba 100644 --- a/notebooks/1_coastal_classification.ipynb +++ b/notebooks/1_coastal_classification.ipynb @@ -7,7 +7,7 @@ "metadata": {}, "outputs": [], "source": [ - "%run initialize/Week_1_Initialize.ipynb" + "# %run initialize/1_coastal_classification.ipynb" ] }, { @@ -41,35 +41,82 @@ }, "outputs": [], "source": [ - "import os\n", "import pathlib\n", + "import sys\n", "\n", "import colorcet as cc\n", "import dask.dataframe as dd\n", "import geopandas as gpd\n", - "import holoviews as hv\n", - "import hvplot.pandas # noqa: API import\n", - "import hvplot.xarray # noqa: API import\n", - "import ipyleaflet\n", "import numpy as np\n", - "import pandas as pd\n", "import panel as pn\n", - "from geoviews import tile_sources as gvts\n", - "from ipyleaflet import Map, Marker, ScaleControl, basemaps\n", - "from ipywidgets import HTML\n", + "import holoviews as hv\n", + "import hvplot.pandas # noqa: API import\n", + "from bokeh.models import PanTool, WheelZoomTool\n", "\n", + "print(\"Packages succesfully loaded\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d5e278d9", + "metadata": {}, + "outputs": [], + "source": [ + "# THESE PACKAGES ARE NO LONGER USED\n", "\n", - "from coastal_dynamics.geometries import geo_bbox\n", + "# import os\n", "\n", + "# import hvplot.xarray # noqa: API import\n", + "# import ipyleaflet\n", + "# import pandas as pd\n", + "# import matplotlib.pyplot as plt\n", + "# import matplotlib.animation as animation\n", + "# from geoviews import tile_sources as gvts\n", + "# from ipyleaflet import Map, Marker, ScaleControl, basemaps\n", + "# import ipywidgets as widgets\n", + "# from ipywidgets import HTML, interact, fixed, interact_manual, interactive\n", + "# import IPython\n", + "# from IPython.display import HTML, display\n", + "# from random import shuffle, uniform\n", + "# from coastal_dynamics.geometries import geo_bbox\n", + "# from PIL import Image" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6244aec6", + "metadata": {}, + "outputs": [], + "source": [ + "# Set project directory\n", "cwd = pathlib.Path().resolve()\n", "proj_dir = cwd.parent # this is the root of the CoastalCodeBook\n", + "sys.path.append(str(proj_dir / \"src\"))\n", "\n", "DATA_DIR = proj_dir / \"data\"\n", - "coastal_systems_fp = DATA_DIR / \"01_coastal_systems.gpkg\"\n", + "coastal_systems_fp = DATA_DIR / \"01_coastal_systems.gpkg\"" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bf5a59ac", + "metadata": {}, + "outputs": [], + "source": [ + "# Set up the questions\n", + "import coastal_dynamics as cd\n", + "from coastal_dynamics.io import load_questions\n", "\n", + "# Activate the Panel widget to make the visualizations.\n", "pn.extension()\n", "\n", - "print(cwd)" + "QUESTION_DIR = pathlib.Path.cwd().parent / \"notebooks\" / \"questions\"\n", + "question_fp = QUESTION_DIR / \"1_coastal_classification.json\"\n", + "\n", + "questions = load_questions(question_fp)\n" ] }, { @@ -143,16 +190,6 @@ "\n" ] }, - { - "cell_type": "code", - "execution_count": null, - "id": "e73bed40-2d30-4d31-9fe4-7f2895547062", - "metadata": {}, - "outputs": [], - "source": [ - "from bokeh.models import PanTool, WheelZoomTool" - ] - }, { "cell_type": "code", "execution_count": null, @@ -162,8 +199,6 @@ }, "outputs": [], "source": [ - "pn.extension()\n", - "\n", "# title_bar = pn.pane.Markdown(\n", "# \"##Exercise 1: Plate tectonics & first-order coastal features\",\n", "# styles={\"color\": \"black\"},\n", @@ -201,7 +236,6 @@ " date_end,\n", " column_type,\n", "):\n", - "\n", " panel = df[\n", " (df.mag > magnitude_start)\n", " & (df.mag < magnitude_end)\n", @@ -232,18 +266,19 @@ " clabel=colorbar_labels[column_type],\n", " )\n", "\n", - " p.opts(width=1000, height=500, tools=['wheel_zoom'])\n", - " \n", + " p.opts(width=1000, height=500, tools=[\"wheel_zoom\"])\n", + "\n", " return p\n", "\n", + "\n", "earthquake_panel = pn.Column(\n", " # pn.Row(title_bar, align='center'),\n", - " pn.Row(column_types, align='center'),\n", - " pn.Row(magnitude_slider, align='center'),\n", - " pn.Row(depth_slider, align='center'),\n", - " pn.Row(date_slider, align='center'), \n", - " pn.Row(plot_earthquake_panel, align='center')\n", - " )\n" + " pn.Row(column_types, align=\"center\"),\n", + " pn.Row(magnitude_slider, align=\"center\"),\n", + " pn.Row(depth_slider, align=\"center\"),\n", + " pn.Row(date_slider, align=\"center\"),\n", + " pn.Row(plot_earthquake_panel, align=\"center\"),\n", + ")" ] }, { @@ -257,7 +292,7 @@ "# 'inline' if you would like the plot to show in the notebook\n", "# 'pop-out' if you would like the plot to show in a new tab (i.e. seperate window)\n", "\n", - "plot_where = 'pop-out'" + "plot_where = \"pop-out\"" ] }, { @@ -280,12 +315,13 @@ "outputs": [], "source": [ "def show_earthquake(plot_where):\n", - " if plot_where=='inline':\n", + " if plot_where == \"inline\":\n", " return earthquake_panel\n", - " elif plot_where=='pop-out':\n", + " elif plot_where == \"pop-out\":\n", " earthquake_panel.show()\n", " else:\n", - " print('please use either inline or pop-out for the plot_where variable')\n", + " print(\"please use either inline or pop-out for the plot_where variable\")\n", + "\n", "\n", "show_earthquake(plot_where);" ] @@ -306,70 +342,13 @@ "metadata": {}, "outputs": [], "source": [ - "question_data11 = {\n", - " \"name\": \"Q1-1\",\n", - " \"question\": \"At what depth do earthquakes along divergent boundaries generally occur?\",\n", - " \"options\": {\n", - " \"a\": \"less than 33 km\",\n", - " \"b\": \"between 33 km and 74 km\",\n", - " \"c\": \"between 74 km and 140 km\",\n", - " \"d\": \"more than 140 km \"\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct, earthquakes at diverging boundaries typically occur at shallower depths\",\n", - " \"incorrect\": \"Incorrect. Note that at diverging boundaries the tectonic plates move away from each other. Magma wells up to (relatively) shallow depths in order to fill the gap. This may cause earthquakes. Where are these earthquakes likeliest to occur?\"}\n", - " }\n", - "\n", - "\n", - "question_data12 = {\n", - " \"name\": \"Q1-2\",\n", - " \"question\": \"Where do earthquakes with a depth > 250 km typically occur? Multiple answers may be correct.\",\n", - " \"options\": {\n", - " \"a\": \"wherever two oceanic plates converge\",\n", - " \"b\": \"at a boundary between an oceanic and continental plate\",\n", - " \"c\": \"at island arcs\",\n", - " \"d\": \"wherever two oceanic plates diverge\"\n", - " },\n", - " \"answers\": [\"a\", \"c\"],\n", - " \"feedback\": {\"correct\": \"Correct, indeed very deep earthquakes occur mostly when two ocaenic plates converge, or at an island arc.\",\n", - " \"incorrect\": \"Incorrect. Deep earthquakes occur due to deep processes such as subduction. Due to subduction, island arcs may form (see Figure 2.9 in the book). Where does subduction typically occur?\"}\n", - " }\n", - "\n", - "\n", - "question_data13 = {\n", - " \"name\": \"Q1-3\",\n", - " \"question\": \"How should one set the depth slider (approximately) to capture the majority of the earthquakes at convergent boundaries?\",\n", - " \"options\": {\n", - " \"a\": \"0 - 33 km\",\n", - " \"b\": \"33 - 250 km\",\n", - " \"c\": \"250 - 350 km\",\n", - " \"d\": \"350 - 650 km\"\n", - " },\n", - " \"answer\": \"b\",\n", - " \"feedback\": {\"correct\": \"Correct, indeed most earthquakes at convergent boundaries occur between 33 km and 250 km depth.\",\n", - " \"incorrect\": \"Incorrect. Shallow earthquakes occur mostly at divergent boundaries (see also question 1). Earthquakes at a depth greater than 250 km do indeed occur at converging boundaries, but this range excludes a lot of earthquakes which do in fact occur at converging boundaries.\"}\n", - " }\n", + "q1 = cd.QuestionFactory(questions[\"Q1-1\"]).serve()\n", + "q2 = cd.QuestionFactory(questions[\"Q1-2\"]).serve()\n", + "q3 = cd.QuestionFactory(questions[\"Q1-3\"]).serve()\n", + "q4 = cd.QuestionFactory(questions[\"Q1-4\"]).serve()\n", "\n", "\n", - "question_data14 = {\n", - " \"name\": \"Q1-4\",\n", - " \"question\": \"How can one distinguish convergent boundaries from divergent boundaries using the earthquake information? Multiple answers may be correct.\",\n", - " \"options\": {\n", - " \"a\": \"width of earthquake zone\",\n", - " \"b\": \"magnitude of earthquakes\",\n", - " \"c\": \"earthquake depth\",\n", - " \"d\": \"frequency of earthquakes\"\n", - " },\n", - " \"answers\": [\"a\", \"c\", \"d\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Try to use the sliders in the figure to find out at what depth earthquakes typically occur for different boundary types. By adjusting the date range, you can also check the frequency of earthquakes for different boundaries. Finally, look at the width of the earthquake zone and the magnitude of earthquakes for different types of boundaries. What differences do you observe?\"}\n", - " }\n", - "\n", - "\n", - "pn.Column(MC(question_data11), \n", - " MS(question_data12), \n", - " MC(question_data13), \n", - " MS(question_data14))" + "pn.Column(q1, q2, q3, q4)" ] }, { @@ -387,21 +366,9 @@ "metadata": {}, "outputs": [], "source": [ - "question_data15 = {\n", - " \"name\": \"Q1-5\",\n", - " \"question\": \"What are the two most important inherited aspects of the process of plate tectonics with respect to coastal features?\",\n", - " \"options\": {\n", - " \"a\": \"climate of the main land\",\n", - " \"b\": \"latitude\",\n", - " \"c\": \"continental shelf width\",\n", - " \"d\": \"sediment supply\"\n", - " },\n", - " \"answers\": [\"c\",\"d\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Read section 2.3.3. from the book, and try the question again.\"}\n", - " }\n", + "q5 = cd.QuestionFactory(questions[\"Q1-5\"]).serve()\n", "\n", - "pn.Column(MS(question_data15))" + "pn.Column(q5)" ] }, { @@ -419,66 +386,12 @@ "metadata": {}, "outputs": [], "source": [ - "question_data16 = {\n", - " \"name\": \"Q1-6\",\n", - " \"question\": \"Compare the shelf width of the Gold Coast with other coasts around Australia. Would you consider the continental shelf width to be relatively large or small for the Gold Coast?\",\n", - " \"options\": {\n", - " \"a\": \"large\",\n", - " \"b\": \"small\",\n", - " },\n", - " \"answer\": \"b\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Compare the Gold Coast with the northern, southern, and western Australian coast. The lighter blue color in the figure shows the shallower part of the ocean, i.e. the continental shelf.\"}\n", - " }\n", - "\n", - "\n", - "question_data17 = {\n", - " \"name\": \"Q1-7\",\n", - " \"question\": \"Is there a tectonic boundary close to the Gold Coast? If so, what is its type?\",\n", - " \"options\": {\n", - " \"a\": \"divergent\",\n", - " \"b\": \"convergent\",\n", - " \"c\": \"neither\",\n", - " \"d\": \"no close boundary\"\n", - " },\n", - " \"answer\": \"b\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. The closest boundary lies approximately beneath New Zealand. Use Figure 2.6 from the book to see the type boundary.\"}\n", - " }\n", - "\n", - "\n", - "question_data18 = {\n", - " \"name\": \"Q1-8\",\n", - " \"question\": \"Is there a tectonic boundary on the other side of the continent? If so, what is its type?\",\n", - " \"options\": {\n", - " \"a\": \"divergent\",\n", - " \"b\": \"convergent\",\n", - " \"c\": \"neither\",\n", - " \"d\": \"no boundary\"\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. The closest boundary lies in the southern Indian Ocean. Use Figure 2.6 from the book to see the type boundary.\"}\n", - " }\n", + "q6 = cd.QuestionFactory(questions[\"Q1-6\"]).serve()\n", + "q7 = cd.QuestionFactory(questions[\"Q1-7\"]).serve()\n", + "q8 = cd.QuestionFactory(questions[\"Q1-8\"]).serve()\n", + "q9 = cd.QuestionFactory(questions[\"Q1-9\"]).serve()\n", "\n", - "\n", - "question_data19 = {\n", - " \"name\": \"Q1-9\",\n", - " \"question\": \"Is the Gold Coast protected by an island arc?\",\n", - " \"options\": {\n", - " \"a\": \"yes\",\n", - " \"b\": \"no\",\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Have a look at Figure 2.9 in the book, and the text below it. The Gold Coast is protected from the open ocean by New Zealand.\"}\n", - " }\n", - "\n", - "\n", - "pn.Column(MC(question_data16), \n", - " MC(question_data17), \n", - " MC(question_data18), \n", - " MC(question_data19))" + "pn.Column(q6, q7, q8, q9)" ] }, { @@ -496,79 +409,11 @@ "metadata": {}, "outputs": [], "source": [ - "question_data110 = {\n", - " \"name\": \"Q1-10\",\n", - " \"question\": \"What are the typical characteristics of a leading edge coast? You may select multiple answers.\",\n", - " \"options\": {\n", - " \"a\": \"found at convergent tectonic boundary\",\n", - " \"b\": \"found bordering ocean with diverging tectonic boundary\",\n", - " \"c\": \"has three sub-types: neo, afro, and amero\",\n", - " \"d\": \"coarse sediment\",\n", - " \"e\": \"relatively deep earthquakes\",\n", - " \"f\": \"frequent earthquakes\",\n", - " \"g\": \"protected by landmass such as island arc\",\n", - " \"h\": \"may contain large river deltas\",\n", - " \"i\": \"found far away from tectonic boundaries\",\n", - " \"j\": \"found close to tectonic boundaries\",\n", - " \"k\": \"more volcanic activity\",\n", - " \"l\": \"wide continental shelf\",\n", - " },\n", - " \"answers\": [\"a\", \"d\", \"e\", \"f\", \"j\", \"k\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Read section 2.3.2. and try again.\"}\n", - " }\n", - "\n", - "\n", - "question_data111 = {\n", - " \"name\": \"Q1-11\",\n", - " \"question\": \"What are the typical characteristics of a trailing edge coast? You may select multiple answers.\",\n", - " \"options\": {\n", - " \"a\": \"found at convergent tectonic boundary\",\n", - " \"b\": \"found bordering ocean with diverging tectonic boundary\",\n", - " \"c\": \"has three sub-types: neo, afro, and amero\",\n", - " \"d\": \"coarse sediment\",\n", - " \"e\": \"relatively deep earthquakes\",\n", - " \"f\": \"frequent earthquakes\",\n", - " \"g\": \"protected by landmass such as island arc\",\n", - " \"h\": \"may contain large river deltas\",\n", - " \"i\": \"found far away from tectonic boundaries\",\n", - " \"j\": \"found close to tectonic boundaries\",\n", - " \"k\": \"more volcanic activity\",\n", - " \"l\": \"wide continental shelf\",\n", - " },\n", - " \"answers\": [\"b\", \"c\", \"h\", \"i\", \"l\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Read section 2.3.2. and try again.\"}\n", - " }\n", - "\n", - "\n", + "q10 = cd.QuestionFactory(questions[\"Q1-10\"]).serve()\n", + "q11 = cd.QuestionFactory(questions[\"Q1-11\"]).serve()\n", + "q12 = cd.QuestionFactory(questions[\"Q1-12\"]).serve()\n", "\n", - "question_data112 = {\n", - " \"name\": \"Q1-12\",\n", - " \"question\": \"What are the typical characteristics of a marginal sea coast? You may select multiple answers.\",\n", - " \"options\": {\n", - " \"a\": \"found at convergent tectonic boundary\",\n", - " \"b\": \"found bordering ocean with diverging tectonic boundary\",\n", - " \"c\": \"has three sub-types: neo, afro, and amero\",\n", - " \"d\": \"coarse sediment\",\n", - " \"e\": \"relatively deep earthquakes\",\n", - " \"f\": \"frequent earthquakes\",\n", - " \"g\": \"protected by landmass such as island arc\",\n", - " \"h\": \"may contain large river deltas\",\n", - " \"i\": \"found far away from tectonic boundaries\",\n", - " \"j\": \"found close to tectonic boundaries\",\n", - " \"k\": \"more volcanic activity\",\n", - " \"l\": \"wide continental shelf\",\n", - " },\n", - " \"answers\": [\"a\", \"g\", \"h\", \"j\", \"l\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Read section 2.3.2. and try again.\"}\n", - " }\n", - "\n", - "\n", - "pn.Column(MS(question_data110), \n", - " MS(question_data111), \n", - " MS(question_data112))" + "pn.Column(q10, q11, q12)" ] }, { @@ -586,66 +431,12 @@ "metadata": {}, "outputs": [], "source": [ - "question_data113 = {\n", - " \"name\": \"Q1-13\",\n", - " \"question\": \"To what class of coasts does the coast at Wilmington (North Carolina, USA) belong?\",\n", - " \"options\": {\n", - " \"a\": \"leading edge\",\n", - " \"b\": \"trailing edge\",\n", - " \"c\": \"marginal sea\",\n", - " },\n", - " \"answer\": \"b\",\n", - " \"feedback\": {\"correct\": \"Correct, this is indeed a trailing edge coast. Can you tell which sub-type of trailing edge coast it is?\",\n", - " \"incorrect\": \"Incorrect. The coast is not close to a converging boundary, nor is it protected by an island arc. The East American coast is relatively flat, and is home to large river deltas. What type of coast do these characteristics all suggest?\"}\n", - " }\n", - "\n", - "\n", - "question_data114 = {\n", - " \"name\": \"Q1-14\",\n", - " \"question\": \"To what class of coasts does the coast at Shanghai (China) belong?\",\n", - " \"options\": {\n", - " \"a\": \"leading edge\",\n", - " \"b\": \"trailing edge\",\n", - " \"c\": \"marginal sea\",\n", - " },\n", - " \"answer\": \"c\",\n", - " \"feedback\": {\"correct\": \"Correct, this is indeed a marginal sea coast, because though close to a converging boundary it is protected (by islands)?\",\n", - " \"incorrect\": \"Incorrect. The coast is close to a converging boundary, and it is protected by an island arc. Additionally, large river deltas are present (the Yangtze River delta for Shanghai specifically). What type of coast do these characteristics suggest?\"}\n", - " }\n", - "\n", - "\n", - "question_data115 = {\n", - " \"name\": \"Q1-15\",\n", - " \"question\": \"To what class of coasts does the coast at Maputo (Mozambique) belong?\",\n", - " \"options\": {\n", - " \"a\": \"leading edge\",\n", - " \"b\": \"trailing edge\",\n", - " \"c\": \"marginal sea\",\n", - " },\n", - " \"answer\": \"b\",\n", - " \"feedback\": {\"correct\": \"Correct, this is indeed a trailing edge coast. It is not close to a converging boundary so even though it is protected by an island (Madagascar), it is still a trailing edge coast.\",\n", - " \"incorrect\": \"Incorrect. The coast is not close to a converging boundary, which suggests what type of coast?\"}\n", - " }\n", - "\n", + "q13 = cd.QuestionFactory(questions[\"Q1-13\"]).serve()\n", + "q14 = cd.QuestionFactory(questions[\"Q1-14\"]).serve()\n", + "q15 = cd.QuestionFactory(questions[\"Q1-15\"]).serve()\n", + "q16 = cd.QuestionFactory(questions[\"Q1-16\"]).serve()\n", "\n", - "question_data116 = {\n", - " \"name\": \"Q1-16\",\n", - " \"question\": \"To what class of coasts does the coast at Lima (Peru) belong?\",\n", - " \"options\": {\n", - " \"a\": \"leading edge\",\n", - " \"b\": \"trailing edge\",\n", - " \"c\": \"marginal sea\",\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct, this is indeed a leading edge coast. It is close to a converging boundary and not sheltered by a landmass.\",\n", - " \"incorrect\": \"Incorrect. The coast is close to a converging boundary and not sheltered by a landmass, which suggests what type of coast?\"}\n", - " }\n", - "\n", - "\n", - "pn.Column(MC(question_data113), \n", - " MC(question_data114), \n", - " MC(question_data115), \n", - " MC(question_data116))" + "pn.Column(q13, q14, q15, q16)" ] }, { @@ -663,56 +454,11 @@ "metadata": {}, "outputs": [], "source": [ - "question_data117 = {\n", - " \"name\": \"Q1-17\",\n", - " \"question\": \"What are the main causes for these differences in sediment supply? You may select multiple answers.\",\n", - " \"options\": {\n", - " \"a\": \"topography\",\n", - " \"b\": \"soil type\",\n", - " \"c\": \"climate\",\n", - " \"d\": \"vegetation type\"\n", - " },\n", - " \"answers\": [\"a\", \"c\"],\n", - " \"feedback\": {\"correct\": \"Correct, topography and climate are indeed the main factors determining the sediment supply.\",\n", - " \"incorrect\": \"Incorrect. Read the section on 'sediment availability' from section 2.3.3. from the book and try again.\"}\n", - " }\n", - "\n", - "\n", - "question_data118 = {\n", - " \"name\": \"Q1-18\",\n", - " \"question\": \"Amero-trailing edge coasts receive less/more (choose) sediment from rivers compared to Afro-trailing edge coasts. The deltas formed at Amero-trailing edge coasts are therefore smaller/larger (choose) when compared to Afro-trailing edge coasts.\",\n", - " \"options\": {\n", - " \"a\": \"less\",\n", - " \"b\": \"more\",\n", - " \"c\": \"smaller\",\n", - " \"d\": \"larger\"\n", - " },\n", - " \"answers\": [\"b\", \"d\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Read the section on 'sediment availability' from section 2.3.3. from the book and try again.\"}\n", - " }\n", - "\n", - "\n", - "question_data119 = {\n", - " \"name\": \"Q1-19\",\n", - " \"question\": \"Where do we find the largest river deltas? You may select multiple answers.\",\n", - " \"options\": {\n", - " \"a\": \"eastern USA\",\n", - " \"b\": \"western Europe\",\n", - " \"c\": \"western Africa\",\n", - " \"d\": \"south-eastern Asia\",\n", - " \"e\": \"Brazil\",\n", - " \"f\": \"southern Australia\"\n", - " },\n", - " \"answers\": [\"a\", \"d\", \"e\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. What coastal type leads to the largest deltas forming?\"}\n", - " }\n", - "\n", + "q17 = cd.QuestionFactory(questions[\"Q1-17\"]).serve()\n", + "q18 = cd.QuestionFactory(questions[\"Q1-18\"]).serve()\n", + "q19 = cd.QuestionFactory(questions[\"Q1-19\"]).serve()\n", "\n", - "pn.Column(MS(question_data117), \n", - " MS(question_data118), \n", - " MS(question_data119))" + "pn.Column(q17, q18, q19)" ] }, { @@ -779,7 +525,6 @@ }, "outputs": [], "source": [ - "pn.extension()\n", "title_bar = pn.Row(\n", " pn.pane.Markdown(\n", " \"## Exercise 2: Coastal system characterization\",\n", @@ -818,15 +563,15 @@ " xlabel=\"Longitude [deg]\",\n", " )\n", "\n", - " p.opts(frame_width=1000, frame_height=500, tools=['pan', 'wheel_zoom'])\n", + " p.opts(frame_width=1000, frame_height=500, tools=[\"pan\", \"wheel_zoom\"])\n", "\n", " return p\n", "\n", "\n", "app = pn.Column(\n", " # title_bar,\n", - " pn.Row(coastal_systems_slider, align='center'),\n", - " pn.Row(plot_coastal_system, align='center'),\n", + " pn.Row(coastal_systems_slider, align=\"center\"),\n", + " pn.Row(plot_coastal_system, align=\"center\"),\n", ")" ] }, @@ -849,7 +594,7 @@ "# 'inline' if you would like the plot to show in the notebook\n", "# 'pop-out' if you would like the plot to show in a new tab (i.e. seperate window)\n", "\n", - "plot_where = 'pop-out'" + "plot_where = \"pop-out\"" ] }, { @@ -860,13 +605,14 @@ "outputs": [], "source": [ "def show_coastal_system(plot_where):\n", - " if plot_where=='inline':\n", + " if plot_where == \"inline\":\n", " return app\n", - " elif plot_where=='pop-out':\n", + " elif plot_where == \"pop-out\":\n", " app.show()\n", " else:\n", " print(\"please use either 'inline' or 'pop-out' for the 'plot_where' variable\")\n", "\n", + "\n", "show_coastal_system(plot_where);" ] }, @@ -895,213 +641,22 @@ "outputs": [], "source": [ "# Questions 2a\n", - "question_data21 = {\n", - " \"name\": \"Q2-1\",\n", - " \"question\": \"What are the tectonic plate settings for the 'Amazon' and 'Mekong river' systems respectively?\",\n", - " \"options\": {\n", - " \"a\": \"Conservative and divergent\",\n", - " \"b\": \"Conservative and convergent\",\n", - " \"c\": \"Divergent and divergent\",\n", - " \"d\": \"Divergent and convergent\",\n", - " \"e\": \"Convergent and divergent\",\n", - " \"f\": \"Convergent and convergent\"\n", - " },\n", - " \"answer\": \"d\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Use figure 2.6 from the book to see the coastal classification for the mentioned systems. Which are typical plate settings leading to formation of these coastal types?\"}\n", - " }\n", - "\n", - "question_data22 = {\n", - " \"name\": \"Q2-2\",\n", - " \"question\": \"Estimate the order of magnitude of the width of the continental shelf for the 'Redfish pass'.\",\n", - " \"options\": {\n", - " \"a\": \"~0.1 km\",\n", - " \"b\": \"~1 km\",\n", - " \"c\": \"~10 km\",\n", - " \"d\": \"~100 km\",\n", - " \"e\": \"There is no continental shelf\"\n", - " },\n", - " \"answer\": \"d\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Use the sattelite image for the Redfish pass and zoom out a bit. You can see the colors going from light-blue, to dark blue at about -84.8 degrees longitude. Can you estimate/calculate the distance from the system to this boundary?\"} \n", - " }\n", - "\n", - "question_data23 = {\n", - " \"name\": \"Q2-3\",\n", - " \"question\": \"Which is the nearest plate boundary for the 'Senegal delta' system? Select the relevant tectonic plates\",\n", - " \"options\": {\n", - " \"a\": \"North American Plate\",\n", - " \"b\": \"Pacific Plate\",\n", - " \"c\": \"South American Plate\",\n", - " \"d\": \"Antarctic Plate\",\n", - " \"e\": \"Indo-Australian Plate\",\n", - " \"f\": \"African Plate\",\n", - " \"g\": \"Eurasian Plate\",\n", - " \"h\": \"Arabian Plate\",\n", - " },\n", - " \"answers\": [\"c\", \"f\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Use figure 2.2 for an overview of all tectonic plates. Which plate boundary is closest to the Senegal delta? And which plates form that boundary?\"}\n", - " }\n", - "\n", - "question_data24 = {\n", - " \"name\": \"Q2-4\",\n", - " \"question\": \"What is the coastal type for the 'Columbia River' system? And for 'Ganges' system?\",\n", - " \"options\": {\n", - " \"a\": \"Leading edge and leading edge\",\n", - " \"b\": \"Leading edge and trailing edge\",\n", - " \"c\": \"Leading edge and marginal sea\",\n", - " \"d\": \"Trailing edge and leading edge\",\n", - " \"e\": \"Trailing edge and trailing edge\",\n", - " \"f\": \"Trailing edge and marginal sea\",\n", - " },\n", - " \"answer\": \"b\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Use figure 2.6 to get the tectonic-based classification of coasts. You can also use the sattelite images. What can you say about the size of the two deltas?\"} \n", - " }\n", - "\n", + "q20 = cd.QuestionFactory(questions[\"Q1-20\"]).serve()\n", + "q21 = cd.QuestionFactory(questions[\"Q1-21\"]).serve()\n", + "q22 = cd.QuestionFactory(questions[\"Q1-22\"]).serve()\n", + "q23 = cd.QuestionFactory(questions[\"Q1-23\"]).serve()\n", + "q24 = cd.QuestionFactory(questions[\"Q1-24\"]).serve()\n", + "q25 = cd.QuestionFactory(questions[\"Q1-25\"]).serve()\n", + "q26 = cd.QuestionFactory(questions[\"Q1-26\"]).serve()\n", + "q27 = cd.QuestionFactory(questions[\"Q1-27\"]).serve()\n", + "q28 = cd.QuestionFactory(questions[\"Q1-28\"]).serve()\n", + "q29 = cd.QuestionFactory(questions[\"Q1-29\"]).serve()\n", + "q30 = cd.QuestionFactory(questions[\"Q1-30\"]).serve()\n", + "q31 = cd.QuestionFactory(questions[\"Q1-31\"]).serve()\n", + "q32 = cd.QuestionFactory(questions[\"Q1-32\"]).serve()\n", + "q33 = cd.QuestionFactory(questions[\"Q1-33\"]).serve()\n", "\n", - "question_data25 = {\n", - " \"name\": \"Q2-5\",\n", - " \"question\": \"The 'Severn estuary' system classifies as a trailing edge coast. What is its subtype?\",\n", - " \"options\": {\n", - " \"a\": \"Amero-\",\n", - " \"b\": \"Afro-\",\n", - " \"c\": \"neo-\",\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Use figure 2.6 to get the tectonic-based classification of coasts. Do you remember the difference between Amero-, Afro-, and neo-trailing edge coasts?\"} \n", - " }\n", - "\n", - "question_data26 = {\n", - " \"name\": \"Q2-6\",\n", - " \"question\": \"Where does the 'Yangtze river' system get its sediment supply from?\",\n", - " \"options\": {\n", - " \"a\": \"The river transports large amounts of sediment to the coast.\",\n", - " \"b\": \"Alongshore transport due to obliquely incident waves imports most of the sediment into the system.\",\n", - " \"c\": \"Small waves lead to onshore transport of sediment.\",\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Look at the sattelite image, specifically at the color of the water at the delta. Where is this sediment likely coming from?\"} \n", - " }\n", - "\n", - "question_data27 = {\n", - " \"name\": \"Q2-7\",\n", - " \"question\": \"What is the dominant process for the 'Mekong river' system? Choose the best-fitting option.\",\n", - " \"options\": {\n", - " \"a\": \"Wave-dominated\",\n", - " \"b\": \"River-dominated\",\n", - " \"c\": \"Tide-dominated\",\n", - " },\n", - " \"answer\": \"c\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Look at the sattelite image. Compare it with figure 2.42. Which process do you think is most important? Pay attention to the shape of the channels.\"} \n", - " }\n", - "\n", - "question_data28 = {\n", - " \"name\": \"Q2-8\",\n", - " \"question\": \"Look at the 'Wadden sea' system. We observe beaches on the western sides of the islands. Does this demonstrate wave or tidal influence?\",\n", - " \"options\": {\n", - " \"a\": \"Wave influence\",\n", - " \"b\": \"Tide-influcence\",\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Look at the sattelite image. We can clearly observe that beaches are present on the western sides of the islands, but not on the eastern sides. Why is that?\"} \n", - " }\n", - "\n", - "question_data29 = {\n", - " \"name\": \"Q2-9\",\n", - " \"question\": \"Look at the 'Missisipi' system. How can we see that the system is dominated by waves/river/tides, i.e. what characteristics show the dominant process? You can select multiple options.\",\n", - " \"options\": {\n", - " \"a\": \"Long straight channels\",\n", - " \"b\": \"Wide sandy beaches\",\n", - " \"c\": \"Large sediment deposits\",\n", - " \"d\": \"Bird-foot shaped delta\",\n", - " \"e\": \"Multiple parallel channels\",\n", - " \"f\": \"Extensive tidal flats and/or marshes\",\n", - " },\n", - " \"answers\": [\"c\", \"d\", \"f\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Read section 2.7.4 from the book and look at figures 2.42 - 2.49. The 'Missisipi system is river-dominated. Which characteristics fit this classification?\"} \n", - " }\n", - "\n", - "question_data210 = {\n", - " \"name\": \"Q2-10\",\n", - " \"question\": \"For the 'Wadden sea' system, we observe the presence of vegetation. Where is this vegetation mostly located? You can select multiple options.\",\n", - " \"options\": {\n", - " \"a\": \"Tidal channels\",\n", - " \"b\": \"Dune systems\",\n", - " \"c\": \"Beaches\",\n", - " \"d\": \"Intertidal flats\",\n", - " \"e\": \"Fluvial deposits\",\n", - " },\n", - " \"answers\": [\"b\", \"d\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Note that vegetation is unlikely to occur in highly dynamic conditions.\"} \n", - " }\n", - "\n", - "question_data211 = {\n", - " \"name\": \"Q2-11\",\n", - " \"question\": \"Where do you estimate the 'St Michel' system to be positioned in figure 2.44?\",\n", - " \"options\": {\n", - " \"a\": \"Wave-dominated\",\n", - " \"b\": \"River-dominated\",\n", - " \"c\": \"Tide-dominated\",\n", - " },\n", - " \"answer\": \"c\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Have a look at the shape of the estuary. Do you see any characteristic features shaped by waves? Or any large fluvial deposits?\"} \n", - " }\n", - "\n", - "question_data212 = {\n", - " \"name\": \"Q2-12\",\n", - " \"question\": \"Where do you estimate the 'Ebro Delta' system to be positioned in figure 2.44?\",\n", - " \"options\": {\n", - " \"a\": \"Wave-dominated\",\n", - " \"b\": \"River-dominated\",\n", - " \"c\": \"Tide-dominated\",\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Have a look at the surrounding beaches. What kind of influence do these beaches imply?\"} \n", - " }\n", - "\n", - "question_data213 = {\n", - " \"name\": \"Q2-13\",\n", - " \"question\": \"Look at the examples of different coastal systems in figure 2.42 in the book. Then look at the 'Willapa bay' system. Which example number shows the most resemblence? Enter your answer as an integer.\",\n", - " \"answer\": 7,\n", - " \"precision\":0, # number of decimal spaces\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Have a look at the surrounding beaches. What kind of influence do these beaches imply?\"} \n", - " }\n", - "\n", - "question_data214 = {\n", - " \"name\": \"Q2-14\",\n", - " \"question\": \"What is the name of the feature north of the river mouth for the 'Dune de Pilat' system? Type your answer in the box below.\",\n", - " \"answer\": \"spit\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. This feature is called a 'spit'. You will learn more about this in chapter 8 of the book.\"} \n", - " }\n", - "\n", - "\n", - "pn.Column(MC(question_data21), \n", - " MC(question_data22), \n", - " MS(question_data23),\n", - " MC(question_data24), \n", - " MC(question_data25), \n", - " MC(question_data26),\n", - " MC(question_data27), \n", - " MC(question_data28), \n", - " MS(question_data29),\n", - " MS(question_data210), \n", - " MC(question_data211), \n", - " MC(question_data212),\n", - " num(question_data213), \n", - " text(question_data214)\n", - " )" + "pn.Column(q20, q21, q22, q23, q24, q25, q26, q27, q28, q29, q30, q31, q32, q33)" ] }, { @@ -1121,235 +676,22 @@ "outputs": [], "source": [ "# Questions 2b\n", - "question_data215 = {\n", - " \"name\": \"Q2-15\",\n", - " \"question\": \"Which is an example of a highly engineered river-dominated delta?\",\n", - " \"options\": {\n", - " \"a\": \"Columbia river\",\n", - " \"b\": \"Pearl (Zhujiang River estuary)\",\n", - " \"c\": \"Missisipi\",\n", - " \"d\": \"Amazon\"\n", - " },\n", - " \"answer\": \"c\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. River-dominated deltas are characterized by large deltas, possibly extending out into sea. The main channel often branches numerous into non-parallel smaller branches. Highly engineered deltas often aim to linearize the system in order to make it more suitable for e.g. inland shipping.\"} \n", - " }\n", - "\n", - "question_data216 = {\n", - " \"name\": \"Q2-16\",\n", - " \"question\": \"Which is an example of a more natural river-dominated delta?\",\n", - " \"options\": {\n", - " \"a\": \"Wax Lake\",\n", - " \"b\": \"Senegal delta\",\n", - " \"c\": \"Redfish pass\",\n", - " \"d\": \"Yellow river\"\n", - " },\n", - " \"answer\": \"b\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. River-dominated deltas are characterized by large deltas, possibly extending out into sea. The main channel often branches numerous into non-parallel smaller branches. Highly engineered deltas often aim to linearize the system in order to make it more suitable for e.g. inland shipping.\"} \n", - " }\n", - "\n", - "question_data217 = {\n", - " \"name\": \"Q2-17\",\n", - " \"question\": \"What is the difference in scale for the mouths of the 'Lagoa de Albofeira' and 'Amazon' systems?\",\n", - " \"options\": {\n", - " \"a\": \"about equal\",\n", - " \"b\": \"about a factor 10\",\n", - " \"c\": \"about a factor 100\",\n", - " \"d\": \"about a factor 1000\"\n", - " },\n", - " \"answer\": \"c\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. You can use the latitude of the sattelite images to approximate the cross-sections of the system mouths. What are the differences in scales (approximately)?\"} \n", - " }\n", - "\n", - "question_data218 = {\n", - " \"name\": \"Q2-18\",\n", - " \"question\": \"The 'Lagoa de Albofeira' and 'Dune de Pilat' systems are wave-dominated. Which has a higher sediment supply? Why is this?\",\n", - " \"options\": {\n", - " \"a\": \"The Lagoa de Albofeira has a higher sediment supply, because it is more sheltered from waves.\",\n", - " \"b\": \"The Dune de Pilat has a higher sediment supply, because the dune system is larger.\",\n", - " \"c\": \"The Dune de Pilat has a higher sediment supply, because of the the larger catchment area of the river.\",\n", - " \"d\": \"The Dune de Pilat has a higher sediment supply, because of the wider continental shelf.\"\n", - " },\n", - " \"answer\": \"d\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Looking at figure 2.6, it is concluded that the 'Lagoa de Albofeira' is a leading edge coast, whereas the 'Dune de Pilat' is a trailing edge coast. This means that the continental shelf of the 'Dune de Pilat' system is wider. What does this mean for the sediment tranported from inland towards the coast?\"} \n", - " }\n", - "\n", - "question_data219 = {\n", - " \"name\": \"Q2-19\",\n", - " \"question\": \"The difference between large sandy sediment supply and large muddy sediment supply can be seen from (you can select multiple answers):\",\n", - " \"options\": {\n", - " \"a\": \"Water color\",\n", - " \"b\": \"Relative tidal influence\",\n", - " \"c\": \"Tectonic plate setting\",\n", - " \"d\": \"Presence of beaches\"\n", - " },\n", - " \"answers\": [\"a\", \"c\", \"d\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Look at the difference between a sandy system (e.g. Columbia river) and a muddy system (e.g. Yellow river). What differences do you observe.\"} \n", - " }\n", - "\n", - "question_data220 = {\n", - " \"name\": \"Q2-20\",\n", - " \"question\": \"The eastern and western tips of the Dutch and German Wadden Islands are very different beach ridge environments. This can be explained by differences in sediment supply. From which direction is the sediment coming in?\",\n", - " \"options\": {\n", - " \"a\": \"North\",\n", - " \"b\": \"East\",\n", - " \"c\": \"South\",\n", - " \"d\": \"West\"\n", - " },\n", - " \"answer\": \"c\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. The Dutch Deltas are known to receive large amounts of sediment from the West-European rivers. This sediment is one of the main supplies feeding the Dutch coasts. Where is this sediment coming from (relative to the Wadden Islands)?\"} \n", - " }\n", - "\n", - "question_data221 = {\n", - " \"name\": \"Q2-21\",\n", - " \"question\": \"The Dune du Pilat in France is one of the world's largest coastal sand dunes (it is also one of the coolest and you should definitely visit if you get the chance!). It is located on the east side of Arcachon Inlet. Select the reason(s) that it is located on south side of the inlet (and not the north).\",\n", - " \"options\": {\n", - " \"a\": \"The south side is sheltered from waves by a bank.\",\n", - " \"b\": \"Tidal velocities are largest on the south side.\",\n", - " \"c\": \"Most of the sediment from the river is transported in the southern section. (of the river)\",\n", - " \"d\": \"Alongshore transport is directed to the south.\"\n", - " },\n", - " \"answers\": [\"a\", \"d\"],\n", - " \"feedback\": {\"correct\": \"Correct. You will learn more about alongshore transport in chapter 8.\",\n", - " \"incorrect\": \"Incorrect. Have a look at the sattelite images. What is the reason that the dune is able to grow to its current size without being eroded significantly? Also have a look at the features surrounding the dune. Which direction do you think the alongshore transport is directed?\"} \n", - " }\n", - "\n", - "question_data222 = {\n", - " \"name\": \"Q2-22\",\n", - " \"question\": \"The northern Jiangsu coast in China has a limited sediment supply. Select the statement which best explains this.\",\n", - " \"options\": {\n", - " \"a\": \"The river loses all of its sediment in extensive tidal flats before reaching the coast.\",\n", - " \"b\": \"The river delta has a very low discharge, leading to low sediment input.\",\n", - " \"c\": \"The sediment at the northern Jiangsu coast has a high diameter, leading to low transport because of low flow velocities.\",\n", - " \"d\": \"The delta belonging to the northern Jiangsu coast has been heavily engineerd.\"\n", - " },\n", - " \"answer\": \"d\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Have a look at the sattelite imagesfor the northern and southern Jiangsu coast. The southern Jiangsu coast has a larger fluvial sediment input. What could be the difference?\"} \n", - " }\n", - "\n", - "\n", - "question_data223 = {\n", - " \"name\": \"Q2-23\",\n", - " \"question\": \"Both the 'Pearl (Zhujiang River estuary)' and 'St Michel' systems can be classified as estuaries. However, only the 'St Michel' system has salt marshes. Select the best fitting reason for this.\",\n", - " \"options\": {\n", - " \"a\": \"The 'St Michel' system has a higher sediment budget.\",\n", - " \"b\": \"The tidal velocities at the 'Pearl' system are too high.\",\n", - " \"c\": \"The presence of salt marshes in the 'Pearl' system has been diminished due to human interventions.\",\n", - " \"d\": \"The climate at the 'Pearl' system is not right for salt marshes to form.\"\n", - " },\n", - " \"answer\": \"c\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Have a look at the sattelite images for both systems. What is the main difference?\"} \n", - " }\n", - "\n", - "question_data224 = {\n", - " \"name\": \"Q2-24\",\n", - " \"question\": \"The 'Columbia river' system has jetties. How do you expect the inlet to evolve in the future? Select the correct answer: The jetties block alongshore transport leading to erosion/accretion updrift of the jetties, and erosion/accretion downdrift of the jetties.\",\n", - " \"options\": {\n", - " \"a\": \"accretion, accretion\",\n", - " \"b\": \"accretion, erosion\",\n", - " \"c\": \"erosion, accretion\",\n", - " \"d\": \"erosion, erosion\"\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect.\"} \n", - " }\n", - "\n", - "question_data225 = {\n", - " \"name\": \"Q2-25\",\n", - " \"question\": \"Rocky coastal features might constrain a coastal system from evolving a certain way. For which of the following coastal systems is this relevant? You can select multiple answers.\",\n", - " \"options\": {\n", - " \"a\": \"Redfish pass\",\n", - " \"b\": \"Hangzou bay\",\n", - " \"c\": \"Severn estuary\",\n", - " \"d\": \"Ebro Delta\"\n", - " },\n", - " \"answers\": [\"b\"],\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Have a look at the sattelite images for each of the systems. Which systems shows clear rocky features?\"} \n", - " }\n", - "\n", - "question_data226 = {\n", - " \"name\": \"Q2-26\",\n", - " \"question\": \"The Albufeira Lagoon in Portugal opens and closes seasonally. Choose the correct options in the following sentence: In the image shown, the lagoon is open/closed, which is normally the case in winter/summer.\",\n", - " \"options\": {\n", - " \"a\": \"open, winter\",\n", - " \"b\": \"open, summer\",\n", - " \"c\": \"closed, winter\",\n", - " \"d\": \"closed, summer\"\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Think about which circumstances could lead to the lagoon opening up. When would you expect these circumstances to occur?\"} \n", - " }\n", - "\n", - "question_data227 = {\n", - " \"name\": \"Q2-27\",\n", - " \"question\": \"Look at the 'Yangtze river' system. In the past, this was a natural system with multiple channels forming a delta. Nowadays, the area is heavily urbanized and the system has been linearized. Has the tidal influence increased or decreased due to these human interventions?\",\n", - " \"options\": {\n", - " \"a\": \"increased\",\n", - " \"b\": \"decreased\"\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Correct.\",\n", - " \"incorrect\": \"Incorrect. Due to linearization of the system, there is less friction, allowing for higher tidal velocities.\"} \n", - " }\n", - "\n", - "question_data228 = {\n", - " \"name\": \"Q2-28\",\n", - " \"question\": \"Based on these satellite images, which is the most beautiful site?\",\n", - " \"options\": {\n", - " \"a\": \"Lagoa de Albofeira\",\n", - " \"b\": \"Amazon\",\n", - " \"c\": \"Columbia river\",\n", - " \"d\": \"Dune de Pilat\",\n", - " \"e\": \"Ebro Delta\",\n", - " \"f\": \"Ganges\",\n", - " \"g\": \"Hangzou bay\",\n", - " \"h\": \"Jiangsu coast (north)\",\n", - " \"i\": \"Jiangsu coast (south)\",\n", - " \"j\": \"Mekong river\",\n", - " \"k\": \"Missisipi\",\n", - " \"l\": \"Pearl (Zhujiang River estuary)\",\n", - " \"m\": \"Redfish pass\",\n", - " \"n\": \"Sao Fransisco\",\n", - " \"o\": \"Senegal delta\",\n", - " \"p\": \"Severn estuary\",\n", - " \"q\": \"St Michel\",\n", - " \"r\": \"Wadden sea\",\n", - " \"s\": \"Wax Lake\",\n", - " \"t\": \"Willapa bay\",\n", - " \"u\": \"Yangtze river\",\n", - " \"v\": \"Yellow river\",\n", - " },\n", - " \"answer\": \"a\",\n", - " \"feedback\": {\"correct\": \"Good choice! Taking a moment to appreciate the beauty of these natural systems is an important part of your job as coastal engineers.\",\n", - " \"incorrect\": \"Good choice! Taking a moment to appreciate the beauty of these natural systems is an important part of your job as coastal engineers.\"} \n", - " }\n", - "\n", - "\n", - "pn.Column(MC(question_data215), \n", - " MC(question_data216), \n", - " MC(question_data217),\n", - " MC(question_data218), \n", - " MS(question_data219), \n", - " MC(question_data220),\n", - " MS(question_data221), \n", - " MC(question_data222), \n", - " MC(question_data223),\n", - " MC(question_data224), \n", - " MS(question_data225), \n", - " MC(question_data226),\n", - " MC(question_data227), \n", - " MC(question_data228)\n", - " )" + "q34 = cd.QuestionFactory(questions[\"Q1-34\"]).serve()\n", + "q35 = cd.QuestionFactory(questions[\"Q1-35\"]).serve()\n", + "q36 = cd.QuestionFactory(questions[\"Q1-36\"]).serve()\n", + "q37 = cd.QuestionFactory(questions[\"Q1-37\"]).serve()\n", + "q38 = cd.QuestionFactory(questions[\"Q1-38\"]).serve()\n", + "q39 = cd.QuestionFactory(questions[\"Q1-39\"]).serve()\n", + "q40 = cd.QuestionFactory(questions[\"Q1-40\"]).serve()\n", + "q41 = cd.QuestionFactory(questions[\"Q1-41\"]).serve()\n", + "q42 = cd.QuestionFactory(questions[\"Q1-42\"]).serve()\n", + "q43 = cd.QuestionFactory(questions[\"Q1-43\"]).serve()\n", + "q44 = cd.QuestionFactory(questions[\"Q1-44\"]).serve()\n", + "q45 = cd.QuestionFactory(questions[\"Q1-45\"]).serve()\n", + "q46 = cd.QuestionFactory(questions[\"Q1-46\"]).serve()\n", + "q47 = cd.QuestionFactory(questions[\"Q1-47\"]).serve()\n", + "\n", + "pn.Column(q34, q35, q36, q37, q38, q39, q40, q41, q42, q43, q44, q45, q46, q47)" ] }, { diff --git a/notebooks/initialize/1_coastal_classification.ipynb b/notebooks/initialize/1_coastal_classification.ipynb index 344c270..b9cf809 100644 --- a/notebooks/initialize/1_coastal_classification.ipynb +++ b/notebooks/initialize/1_coastal_classification.ipynb @@ -1,5 +1,14 @@ { "cells": [ + { + "cell_type": "markdown", + "id": "403408c8-6f05-4e20-aa8e-6fd33a1be02e", + "metadata": {}, + "source": [ + "## Comment Floris: \n", + "I would only import packages that you use" + ] + }, { "cell_type": "markdown", "id": "297694e4-4215-4f65-aecc-afd612b34310", @@ -18,20 +27,19 @@ "source": [ "from random import shuffle, uniform\n", "\n", + "import holoviews as hv\n", + "import hvplot.pandas\n", "import IPython\n", "import ipywidgets as widgets\n", "import matplotlib.animation as animation\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", + "import pandas as pd\n", + "import panel as pn\n", "from IPython.display import HTML, display\n", "from ipywidgets import interact\n", "from matplotlib.animation import FuncAnimation\n", - "from matplotlib.ticker import MultipleLocator\n", - "\n", - "import pandas as pd\n", - "import hvplot.pandas\n", - "import panel as pn\n", - "import holoviews as hv" + "from matplotlib.ticker import MultipleLocator" ] }, { @@ -42,6 +50,15 @@ "Import other packages in order to let the different question classes run." ] }, + { + "cell_type": "markdown", + "id": "0d61894c-fd9a-4ea8-962e-9e02f6f72abc", + "metadata": {}, + "source": [ + "## Comment Floris: \n", + "I don't think you need the code in the cell below. That coastal_dynamics.hidden is something that Mario used last year for something different (Escofier curves)." + ] + }, { "cell_type": "code", "execution_count": null, @@ -53,8 +70,10 @@ "import sys\n", "\n", "from PIL import Image\n", + "\n", "from coastal_dynamics.hidden import *\n", "\n", + "# NOTE: this is also now outdated because we have the package as pip install\n", "# make functions for src folder importable\n", "cwd = pathlib.Path().resolve()\n", "proj_dir = cwd.parent # this is the notebooks folder\n", @@ -69,6 +88,16 @@ "And import the question types." ] }, + { + "cell_type": "markdown", + "id": "c8fd8e51-ecb3-4899-8f24-5d9d027fdfe3", + "metadata": {}, + "source": [ + "# Comment Floris:\n", + "Please see an example below of how to load questions from the JSON file. For some reason this does not work for me in VS Code yet (I just noticed), is that for you the same? \n", + "\n" + ] + }, { "cell_type": "code", "execution_count": null, @@ -76,10 +105,31 @@ "metadata": {}, "outputs": [], "source": [ - "from coastal_dynamics.questions.multiple_choice import MultipleChoiceQuestion\n", - "from coastal_dynamics.questions.multiple_selection import MultipleSelectionQuestion\n", - "from coastal_dynamics.questions.numeric import NumericQuestion\n", - "from coastal_dynamics.questions.text import TextQuestion" + "import pathlib\n", + "\n", + "import panel as pn\n", + "\n", + "import coastal_dynamics as cd\n", + "from coastal_dynamics.io import load_questions\n", + "\n", + "# Activate the Panel widget to make the visualizations.\n", + "pn.extension()\n", + "\n", + "# You can save your questions here. Please follow same naming conventions as the notebooks. When converting a Python dictionary\n", + "# with the questions as they are ATM to a JSON file, watch out for trailing comma's. Your code error will warn you. But if you\n", + "# cannot read the JSON file with the function, it's probably related to that.\n", + "QUESTION_DIR = pathlib.Path.cwd().parent / \"questions\"\n", + "question_fp = QUESTION_DIR / \"01_coastal_classification.json\"\n", + "\n", + "# The coastal dynamics package now contains a small utilty function to load the questions from a JSON file\n", + "questions = load_questions(question_fp)\n", + "\n", + "# The QuestionFactory can handle the four question types.\n", + "q1 = cd.QuestionFactory(\n", + " questions[\"Q1-1\"]\n", + ").serve() # Here 1-1 refers to notebook 1 question 1.\n", + "q2 = cd.QuestionFactory(questions[\"Q1-2\"]).serve()\n", + "pn.Column(q1, q2)" ] }, { @@ -97,9 +147,8 @@ "metadata": {}, "outputs": [], "source": [ - "from ipywidgets import interact, interactive, fixed, interact_manual\n", - "from ipywidgets import interact\n", - "import ipywidgets as ipw" + "import ipywidgets as ipw\n", + "from ipywidgets import fixed, interact, interact_manual, interactive" ] }, { @@ -112,6 +161,16 @@ "print(\"Packages succesfully loaded\")" ] }, + { + "cell_type": "markdown", + "id": "237e19b0-59d7-490a-a3b2-451665f591f7", + "metadata": {}, + "source": [ + "# Comment Floris: \n", + "\n", + "When you use figures or data, please name them in line with the notebook" + ] + }, { "cell_type": "markdown", "id": "bf87ab4c-e627-4e7e-b2c9-53e264fbc98d", @@ -151,76 +210,13 @@ "pn.extension()" ] }, - { - "cell_type": "markdown", - "id": "94ce6db2-e8b4-445c-ba93-069798a97a80", - "metadata": {}, - "source": [ - "### Question types\n", - "Below the functions for producing the different question types are defined." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2ebca2ef-1b8d-4956-b4d6-c305b9db4248", - "metadata": {}, - "outputs": [], - "source": [ - "def MC(question_data):\n", - " Q = MultipleChoiceQuestion(\n", - " question_name=question_data[\"name\"],\n", - " question_text=question_data[\"question\"],\n", - " question_options=question_data[\"options\"],\n", - " question_answer=question_data[\"answer\"],\n", - " question_feedback=question_data[\"feedback\"]\n", - " )\n", - "\n", - " Q.create_widgets()\n", - " return Q.serve()\n", - "\n", - "def MS(question_data):\n", - " Q = MultipleSelectionQuestion(\n", - " question_name=question_data[\"name\"],\n", - " question_text=question_data[\"question\"],\n", - " question_options=question_data[\"options\"],\n", - " question_answers=question_data[\"answers\"],\n", - " question_feedback=question_data[\"feedback\"]\n", - " )\n", - " Q.create_widgets()\n", - " return Q.serve()\n", - "\n", - "def num(question_data):\n", - " Q = NumericQuestion(\n", - " question_name=question_data[\"name\"],\n", - " question_text=question_data[\"question\"],\n", - " question_answer=question_data[\"answer\"],\n", - " question_feedback=question_data[\"feedback\"],\n", - " precision=question_data[\"precision\"]\n", - " )\n", - "\n", - " Q.create_widgets()\n", - " return Q.serve()\n", - "\n", - "def text(question_data):\n", - " Q = TextQuestion(\n", - " question_name=question_data[\"name\"],\n", - " question_text=question_data[\"question\"],\n", - " question_answer=question_data[\"answer\"],\n", - " question_feedback=question_data[\"feedback\"],\n", - " )\n", - "\n", - " Q.create_widgets()\n", - " return Q.serve()" - ] - }, { "cell_type": "markdown", "id": "d5a7bcbf-1cc2-4760-91c5-537ec76bfe3d", "metadata": {}, "source": [ - "### Question data & functions\n", - "Below the question data is defined (seperated by section). The questions where students are asked to reproduce plots contain functions, which are also defined below. The question data and functions are defined in the same order as they are asked in the notebook." + "### Question functions\n", + "The questions where students are asked to reproduce plots contain functions are defined below. The functions are defined in the same order as they are asked in the notebook." ] }, { @@ -268,13 +264,13 @@ "metadata": {}, "outputs": [], "source": [ - "print(\"Questions succesfully loaded\")" + "print(\"Functions succesfully loaded\")" ] } ], "metadata": { "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "jl-full", "language": "python", "name": "python3" }, diff --git a/notebooks/questions/01_coastal_classification.json b/notebooks/questions/01_coastal_classification.json deleted file mode 100644 index 181cf88..0000000 --- a/notebooks/questions/01_coastal_classification.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "Q1-1": { - "name": "Q1-1", - "type": "multiple_choice", - "question": "At what depth do earthquakes along divergent boundaries generally occur?", - "options": { - "a": "less than 33 km", - "b": "between 33 km and 74 km", - "c": "between 74 km and 140 km", - "d": "more than 140 km " - }, - "answer": "a", - "feedback": { - "correct": "Correct, earthquakes at diverging boundaries typically occur at shallower depths", - "incorrect": "Incorrect. Note that at diverging boundaries the tectonic plates move away from each other. Magma wells up to (relatively) shallow depths in order to fill the gap. This may cause earthquakes. Where are these earthquakes likeliest to occur?" - } - }, - "Q1-2": { - "name": "Q1-2", - "type": "multiple_selection", - "question": "Where do earthquakes with a depth > 250 km typically occur? Multiple answers may be correct.", - "options": { - "a": "wherever two oceanic plates converge", - "b": "at a boundary between an oceanic and continental plate", - "c": "at island arcs", - "d": "wherever two oceanic plates diverge" - }, - "answers": [ - "a", - "c" - ], - "feedback": { - "correct": "Correct, indeed very deep earthquakes occur mostly when two ocaenic plates converge, or at an island arc.", - "incorrect": "Incorrect. Deep earthquakes occur due to deep processes such as subduction. Due to subduction, island arcs may form (see Figure 2.9 in the book). Where does subduction typically occur?" - } - } -} \ No newline at end of file diff --git a/notebooks/questions/1_coastal_classification.json b/notebooks/questions/1_coastal_classification.json new file mode 100644 index 0000000..783fc3e --- /dev/null +++ b/notebooks/questions/1_coastal_classification.json @@ -0,0 +1,785 @@ +{ + "Q1-1": { + "name": "Q1-1", + "type": "multiple_choice", + "question": "At what depth do earthquakes along divergent boundaries generally occur?", + "options": { + "a": "less than 33 km", + "b": "between 33 km and 74 km", + "c": "between 74 km and 140 km", + "d": "more than 140 km " + }, + "answer": "a", + "feedback": { + "correct": "Correct, earthquakes at diverging boundaries typically occur at shallower depths", + "incorrect": "Incorrect. Note that at diverging boundaries the tectonic plates move away from each other. Magma wells up to (relatively) shallow depths in order to fill the gap. This may cause earthquakes. Where are these earthquakes likeliest to occur?" + } + }, + "Q1-2": { + "name": "Q1-2", + "type": "multiple_selection", + "question": "Where do earthquakes with a depth > 250 km typically occur? Multiple answers may be correct.", + "options": { + "a": "wherever two oceanic plates converge", + "b": "at a boundary between an oceanic and continental plate", + "c": "at island arcs", + "d": "wherever two oceanic plates diverge" + }, + "answers": [ + "a", + "c" + ], + "feedback": { + "correct": "Correct, indeed very deep earthquakes occur mostly when two ocaenic plates converge, or at an island arc.", + "incorrect": "Incorrect. Deep earthquakes occur due to deep processes such as subduction. Due to subduction, island arcs may form (see Figure 2.9 in the book). Where does subduction typically occur?" + } + }, + "Q1-3": { + "name": "Q1-3", + "type": "multiple_choice", + "question": "How should one set the depth slider (approximately) to capture the majority of the earthquakes at convergent boundaries?", + "options": { + "a": "0 - 33 km", + "b": "33 - 250 km", + "c": "250 - 350 km", + "d": "350 - 650 km" + }, + "answer": "b", + "feedback": { + "correct": "Correct, indeed most earthquakes at convergent boundaries occur between 33 km and 250 km depth.", + "incorrect": "Incorrect. Shallow earthquakes occur mostly at divergent boundaries (see also question 1). Earthquakes at a depth greater than 250 km do indeed occur at converging boundaries, but this range excludes a lot of earthquakes which do in fact occur at converging boundaries." + } + }, + "Q1-4": { + "name": "Q1-4", + "type": "multiple_selection", + "question": "How can one distinguish convergent boundaries from divergent boundaries using the earthquake information? Multiple answers may be correct.", + "options": { + "a": "width of earthquake zone", + "b": "magnitude of earthquakes", + "c": "earthquake depth", + "d": "frequency of earthquakes" + }, + "answers": [ "a", "c", "d" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Try to use the sliders in the figure to find out at what depth earthquakes typically occur for different boundary types. By adjusting the date range, you can also check the frequency of earthquakes for different boundaries. Finally, look at the width of the earthquake zone and the magnitude of earthquakes for different types of boundaries. What differences do you observe?" + } + }, + "Q1-5": { + "name": "Q1-5", + "type": "multiple_selection", + "question": "What are the two most important inherited aspects of the process of plate tectonics with respect to coastal features?", + "options": { + "a": "climate of the main land", + "b": "latitude", + "c": "continental shelf width", + "d": "sediment supply" + }, + "answers": [ "c", "d" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Read section 2.3.3. from the book, and try the question again." + } + }, + "Q1-6": { + "name": "Q1-6", + "type": "multiple_choice", + "question": "Compare the shelf width of the Gold Coast with other coasts around Australia. Would you consider the continental shelf width to be relatively large or small for the Gold Coast?", + "options": { + "a": "large", + "b": "small" + }, + "answer": "b", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Compare the Gold Coast with the northern, southern, and western Australian coast. The lighter blue color in the figure shows the shallower part of the ocean, i.e. the continental shelf." + } + }, + "Q1-7": { + "name": "Q1-7", + "type": "multiple_choice", + "question": "Is there a tectonic boundary close to the Gold Coast? If so, what is its type?", + "options": { + "a": "divergent", + "b": "convergent", + "c": "neither", + "d": "no close boundary" + }, + "answer": "b", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. The closest boundary lies approximately beneath New Zealand. Use Figure 2.6 from the book to see the type boundary." + } + }, + "Q1-8": { + "name": "Q1-8", + "type": "multiple_choice", + "question": "Is there a tectonic boundary on the other side of the continent? If so, what is its type?", + "options": { + "a": "divergent", + "b": "convergent", + "c": "neither", + "d": "no boundary" + }, + "answer": "a", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. The closest boundary lies in the southern Indian Ocean. Use Figure 2.6 from the book to see the type boundary." + } + }, + "Q1-9": { + "name": "Q1-9", + "type": "multiple_choice", + "question": "Is the Gold Coast protected by an island arc?", + "options": { + "a": "yes", + "b": "no" + }, + "answer": "a", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Have a look at Figure 2.9 in the book, and the text below it. The Gold Coast is protected from the open ocean by New Zealand." + } + }, + "Q1-10": { + "name": "Q1-10", + "type": "multiple_selection", + "question": "What are the typical characteristics of a leading edge coast? You may select multiple answers.", + "options": { + "a": "found at convergent tectonic boundary", + "b": "found bordering ocean with diverging tectonic boundary", + "c": "has three sub-types: neo, afro, and amero", + "d": "coarse sediment", + "e": "relatively deep earthquakes", + "f": "frequent earthquakes", + "g": "protected by landmass such as island arc", + "h": "may contain large river deltas", + "i": "found far away from tectonic boundaries", + "j": "found close to tectonic boundaries", + "k": "more volcanic activity", + "l": "wide continental shelf" + }, + "answers": [ "a", "d", "e", "f", "j", "k" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Read section 2.3.2. and try again." + } + }, + "Q1-11": { + "name": "Q1-11", + "type": "multiple_selection", + "question": "What are the typical characteristics of a trailing edge coast? You may select multiple answers.", + "options": { + "a": "found at convergent tectonic boundary", + "b": "found bordering ocean with diverging tectonic boundary", + "c": "has three sub-types: neo, afro, and amero", + "d": "coarse sediment", + "e": "relatively deep earthquakes", + "f": "frequent earthquakes", + "g": "protected by landmass such as island arc", + "h": "may contain large river deltas", + "i": "found far away from tectonic boundaries", + "j": "found close to tectonic boundaries", + "k": "more volcanic activity", + "l": "wide continental shelf" + }, + "answers": [ "b", "c", "h", "i", "l" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Read section 2.3.2. and try again." + } + }, + "Q1-12": { + "name": "Q1-12", + "type": "multiple_selection", + "question": "What are the typical characteristics of a marginal sea coast? You may select multiple answers.", + "options": { + "a": "found at convergent tectonic boundary", + "b": "found bordering ocean with diverging tectonic boundary", + "c": "has three sub-types: neo, afro, and amero", + "d": "coarse sediment", + "e": "relatively deep earthquakes", + "f": "frequent earthquakes", + "g": "protected by landmass such as island arc", + "h": "may contain large river deltas", + "i": "found far away from tectonic boundaries", + "j": "found close to tectonic boundaries", + "k": "more volcanic activity", + "l": "wide continental shelf" + }, + "answers": [ "a", "g", "h", "j", "l" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Read section 2.3.2. and try again." + } + }, + "Q1-13": { + "name": "Q1-13", + "type": "multiple_choice", + "question": "To what class of coasts does the coast at Wilmington (North Carolina, USA) belong?", + "options": { + "a": "leading edge", + "b": "trailing edge", + "c": "marginal sea" + }, + "answer": "b", + "feedback": { + "correct": "Correct, this is indeed a trailing edge coast. Can you tell which sub-type of trailing edge coast it is?", + "incorrect": "Incorrect. The coast is not close to a converging boundary, nor is it protected by an island arc. The East American coast is relatively flat, and is home to large river deltas. What type of coast do these characteristics all suggest?" + } + }, + "Q1-14": { + "name": "Q1-14", + "type": "multiple_choice", + "question": "To what class of coasts does the coast at Shanghai (China) belong?", + "options": { + "a": "leading edge", + "b": "trailing edge", + "c": "marginal sea" + }, + "answer": "c", + "feedback": { + "correct": "Correct, this is indeed a marginal sea coast, because though close to a converging boundary it is protected (by islands)?", + "incorrect": "Incorrect. The coast is close to a converging boundary, and it is protected by an island arc. Additionally, large river deltas are present (the Yangtze River delta for Shanghai specifically). What type of coast do these characteristics suggest?" + } + }, + "Q1-15": { + "name": "Q1-15", + "type": "multiple_choice", + "question": "To what class of coasts does the coast at Maputo (Mozambique) belong?", + "options": { + "a": "leading edge", + "b": "trailing edge", + "c": "marginal sea" + }, + "answer": "b", + "feedback": { + "correct": "Correct, this is indeed a trailing edge coast. It is not close to a converging boundary so even though it is protected by an island (Madagascar), it is still a trailing edge coast.", + "incorrect": "Incorrect. The coast is not close to a converging boundary, which suggests what type of coast?" + } + }, + "Q1-16": { + "name": "Q1-16", + "type": "multiple_choice", + "question": "To what class of coasts does the coast at Lima (Peru) belong?", + "options": { + "a": "leading edge", + "b": "trailing edge", + "c": "marginal sea" + }, + "answer": "a", + "feedback": { + "correct": "Correct, this is indeed a leading edge coast. It is close to a converging boundary and not sheltered by a landmass.", + "incorrect": "Incorrect. The coast is close to a converging boundary and not sheltered by a landmass, which suggests what type of coast?" + } + }, + "Q1-17": { + "name": "Q1-17", + "type": "multiple_selection", + "question": "What are the main causes for these differences in sediment supply? You may select multiple answers.", + "options": { + "a": "topography", + "b": "soil type", + "c": "climate", + "d": "vegetation type" + }, + "answers": [ "a", "c" ], + "feedback": { + "correct": "Correct, topography and climate are indeed the main factors determining the sediment supply.", + "incorrect": "Incorrect. Read the section on 'sediment availability' from section 2.3.3. from the book and try again." + } + }, + "Q1-18": { + "name": "Q1-18", + "type": "multiple_selection", + "question": "Amero-trailing edge coasts receive less/more (choose) sediment from rivers compared to Afro-trailing edge coasts. The deltas formed at Amero-trailing edge coasts are therefore smaller/larger (choose) when compared to Afro-trailing edge coasts.", + "options": { + "a": "less", + "b": "more", + "c": "smaller", + "d": "larger" + }, + "answers": [ "b", "d" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Read the section on 'sediment availability' from section 2.3.3. from the book and try again." + } + }, + "Q1-19": { + "name": "Q1-19", + "type": "multiple_selection", + "question": "Where do we find the largest river deltas? You may select multiple answers.", + "options": { + "a": "eastern USA", + "b": "western Europe", + "c": "western Africa", + "d": "south-eastern Asia", + "e": "Brazil", + "f": "southern Australia" + }, + "answers": [ "a", "d", "e" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. What coastal type leads to the largest deltas forming?" + } + }, + "Q1-20": { + "name": "Q1-20", + "type": "multiple_choice", + "question": "What are the tectonic plate settings for the 'Amazon' and 'Mekong river' systems respectively?", + "options": { + "a": "Conservative and divergent", + "b": "Conservative and convergent", + "c": "Divergent and divergent", + "d": "Divergent and convergent", + "e": "Convergent and divergent", + "f": "Convergent and convergent" + }, + "answer": "d", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Use figure 2.6 from the book to see the coastal classification for the mentioned systems. Which are typical plate settings leading to formation of these coastal types?" + } + }, + "Q1-21": { + "name": "Q1-21", + "type": "multiple_choice", + "question": "Estimate the order of magnitude of the width of the continental shelf for the 'Redfish pass'.", + "options": { + "a": "~0.1 km", + "b": "~1 km", + "c": "~10 km", + "d": "~100 km", + "e": "There is no continental shelf" + }, + "answer": "d", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Use the sattelite image for the Redfish pass and zoom out a bit. You can see the colors going from light-blue, to dark blue at about -84.8 degrees longitude. Can you estimate/calculate the distance from the system to this boundary?" + } + }, + "Q1-22": { + "name": "Q1-22", + "type": "multiple_selection", + "question": "Which is the nearest plate boundary for the 'Senegal delta' system? Select the relevant tectonic plates", + "options": { + "a": "North American Plate", + "b": "Pacific Plate", + "c": "South American Plate", + "d": "Antarctic Plate", + "e": "Indo-Australian Plate", + "f": "African Plate", + "g": "Eurasian Plate", + "h": "Arabian Plate" + }, + "answers": [ "c", "f" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Use figure 2.2 for an overview of all tectonic plates. Which plate boundary is closest to the Senegal delta? And which plates form that boundary?" + } + }, + "Q1-23": { + "name": "Q1-23", + "type": "multiple_choice", + "question": "What is the coastal type for the 'Columbia River' system? And for 'Ganges' system?", + "options": { + "a": "Leading edge and leading edge", + "b": "Leading edge and trailing edge", + "c": "Leading edge and marginal sea", + "d": "Trailing edge and leading edge", + "e": "Trailing edge and trailing edge", + "f": "Trailing edge and marginal sea" + }, + "answer": "b", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Use figure 2.6 to get the tectonic-based classification of coasts. You can also use the sattelite images. What can you say about the size of the two deltas?" + } + }, + "Q1-24": { + "name": "Q1-24", + "type": "multiple_choice", + "question": "The 'Severn estuary' system classifies as a trailing edge coast. What is its subtype?", + "options": { + "a": "Amero-", + "b": "Afro-", + "c": "neo-" + }, + "answer": "a", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Use figure 2.6 to get the tectonic-based classification of coasts. Do you remember the difference between Amero-, Afro-, and neo-trailing edge coasts?" + } + }, + "Q1-25": { + "name": "Q1-25", + "type": "multiple_choice", + "question": "Where does the 'Yangtze river' system get its sediment supply from?", + "options": { + "a": "The river transports large amounts of sediment to the coast.", + "b": "Alongshore transport due to obliquely incident waves imports most of the sediment into the system.", + "c": "Small waves lead to onshore transport of sediment." + }, + "answer": "a", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Look at the sattelite image, specifically at the color of the water at the delta. Where is this sediment likely coming from?" + } + }, + "Q1-26": { + "name": "Q1-26", + "type": "multiple_choice", + "question": "What is the dominant process for the 'Mekong river' system? Choose the best-fitting option.", + "options": { + "a": "Wave-dominated", + "b": "River-dominated", + "c": "Tide-dominated" + }, + "answer": "c", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Look at the sattelite image. Compare it with figure 2.42. Which process do you think is most important? Pay attention to the shape of the channels." + } + }, + "Q1-27": { + "name": "Q1-27", + "type": "multiple_choice", + "question": "Look at the 'Wadden sea' system. We observe beaches on the western sides of the islands. Does this demonstrate wave or tidal influence?", + "options": { + "a": "Wave influence", + "b": "Tide-influcence" + }, + "answer": "a", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Look at the sattelite image. We can clearly observe that beaches are present on the western sides of the islands, but not on the eastern sides. Why is that?" + } + }, + "Q1-28": { + "name": "Q1-28", + "type": "multiple_selection", + "question": "Look at the 'Missisipi' system. How can we see that the system is dominated by waves/river/tides, i.e. what characteristics show the dominant process? You can select multiple options.", + "options": { + "a": "Long straight channels", + "b": "Wide sandy beaches", + "c": "Large sediment deposits", + "d": "Bird-foot shaped delta", + "e": "Multiple parallel channels", + "f": "Extensive tidal flats and/or marshes" + }, + "answers": [ "c", "d", "f" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Read section 2.7.4 from the book and look at figures 2.42 - 2.49. The 'Missisipi system is river-dominated. Which characteristics fit this classification?" + } + }, + "Q1-29": { + "name": "Q1-29", + "type": "multiple_selection", + "question": "For the 'Wadden sea' system, we observe the presence of vegetation. Where is this vegetation mostly located? You can select multiple options.", + "options": { + "a": "Tidal channels", + "b": "Dune systems", + "c": "Beaches", + "d": "Intertidal flats", + "e": "Fluvial deposits" + }, + "answers": [ "b", "d" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Note that vegetation is unlikely to occur in highly dynamic conditions." + } + }, + "Q1-30": { + "name": "Q1-30", + "type": "multiple_choice", + "question": "Where do you estimate the 'St Michel' system to be positioned in figure 2.44?", + "options": { + "a": "Wave-dominated", + "b": "River-dominated", + "c": "Tide-dominated" + }, + "answer": "c", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Have a look at the shape of the estuary. Do you see any characteristic features shaped by waves? Or any large fluvial deposits?" + } + }, + "Q1-31": { + "name": "Q1-31", + "type": "multiple_choice", + "question": "Where do you estimate the 'Ebro Delta' system to be positioned in figure 2.44?", + "options": { + "a": "Wave-dominated", + "b": "River-dominated", + "c": "Tide-dominated" + }, + "answer": "a", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Have a look at the surrounding beaches. What kind of influence do these beaches imply?" + } + }, + "Q1-32": { + "name": "Q1-32", + "type": "numeric", + "question": "Look at the examples of different coastal systems in figure 2.42 in the book. Then look at the 'Willapa bay' system. Which example number shows the most resemblence? Enter your answer as an integer.", + "answer": 7, + "precision": 0, + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Have a look at the surrounding beaches. What kind of influence do these beaches imply?" + } + }, + "Q1-33": { + "name": "Q1-33", + "type": "text", + "question": "What is the name of the feature north of the river mouth for the 'Dune de Pilat' system? Type your answer in the box below.", + "answer": "spit", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. This feature is called a 'spit'. You will learn more about this in chapter 8 of the book." + } + }, + "Q1-34": { + "name": "Q1-34", + "type": "multiple_choice", + "question": "Which is an example of a highly engineered river-dominated delta?", + "options": { + "a": "Columbia river", + "b": "Pearl (Zhujiang River estuary)", + "c": "Missisipi", + "d": "Amazon" + }, + "answer": "c", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. River-dominated deltas are characterized by large deltas, possibly extending out into sea. The main channel often branches numerous into non-parallel smaller branches. Highly engineered deltas often aim to linearize the system in order to make it more suitable for e.g. inland shipping." + } + }, + "Q1-35": { + "name": "Q1-35", + "type": "multiple_choice", + "question": "Which is an example of a more natural river-dominated delta?", + "options": { + "a": "Wax Lake", + "b": "Senegal delta", + "c": "Redfish pass", + "d": "Yellow river" + }, + "answer": "b", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. River-dominated deltas are characterized by large deltas, possibly extending out into sea. The main channel often branches numerous into non-parallel smaller branches. Highly engineered deltas often aim to linearize the system in order to make it more suitable for e.g. inland shipping." + } + }, + "Q1-36": { + "name": "Q1-36", + "type": "multiple_choice", + "question": "What is the difference in scale for the mouths of the 'Lagoa de Albofeira' and 'Amazon' systems?", + "options": { + "a": "about equal", + "b": "about a factor 10", + "c": "about a factor 100", + "d": "about a factor 1000" + }, + "answer": "c", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. You can use the latitude of the sattelite images to approximate the cross-sections of the system mouths. What are the differences in scales (approximately)?" + } + }, + "Q1-37": { + "name": "Q1-37", + "type": "multiple_choice", + "question": "The 'Lagoa de Albofeira' and 'Dune de Pilat' systems are wave-dominated. Which has a higher sediment supply? Why is this?", + "options": { + "a": "The Lagoa de Albofeira has a higher sediment supply, because it is more sheltered from waves.", + "b": "The Dune de Pilat has a higher sediment supply, because the dune system is larger.", + "c": "The Dune de Pilat has a higher sediment supply, because of the the larger catchment area of the river.", + "d": "The Dune de Pilat has a higher sediment supply, because of the wider continental shelf." + }, + "answer": "d", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Looking at figure 2.6, it is concluded that the 'Lagoa de Albofeira' is a leading edge coast, whereas the 'Dune de Pilat' is a trailing edge coast. This means that the continental shelf of the 'Dune de Pilat' system is wider. What does this mean for the sediment tranported from inland towards the coast?" + } + }, + "Q1-38": { + "name": "Q1-38", + "type": "multiple_selection", + "question": "The difference between large sandy sediment supply and large muddy sediment supply can be seen from (you can select multiple answers):", + "options": { + "a": "Water color", + "b": "Relative tidal influence", + "c": "Tectonic plate setting", + "d": "Presence of beaches" + }, + "answers": [ "a", "c", "d" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Look at the difference between a sandy system (e.g. Columbia river) and a muddy system (e.g. Yellow river). What differences do you observe." + } + }, + "Q1-39": { + "name": "Q1-39", + "type": "multiple_choice", + "question": "The eastern and western tips of the Dutch and German Wadden Islands are very different beach ridge environments. This can be explained by differences in sediment supply. From which direction is the sediment coming in?", + "options": { + "a": "North", + "b": "East", + "c": "South", + "d": "West" + }, + "answer": "c", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. The Dutch Deltas are known to receive large amounts of sediment from the West-European rivers. This sediment is one of the main supplies feeding the Dutch coasts. Where is this sediment coming from (relative to the Wadden Islands)?" + } + }, + "Q1-40": { + "name": "Q1-40", + "type": "multiple_selection", + "question": "The Dune du Pilat in France is one of the world's largest coastal sand dunes (it is also one of the coolest and you should definitely visit if you get the chance!). It is located on the east side of Arcachon Inlet. Select the reason(s) that it is located on south side of the inlet (and not the north).", + "options": { + "a": "The south side is sheltered from waves by a bank.", + "b": "Tidal velocities are largest on the south side.", + "c": "Most of the sediment from the river is transported in the southern section. (of the river)", + "d": "Alongshore transport is directed to the south." + }, + "answers": [ "a", "d" ], + "feedback": { + "correct": "Correct. You will learn more about alongshore transport in chapter 8.", + "incorrect": "Incorrect. Have a look at the sattelite images. What is the reason that the dune is able to grow to its current size without being eroded significantly? Also have a look at the features surrounding the dune. Which direction do you think the alongshore transport is directed?" + } + }, + "Q1-41": { + "name": "Q1-41", + "type": "multiple_choice", + "question": "The northern Jiangsu coast in China has a limited sediment supply. Select the statement which best explains this.", + "options": { + "a": "The river loses all of its sediment in extensive tidal flats before reaching the coast.", + "b": "The river delta has a very low discharge, leading to low sediment input.", + "c": "The sediment at the northern Jiangsu coast has a high diameter, leading to low transport because of low flow velocities.", + "d": "The delta belonging to the northern Jiangsu coast has been heavily engineerd." + }, + "answer": "d", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Have a look at the sattelite imagesfor the northern and southern Jiangsu coast. The southern Jiangsu coast has a larger fluvial sediment input. What could be the difference?" + } + }, + "Q1-42": { + "name": "Q1-42", + "type": "multiple_choice", + "question": "Both the 'Pearl (Zhujiang River estuary)' and 'St Michel' systems can be classified as estuaries. However, only the 'St Michel' system has salt marshes. Select the best fitting reason for this.", + "options": { + "a": "The 'St Michel' system has a higher sediment budget.", + "b": "The tidal velocities at the 'Pearl' system are too high.", + "c": "The presence of salt marshes in the 'Pearl' system has been diminished due to human interventions.", + "d": "The climate at the 'Pearl' system is not right for salt marshes to form." + }, + "answer": "c", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Have a look at the sattelite images for both systems. What is the main difference?" + } + }, + "Q1-43": { + "name": "Q1-43", + "type": "multiple_choice", + "question": "The 'Columbia river' system has jetties. How do you expect the inlet to evolve in the future? Select the correct answer: The jetties block alongshore transport leading to erosion/accretion updrift of the jetties, and erosion/accretion downdrift of the jetties.", + "options": { + "a": "accretion, accretion", + "b": "accretion, erosion", + "c": "erosion, accretion", + "d": "erosion, erosion" + }, + "answer": "a", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect." + } + }, + "Q1-44": { + "name": "Q1-44", + "type": "multiple_selection", + "question": "Rocky coastal features might constrain a coastal system from evolving a certain way. For which of the following coastal systems is this relevant? You can select multiple answers.", + "options": { + "a": "Redfish pass", + "b": "Hangzou bay", + "c": "Severn estuary", + "d": "Ebro Delta" + }, + "answers": [ "b" ], + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Have a look at the sattelite images for each of the systems. Which systems shows clear rocky features?" + } + }, + "Q1-45": { + "name": "Q1-45", + "type": "multiple_choice", + "question": "The Albufeira Lagoon in Portugal opens and closes seasonally. Choose the correct options in the following sentence: In the image shown, the lagoon is open/closed, which is normally the case in winter/summer.", + "options": { + "a": "open, winter", + "b": "open, summer", + "c": "closed, winter", + "d": "closed, summer" + }, + "answer": "a", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Think about which circumstances could lead to the lagoon opening up. When would you expect these circumstances to occur?" + } + }, + "Q1-46": { + "name": "Q1-46", + "type": "multiple_choice", + "question": "Look at the 'Yangtze river' system. In the past, this was a natural system with multiple channels forming a delta. Nowadays, the area is heavily urbanized and the system has been linearized. Has the tidal influence increased or decreased due to these human interventions?", + "options": { + "a": "increased", + "b": "decreased" + }, + "answer": "a", + "feedback": { + "correct": "Correct.", + "incorrect": "Incorrect. Due to linearization of the system, there is less friction, allowing for higher tidal velocities." + } + }, + "Q1-47": { + "name": "Q1-47", + "type": "multiple_choice", + "question": "Based on these satellite images, which is the most beautiful site?", + "options": { + "a": "Lagoa de Albofeira", + "b": "Amazon", + "c": "Columbia river", + "d": "Dune de Pilat", + "e": "Ebro Delta", + "f": "Ganges", + "g": "Hangzou bay", + "h": "Jiangsu coast (north)", + "i": "Jiangsu coast (south)", + "j": "Mekong river", + "k": "Missisipi", + "l": "Pearl (Zhujiang River estuary)", + "m": "Redfish pass", + "n": "Sao Fransisco", + "o": "Senegal delta", + "p": "Severn estuary", + "q": "St Michel", + "r": "Wadden sea", + "s": "Wax Lake", + "t": "Willapa bay", + "u": "Yangtze river", + "v": "Yellow river" + }, + "answer": "a", + "feedback": { + "correct": "Good choice! Taking a moment to appreciate the beauty of these natural systems is an important part of your job as coastal engineers.", + "incorrect": "Good choice! Taking a moment to appreciate the beauty of these natural systems is an important part of your job as coastal engineers." + } + } +} \ No newline at end of file