|
5 | 5 | "id": "cell-0", |
6 | 6 | "metadata": {}, |
7 | 7 | "source": [ |
8 | | - "# Flood Frequncy Mapping with GeoPandas DuckDB\n", |
| 8 | + "# Creating a Flood Frequncy Map\n", |
9 | 9 | "\n", |
10 | 10 | "## Overview\n", |
11 | 11 | "\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", |
13 | 13 | "\n", |
14 | 14 | "**Input Layers**:\n", |
15 | 15 | "* `groundsource_2026.parquet`: Google Groundsource flood observations dataset (Parquet format)\n", |
16 | 16 | "* `ne_10m_admin_0_countries_ind.zip`: Natural Earth Admin0 country boundaries shapefile\n", |
17 | 17 | "\n", |
18 | 18 | "**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", |
20 | 20 | "\n", |
21 | 21 | "**Data Credit**\n", |
22 | 22 | "\n", |
23 | 23 | "* Google Groundsource dataset: [https://zenodo.org/records/18647054](https://zenodo.org/records/18647054)\n", |
24 | 24 | "* Natural Earth: [https://www.naturalearthdata.com/](https://www.naturalearthdata.com/)\n", |
25 | 25 | "\n", |
26 | 26 | "**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>" |
29 | 28 | ] |
30 | 29 | }, |
31 | 30 | { |
|
461 | 460 | "plt.show()" |
462 | 461 | ] |
463 | 462 | }, |
| 463 | + { |
| 464 | + "cell_type": "markdown", |
| 465 | + "id": "101c8fe3", |
| 466 | + "metadata": {}, |
| 467 | + "source": [ |
| 468 | + "Save the results to a GeoPackage." |
| 469 | + ] |
| 470 | + }, |
464 | 471 | { |
465 | 472 | "cell_type": "code", |
466 | 473 | "execution_count": null, |
467 | 474 | "id": "2f53ca54", |
468 | 475 | "metadata": {}, |
469 | 476 | "outputs": [], |
470 | 477 | "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)" |
472 | 481 | ] |
473 | 482 | } |
474 | 483 | ], |
|
0 commit comments