Skip to content

Commit 2e88183

Browse files
update
1 parent 68ce624 commit 2e88183

2 files changed

Lines changed: 16 additions & 6 deletions

File tree

_toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ parts:
1010
- file: notebooks/geopandas_spatial_query.ipynb
1111
- file: notebooks/geopandas_extract_from_excel.ipynb
1212
- file: notebooks/geopandas_fuzzy_table_join.ipynb
13+
- file: notebooks/geopandas_flood_frequncy.ipynb
1314
- caption: Xarray for Raster Data Processing
1415
chapters:
1516
- file: notebooks/xarray_raster_styling_analysis.ipynb

notebooks/geopandas_flood_frequncy.ipynb

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,26 @@
55
"id": "cell-0",
66
"metadata": {},
77
"source": [
8-
"# Flood Frequncy Mapping with GeoPandas DuckDB\n",
8+
"# Creating a Flood Frequncy Map\n",
99
"\n",
1010
"## Overview\n",
1111
"\n",
12-
"[Google Groundsource](https://zenodo.org/records/18647054) dataset of high-resolution flood observation derived from news articles. It contains data of flood events from 2000-2025 with precise dates and geographic polygons derived from Google Maps. The full dataset contains 2.6 million records and is available as a Parquet file. This notebook demonstrates how to use GeoPandas to efficiently load, filter, and analyze this large Parquet dataset to aggregate this records over a regular grid and create a flood frequency map for your chosen country.\n",
12+
"[Google Groundsource](https://zenodo.org/records/18647054) is a dataset of high-resolution flood observation derived from news articles. It contains data of flood events from 2000-2025 with precise dates and geographic polygons derived from Google Maps. The full dataset contains 2.6 million records and is available as a Parquet file. This notebook demonstrates how to use GeoPandas to efficiently load, filter, and analyze this large Parquet dataset to aggregate this records over a regular grid and create a flood frequency map for your chosen country.\n",
1313
"\n",
1414
"**Input Layers**:\n",
1515
"* `groundsource_2026.parquet`: Google Groundsource flood observations dataset (Parquet format)\n",
1616
"* `ne_10m_admin_0_countries_ind.zip`: Natural Earth Admin0 country boundaries shapefile\n",
1717
"\n",
1818
"**Output**:\n",
19-
"* `flood_frequency_grid.gpkg`: A GeoPackage of a 10km x 10km grid with total flood event counts.\n",
19+
"* `flood_frequency_grid.gpkg`: A GeoPackage with a layer of 10km x 10km grid cells with flood event counts.\n",
2020
"\n",
2121
"**Data Credit**\n",
2222
"\n",
2323
"* Google Groundsource dataset: [https://zenodo.org/records/18647054](https://zenodo.org/records/18647054)\n",
2424
"* Natural Earth: [https://www.naturalearthdata.com/](https://www.naturalearthdata.com/)\n",
2525
"\n",
2626
"**Running the Notebook**: \n",
27-
"The preferred way to run this notebook is on Google Colab. \n",
28-
"<a href='https://colab.research.google.com/github/spatialthoughts/geopython-tutorials/blob/main/notebooks/geopandas_flood_frequency.ipynb' target='_parent'><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
27+
"The preferred way to run this notebook is on Google Colab. <a href='https://colab.research.google.com/github/spatialthoughts/geopython-tutorials/blob/main/notebooks/geopandas_flood_frequency.ipynb' target='_parent'><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
2928
]
3029
},
3130
{
@@ -461,14 +460,24 @@
461460
"plt.show()"
462461
]
463462
},
463+
{
464+
"cell_type": "markdown",
465+
"id": "101c8fe3",
466+
"metadata": {},
467+
"source": [
468+
"Save the results to a GeoPackage."
469+
]
470+
},
464471
{
465472
"cell_type": "code",
466473
"execution_count": null,
467474
"id": "2f53ca54",
468475
"metadata": {},
469476
"outputs": [],
470477
"source": [
471-
"grid_india_a.to_file(os.path.join(output_folder, 'grid_india_flood_risk.gpkg'))"
478+
"output_filename = 'flood_frequency_grid.gpkg'\n",
479+
"output_filepath = os.path.join(output_folder, output_filename)\n",
480+
"grid_country.to_file(output_filepath)"
472481
]
473482
}
474483
],

0 commit comments

Comments
 (0)