Skip to content

Commit 6ba7d8e

Browse files
committed
clean assignments
1 parent 7e039ed commit 6ba7d8e

26 files changed

+42
-26089
lines changed
File renamed without changes.

TAA1/tutorial2.ipynb

-1
This file was deleted.

TAA2/Combined_tutorial.ipynb renamed to TAA2/tutorial.ipynb

+37-29
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@
55
"id": "cbd68ab3-f04b-434f-a956-e730535c9ee5",
66
"metadata": {},
77
"source": [
8-
"## Summative Assignment 1: Natural Hazard Risk Assessment of Infrastructure"
8+
"## TAA2: Natural Hazard Risk Assessment using public data"
99
]
1010
},
1111
{
1212
"cell_type": "markdown",
1313
"id": "4c8cc742-23a7-4895-8d2a-7e826d8a23b8",
1414
"metadata": {},
1515
"source": [
16-
"Within this tutorial, we are going to use publicly available hazard data and exposure data to do a risk assessment for - AREA -. More specifically we will look at damage due to wind storms and flooding. We will use both Copernicus Land Cover data and OpenStreetMap to estimate the potential damage of natural hazards to the built environment.\n",
16+
"Within this tutorial, we are going to use publicly available hazard data and exposure data to do a risk assessment for the Netherlands. More specifically we will look at damage due to wind storms and flooding. We will use both Copernicus Land Cover data and OpenStreetMap to estimate the potential damage of natural hazards to the built environment.\n",
1717
" \n",
18-
"\n",
1918
"We will first download, access and explore hazard data retrieved from the Copernicus Climate Data Copernicus Store and the European Commission Joint Research Centre. After this, we will learn how to download and access Copernicus Land Cover data. We will also explore the power of OpenStreetMap that provides vector data. We will learn how to extract information from OpenStreetMap, how you can explore and visualize this. Lastly, we will use Copernicus Land Cover data to estimate the damage to specific land-uses, whereas we will use OpenStreetMap to assess the potential damage to the road system."
2019
]
2120
},
@@ -34,14 +33,14 @@
3433
"metadata": {},
3534
"source": [
3635
"- To understand the use of **OSMnx** to extract geospatial data from OpenStreetmap.\n",
36+
"- To know how to download data from the Copernicus Climate Data Store using the `cdsapi` and access it through Python.\n",
37+
"- To know how to access and open information from the Copernicus Land Monitoring System. Specifically the Corine Land Cover data.\n",
38+
"\n",
39+
"- To be able to open and visualize this hazard data.\n",
3740
"- To know how to rasterize vector data through using **Geocube**.\n",
3841
"- To know how to visualise vector and raster data.\n",
3942
"- To understand the basic functioning of **Matplotlib** to create a map.\n",
40-
"- To know how one can generate routes between two points using **NetworkX**.\n",
41-
"- To visualize networks on an interactive map \n",
42-
"- To know how to download data from the Copernicus Climate Data Store using the `cdsapi` and access it through Python.\n",
43-
"- To be able to open and visualize this hazard data.\n",
44-
"- To know how to access and open information from the Copernicus Land Monitoring System. Specifically the Corine Land Cover data.\n",
43+
"\n",
4544
"- To understand the basic approach of a natural hazard risk assessment.\n",
4645
"- To be able to use the `DamageScanner` to do a damage assessment.\n",
4746
"- To interpret and compare the damage estimates."
@@ -91,6 +90,7 @@
9190
"import matplotlib\n",
9291
"import urllib3\n",
9392
"import pyproj\n",
93+
"import contextily as cx\n",
9494
"\n",
9595
"import osmnx as ox\n",
9696
"import numpy as np\n",
@@ -140,7 +140,7 @@
140140
"id": "d7693fcc-a0cf-4ed4-a0d0-e3a00b917547",
141141
"metadata": {},
142142
"source": [
143-
"We will first download and explore windstorm and flood data for -AREA-. \n",
143+
"We will first download and explore windstorm and flood data for the Netherlands. \n",
144144
"\n",
145145
"### Windstorm Data\n",
146146
"<hr>\n",
@@ -238,7 +238,7 @@
238238
"metadata": {},
239239
"outputs": [],
240240
"source": [
241-
"place_name = \"Gelderland, The Netherlands\" ### CHECK IF WE WANT TO PROCEED WITH THIS LOCATION???\n",
241+
"place_name = \"Gelderland, The Netherlands\" ### But you could also consider Zeeland, for example.\n",
242242
"area = ox.geocode_to_gdf(place_name)"
243243
]
244244
},
@@ -247,7 +247,7 @@
247247
"id": "9bd3821f-16dd-4e7b-8ac6-a46475704afd",
248248
"metadata": {},
249249
"source": [
250-
"## 3. Visualising the natural hazard data\n",
250+
"## 3. Exploring the natural hazard data\n",
251251
"<hr>"
252252
]
253253
},
@@ -358,7 +358,7 @@
358358
"id": "8ba5e684-f658-42e9-bded-bbb47ced24e4",
359359
"metadata": {},
360360
"source": [
361-
"Following, we also make sure it will be in the European coordinate system **EPSG:3035** to ensure we can easily use it together with the other data. To do so, we use the `reproject()` function. You can simple add the number of the coordinate system."
361+
"Following, we also make sure it will be in the European coordinate system **EPSG:3035** to ensure we can easily use it together with the other data. To do so, we use the `rio.reproject()` function. You can simple add the number of the coordinate system."
362362
]
363363
},
364364
{
@@ -368,7 +368,7 @@
368368
"metadata": {},
369369
"outputs": [],
370370
"source": [
371-
"windstorm_europe = windstorm_europe.rio.reproject(XXXX)"
371+
"windstorm_europe = windstorm_europe. [add function]"
372372
]
373373
},
374374
{
@@ -404,7 +404,7 @@
404404
"metadata": {},
405405
"outputs": [],
406406
"source": [
407-
"windstorm_map['FX']. XXXX"
407+
"windstorm_map['FX']. [add function]"
408408
]
409409
},
410410
{
@@ -431,7 +431,7 @@
431431
"metadata": {},
432432
"outputs": [],
433433
"source": [
434-
"flood_map_path = os.path.join(data_path,'floodmap_EFAS_RP100_C.tif')"
434+
"flood_map_path = 'floodmap_EFAS_RP100_C.tif'"
435435
]
436436
},
437437
{
@@ -450,7 +450,7 @@
450450
"id": "5eb3c24d-4ed2-4717-befc-67e52e1bbbea",
451451
"metadata": {},
452452
"source": [
453-
"And let's make sure we set all the variables and the CRS correctly again to be able to open the data properly. Note that we now use **EPSG:3035**. This is the standard coordinate system for Europe, in meters (instead of degrees)."
453+
"And let's make sure we set all the variables and the CRS correctly again to be able to open the data properly. Note that we should now use **EPSG:3035**. This is the standard coordinate system for Europe, in meters (instead of degrees)."
454454
]
455455
},
456456
{
@@ -460,7 +460,7 @@
460460
"metadata": {},
461461
"outputs": [],
462462
"source": [
463-
"flood_map.rio.write_crs(3035, inplace=True)\n",
463+
"flood_map.rio.write_crs( , inplace=True)\n",
464464
"flood_map.rio.set_spatial_dims(x_dim=\"x\",y_dim=\"y\", inplace=True)"
465465
]
466466
},
@@ -570,7 +570,7 @@
570570
"metadata": {},
571571
"outputs": [],
572572
"source": [
573-
"CLC_location = os.path.join(data_path,'U2018_CLC2018_V2020_20u1.tif')"
573+
"CLC_location = 'U2018_CLC2018_V2020_20u1.tif'"
574574
]
575575
},
576576
{
@@ -598,8 +598,8 @@
598598
"metadata": {},
599599
"outputs": [],
600600
"source": [
601-
"CLC_region = CLC.rio.clip_box(minx=.....,)\n",
602-
"CLC_region = CLC_region.rio.clip(area.geometry.values,area.crs)"
601+
"CLC_region = CLC.rio.clip_box(\n",
602+
"CLC_region = CLC_region.rio.clip("
603603
]
604604
},
605605
{
@@ -618,7 +618,7 @@
618618
"id": "a31c0989-e96e-4809-a24d-13ab00de751f",
619619
"metadata": {},
620620
"source": [
621-
"And now we create a *color_dict* again, similarly as we did for the raster data in the previous tutorial "
621+
"And now we create a *color_dict*, to ensure we can visualize the data properly. We use the colorscheme of Corine Land Cover. "
622622
]
623623
},
624624
{
@@ -637,6 +637,14 @@
637637
" '#A6A6FF', '#4D4DFF', '#CCCCFF', '#E6E6FF', '#A6A6E6', '#00CCF2', '#80F2E6', '#00FFA6', '#A6FFE6', '#E6F2FF']"
638638
]
639639
},
640+
{
641+
"cell_type": "markdown",
642+
"id": "6d2c9c52",
643+
"metadata": {},
644+
"source": [
645+
"The code below allows us the use the color_dict above to plot the CLC map"
646+
]
647+
},
640648
{
641649
"cell_type": "code",
642650
"execution_count": null,
@@ -689,7 +697,7 @@
689697
"metadata": {},
690698
"source": [
691699
"<div class=\"alert alert-block alert-success\">\n",
692-
"<b>Question 5:</b> Describe the different land-use classes within your region that you see on the Corine Land Cover map.\n",
700+
"<b>Question 5:</b> Describe the different land-use classes within your region that you see on the Corine Land Cover map. Do you see any dominant land-use classes? \n",
693701
"</div>"
694702
]
695703
},
@@ -707,7 +715,7 @@
707715
"id": "3e0dd8ab-15e8-494d-a6fb-3861636e5ed4",
708716
"metadata": {},
709717
"source": [
710-
"The first step is to define which area you want to focus on. In the cell below, you will now read \"Zoeterwoude, The Netherlands\". Change this to any area or municipality in the Netherlands that (1) you can think of and (2) will work. \n",
718+
"The next step is to define which area you want to focus on. In the cell below, you will now read \"Kampen, The Netherlands\". Change this to any area or municipality in the Netherlands that (1) you can think of and (2) will work. \n",
711719
"\n",
712720
"In some cases, the function does not recognize the location. You could either try a different phrasing or try a different location. Many parts of the Netherlands should work."
713721
]
@@ -719,7 +727,7 @@
719727
"metadata": {},
720728
"outputs": [],
721729
"source": [
722-
"place_name = \"Zoeterwoude, The Netherlands\"\n",
730+
"place_name = \"Kampen, The Netherlands\"\n",
723731
"area = ox.geocode_to_gdf(place_name)"
724732
]
725733
},
@@ -1036,11 +1044,11 @@
10361044
"id": "3f8bda0f-aea9-471c-af15-31d9bf2bd191",
10371045
"metadata": {},
10381046
"source": [
1039-
"As you have noticed already during the lecture, and as we will again see next week when using the Google Earth Engine, most land-use data is in raster format. \n",
1047+
"As you have noticed already during the lecture, and as we have seen during TAA1 with the Google Earth Engine, most land-use data is in raster format. \n",
10401048
"\n",
10411049
"In OpenStreetMap everything is stored in vector format. As such, the land-use information we extracted from OpenStreetMap is also in vector format. While it is not always necessary to have this information in raster format, it is useful to know how to convert your data into a raster format.\n",
10421050
"\n",
1043-
"To do so, we can make use of the **GeoCube** package, which is a newly developed Python package that can very easily convert vector data into a raster format."
1051+
"To do so, we can make use of the **GeoCube** package, which is a recently developed Python package that can very easily convert vector data into a raster format."
10441052
]
10451053
},
10461054
{
@@ -1087,8 +1095,8 @@
10871095
"outputs": [],
10881096
"source": [
10891097
"landuse_grid = make_geocube(\n",
1090-
" vector_data=XXXX,\n",
1091-
" output_crs=\"epsg:4326\",\n",
1098+
" vector_data=,\n",
1099+
" output_crs=,\n",
10921100
" resolution=(-XXXX, XXXX),\n",
10931101
" categorical_enums=categorical_enums\n",
10941102
")"
@@ -1330,7 +1338,7 @@
13301338
"id": "318a2267-4057-485c-85f1-1929896ad9ee",
13311339
"metadata": {},
13321340
"source": [
1333-
"## 5. Perform a damage assessment using Coring Land Cover\n",
1341+
"## 5. Perform a raster-based damage assessment using OSM and Corine Land Cover\n",
13341342
"<hr>"
13351343
]
13361344
},

TAA3/tutorial2.ipynb renamed to TAA3/tutorial.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"tags": []
77
},
88
"source": [
9-
"# Tutorial 2: Social Media & Valuation of Landscapes\n",
9+
"# Tutorial: Social Media & Valuation of Landscapes\n",
1010
"\n",
1111
"Within this tutorial, we will work with the Flickr photo database to better understand how people value specific land use types. We will learn how to extract information from Flickr, how you can explore and visualize this, and how to use it for some basic analysis.\n",
1212
"\n",

0 commit comments

Comments
 (0)