Skip to content

Commit

Permalink
fix build (FlorisCalkoen#70)
Browse files Browse the repository at this point in the history
Co-authored-by: floriscalkoen <[email protected]>
  • Loading branch information
FlorisCalkoen and floriscalkoen authored Feb 16, 2024
1 parent 1d3a32d commit b8f6688
Showing 1 changed file with 17 additions and 37 deletions.
54 changes: 17 additions & 37 deletions notebooks/1_coastal_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@
"id": "50f41e8e",
"metadata": {},
"source": [
"We also get the bathymetric contours for a water depth of -200m, which we will use as a proxy to find the boundary of the continental shelf."
"### Isobaths\n",
"\n",
"We also get the bathymetric contours for a water depth of -200m, which we will use as a proxy to find the boundary of the continental shelf. Because we want to maintain interactive plots, all shorter isobaths are dropped. Computing lengths is a metric operation, so the data has to be reprojected in a planar projection first. \n"
]
},
{
Expand All @@ -146,21 +148,8 @@
" known_hash=\"2b25adb7d3923e3969f6fb0c1f53e5e5850acd3bf6a3468722f0a1434a395ae5\",\n",
")\n",
"\n",
"data200 = gpd.read_file(isobath_fp)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "197d1c76",
"metadata": {},
"outputs": [],
"source": [
"# To make plotting a bit faster, we only use isobaths longer than a certain length. We therefore first\n",
"# have to project to a new coordinate system to get the lengths of the isobaths, and use that as a\n",
"# mask to select the isobaths we want to keep\n",
"\n",
"data200[\"length\"] = data200.to_crs(\"EPSG:3857\").geometry.length\n",
"data200 = gpd.read_file(isobath_fp)\n",
"data200[\"length\"] = data200.to_crs(\"EPSG:3857\").geometry.length \n",
"data200 = data200[data200[\"length\"] > 5 * 10**6]"
]
},
Expand Down Expand Up @@ -346,6 +335,7 @@
"metadata": {},
"source": [
"### Plate tectonics\n",
"\n",
"Earthquake data support one of the most fundamental processes in the geology: plate tectonics. Although plate tectonics is a relatively slow process that acts on the geological time scale, it has had an enormous impact on the formation of coastlines and determines the broadest features of the coast.\n",
"\n",
"Run the code cell below to access the questions that you can answering using the earthquake dashboard. For convenience, you may open the Panel dashboard in a separate browser tab to view the questions and plot side by side."
Expand Down Expand Up @@ -373,7 +363,7 @@
"source": [
"#### Australian Gold Coast\n",
"\n",
"For the upcoming questions, consider the east Australian \"Gold Coast\".For the upcoming questions, consider the east Australian \"Gold Coast\", which is located around the easternmost point of Australia (south of Brisbane)."
"For the upcoming question, consider the east Australian \"Gold Coast\", which is located around the easternmost point of Australia (south of Brisbane)."
]
},
{
Expand All @@ -393,7 +383,7 @@
"id": "f60a5c37-420e-4507-a8f1-ccb6a6e159d7",
"metadata": {},
"source": [
"#### Tectonic influence on coasts\n",
"### Tectonic influence on coasts\n",
"In 1971 Inman, D. L. & Nordstrom, C. E. used plate tectonics to classify the coast. They distinguish three main types of coasts: leading edge, trailing edge and marginal sea. In the questions below, match the correct characteristics to each class."
]
},
Expand All @@ -418,7 +408,7 @@
"id": "3060d2bc-ce5a-468a-8219-d41a5b6c602f",
"metadata": {},
"source": [
"#### The influence of sediment supply\n",
"### The influence of sediment supply\n",
"\n",
"Inman, D. L. & Nordstrom (1971) further distinguish Afro-trailing-edge coasts and Amero-trailing-edge coasts based on differences in sediment supplies."
]
Expand Down Expand Up @@ -611,30 +601,20 @@
"q14 = cd.QuestionFactory(questions[\"Q1-14\"]).serve()\n",
"q15 = cd.QuestionFactory(questions[\"Q1-15\"]).serve()\n",
"q16 = cd.QuestionFactory(questions[\"Q1-16\"]).serve()\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(q13, q14, q15, q16)"
"\n",
"pn.Column(q13, q14, q15, q16, q17, q18, q19)"
]
},
{
"cell_type": "markdown",
"id": "657487e3-8e41-48db-b061-96b43c9f7ec9",
"id": "51d4b3f3-6dfc-45e4-a7e2-c82920fe8f2d",
"metadata": {},
"source": [
"## Application! "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0a428122-eb63-4bf2-b82c-d07de785e1db",
"metadata": {},
"outputs": [],
"source": [
"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(q17, q18, q19)"
"## Part 2b: application!"
]
},
{
Expand Down Expand Up @@ -674,7 +654,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:jl-full] *",
"display_name": "Python [conda env:jl-full]",
"language": "python",
"name": "conda-env-jl-full-py"
},
Expand Down

0 comments on commit b8f6688

Please sign in to comment.