From b30b19249c72a4991cb81de806260db2c3b5551c Mon Sep 17 00:00:00 2001 From: Frederique Date: Thu, 2 Nov 2023 10:08:25 +0100 Subject: [PATCH] fixing documentation errors --- .../{charelston.PNG.svg => charleston.svg} | 0 examples/add_roadnetwork.ipynb | 287 +++--------------- examples/aggregation_zones_example.ipynb | 4 +- examples/global_OSM_JRC.ipynb | 2 +- 4 files changed, 43 insertions(+), 250 deletions(-) rename docs/_static/{charelston.PNG.svg => charleston.svg} (100%) diff --git a/docs/_static/charelston.PNG.svg b/docs/_static/charleston.svg similarity index 100% rename from docs/_static/charelston.PNG.svg rename to docs/_static/charleston.svg diff --git a/examples/add_roadnetwork.ipynb b/examples/add_roadnetwork.ipynb index 0224320d..0ed940ae 100644 --- a/examples/add_roadnetwork.ipynb +++ b/examples/add_roadnetwork.ipynb @@ -45,7 +45,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -105,7 +105,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ @@ -189,7 +189,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -248,14 +248,14 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:02,291 - hydromt_fiat - log - INFO - HydroMT version: 0.8.0\n" + "2023-11-02 09:43:07,944 - hydromt_fiat - log - INFO - HydroMT version: 0.8.0\n" ] } ], @@ -291,243 +291,36 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,731 - hydromt_fiat - data_catalog - INFO - Parsing data catalog from c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\hydromt_fiat_catalog_USA.yml\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:Parsing data catalog from c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\hydromt_fiat_catalog_USA.yml\n", - "WARNING:py.warnings:c:\\Users\\rautenba\\AppData\\Local\\mambaforge\\envs\\hydromt-fiat-dev\\lib\\site-packages\\hydromt\\data_adapter\\geodataframe.py:99: DeprecationWarning: Passing additional keyword arguments to be used by the GeoDataFrameAdapter driver is deprecated and will be removed in a future version. Please use 'driver_kwargs' instead.\n", - " warnings.warn(\n", - "\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,744 - hydromt_fiat - model_api - WARNING - Model dir already exists and files might be overwritten: c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\\exposure.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:hydromt_fiat:Model dir already exists and files might be overwritten: c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\\exposure.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,746 - hydromt_fiat - model_api - WARNING - Model dir already exists and files might be overwritten: c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\\vulnerability.\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "WARNING:hydromt_fiat:Model dir already exists and files might be overwritten: c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\\vulnerability.\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,749 - hydromt_fiat - model_api - INFO - Initializing fiat model from hydromt_fiat (v0.2.1.dev0).\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:Initializing fiat model from hydromt_fiat (v0.2.1.dev0).\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,760 - hydromt_fiat - model_api - INFO - setup_region.region: {'geom': geometry\n", - "0 POLYGON ((-79.96177 32.79061, -79.96177 32.767...}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_region.region: {'geom': geometry\n", - "0 POLYGON ((-79.96177 32.79061, -79.96177 32.767...}\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,763 - hydromt_fiat - basin_mask - DEBUG - Parsed region (kind=geom): {'geom': 'GeoDataFrame [-79.96177042 32.76748646 -79.91724162 32.79061007] (crs = EPSG:4326)'}\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "DEBUG:hydromt_fiat:Parsed region (kind=geom): {'geom': 'GeoDataFrame [-79.96177042 32.76748646 -79.91724162 32.79061007] (crs = EPSG:4326)'}\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,767 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.vertical_unit: feet\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_road_vulnerability.vertical_unit: feet\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,768 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.threshold_value: 0.6\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_road_vulnerability.threshold_value: 0.6\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,770 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.min_hazard_value: 0\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_road_vulnerability.min_hazard_value: 0\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,772 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.max_hazard_value: 10\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_road_vulnerability.max_hazard_value: 10\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,773 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.step_hazard_value: 1\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_road_vulnerability.step_hazard_value: 1\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,775 - hydromt_fiat - model_api - INFO - setup_exposure_roads.roads_fn: OSM\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_exposure_roads.roads_fn: OSM\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,776 - hydromt_fiat - model_api - INFO - setup_exposure_roads.road_damage: default_road_max_potential_damages\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_exposure_roads.road_damage: default_road_max_potential_damages\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,778 - hydromt_fiat - model_api - INFO - setup_exposure_roads.road_types: ['motorway', 'primary', 'secondary', 'tertiary']\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_exposure_roads.road_types: ['motorway', 'primary', 'secondary', 'tertiary']\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,779 - hydromt_fiat - model_api - INFO - setup_exposure_roads.unit: meter\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:setup_exposure_roads.unit: meter\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "2023-10-31 14:00:15,781 - hydromt_fiat - exposure_vector - INFO - Setting up roads...\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "INFO:hydromt_fiat:Setting up roads...\n" + "2023-11-02 09:43:10,658 - hydromt_fiat - data_catalog - INFO - Parsing data catalog from c:\\Repositories\\hydromt_fiat\\examples\\data\\road_network\\hydromt_fiat_catalog_USA.yml\n", + "2023-11-02 09:43:10,665 - hydromt_fiat - log - DEBUG - Writing log messages to new file c:\\Repositories\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\\hydromt.log.\n", + "2023-11-02 09:43:10,665 - hydromt_fiat - model_api - INFO - Initializing fiat model from hydromt_fiat (v0.2.1.dev0).\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,939 - hydromt_fiat - exposure_vector - INFO - The damage function 'roads' is selected for all of the structure damage to the roads.\n" + "2023-11-02 09:43:10,688 - hydromt_fiat - model_api - INFO - setup_region.region: {'geom': geometry\n", + "0 POLYGON ((-79.96177 32.79061, -79.96177 32.767...}\n", + "2023-11-02 09:43:10,689 - hydromt_fiat - basin_mask - DEBUG - Parsed region (kind=geom): {'geom': 'GeoDataFrame [-79.96177042 32.76748646 -79.91724162 32.79061007] (crs = EPSG:4326)'}\n", + "2023-11-02 09:43:10,691 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.vertical_unit: feet\n", + "2023-11-02 09:43:10,692 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.threshold_value: 0.6\n", + "2023-11-02 09:43:10,692 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.min_hazard_value: 0\n", + "2023-11-02 09:43:10,693 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.max_hazard_value: 10\n", + "2023-11-02 09:43:10,693 - hydromt_fiat - model_api - INFO - setup_road_vulnerability.step_hazard_value: 1\n", + "2023-11-02 09:43:10,694 - hydromt_fiat - model_api - INFO - setup_exposure_roads.roads_fn: OSM\n", + "2023-11-02 09:43:10,694 - hydromt_fiat - model_api - INFO - setup_exposure_roads.road_damage: default_road_max_potential_damages\n", + "2023-11-02 09:43:10,695 - hydromt_fiat - model_api - INFO - setup_exposure_roads.road_types: ['motorway', 'primary', 'secondary', 'tertiary']\n", + "2023-11-02 09:43:10,695 - hydromt_fiat - model_api - INFO - setup_exposure_roads.unit: meter\n", + "2023-11-02 09:43:10,696 - hydromt_fiat - exposure_vector - INFO - Setting up roads...\n", + "2023-11-02 09:43:10,791 - hydromt_fiat - exposure_vector - INFO - The damage function 'roads' is selected for all of the structure damage to the roads.\n" ] }, { @@ -541,21 +334,21 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,941 - hydromt_fiat - data_catalog - INFO - DataCatalog: Getting default_road_max_potential_damages DataFrame csv data from c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\us_road_damage.csv\n" + "2023-11-02 09:43:10,792 - hydromt_fiat - data_catalog - INFO - DataCatalog: Getting default_road_max_potential_damages DataFrame csv data from c:\\Repositories\\hydromt_fiat\\examples\\data\\road_network\\us_road_damage.csv\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "INFO:hydromt_fiat:DataCatalog: Getting default_road_max_potential_damages DataFrame csv data from c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\us_road_damage.csv\n" + "INFO:hydromt_fiat:DataCatalog: Getting default_road_max_potential_damages DataFrame csv data from c:\\Repositories\\hydromt_fiat\\examples\\data\\road_network\\us_road_damage.csv\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,943 - hydromt_fiat - dataframe - INFO - DataFrame: Read csv data.\n" + "2023-11-02 09:43:10,796 - hydromt_fiat - dataframe - INFO - DataFrame: Read csv data.\n" ] }, { @@ -569,7 +362,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,968 - hydromt_fiat - exposure_vector - INFO - Setting exposure geometries...\n" + "2023-11-02 09:43:10,813 - hydromt_fiat - exposure_vector - INFO - Setting exposure geometries...\n" ] }, { @@ -583,7 +376,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,970 - hydromt_fiat - exposure_vector - INFO - Setting geometry name to roads...\n" + "2023-11-02 09:43:10,814 - hydromt_fiat - exposure_vector - INFO - Setting geometry name to roads...\n" ] }, { @@ -597,7 +390,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,973 - hydromt_fiat - fiat - INFO - Updating all data objects...\n" + "2023-11-02 09:43:10,816 - hydromt_fiat - fiat - INFO - Updating all data objects...\n" ] }, { @@ -611,21 +404,21 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,975 - hydromt_fiat - model_api - ERROR - Default config file not found at c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\fiat\\settings.toml\n" + "2023-11-02 09:43:10,818 - hydromt_fiat - model_api - ERROR - Default config file not found at c:\\Repositories\\hydromt_fiat\\examples\\data\\fiat\\settings.toml\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "ERROR:hydromt_fiat:Default config file not found at c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\fiat\\settings.toml\n" + "ERROR:hydromt_fiat:Default config file not found at c:\\Repositories\\hydromt_fiat\\examples\\data\\fiat\\settings.toml\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,977 - hydromt_fiat - model_api - WARNING - Replacing geom: region\n" + "2023-11-02 09:43:10,819 - hydromt_fiat - model_api - WARNING - Replacing geom: region\n" ] }, { @@ -639,35 +432,35 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,979 - hydromt_fiat - fiat - INFO - Writing model data to c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\n" + "2023-11-02 09:43:10,820 - hydromt_fiat - fiat - INFO - Writing model data to c:\\Repositories\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "INFO:hydromt_fiat:Writing model data to c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\n" + "INFO:hydromt_fiat:Writing model data to c:\\Repositories\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,980 - hydromt_fiat - model_api - INFO - Writing model config to c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\\settings.toml\n" + "2023-11-02 09:43:10,821 - hydromt_fiat - model_api - INFO - Writing model config to c:\\Repositories\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\\settings.toml\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "INFO:hydromt_fiat:Writing model config to c:\\Users\\rautenba\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\\settings.toml\n" + "INFO:hydromt_fiat:Writing model config to c:\\Repositories\\hydromt_fiat\\examples\\data\\road_network\\FIAT model\\settings.toml\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:15,982 - hydromt_fiat - model_api - DEBUG - Writing file exposure/region.gpkg\n" + "2023-11-02 09:43:10,822 - hydromt_fiat - model_api - DEBUG - Writing file exposure/region.gpkg\n" ] }, { @@ -681,7 +474,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:16,070 - hydromt_fiat - model_api - DEBUG - Writing file exposure/roads.gpkg\n" + "2023-11-02 09:43:11,301 - hydromt_fiat - model_api - DEBUG - Writing file exposure/roads.gpkg\n" ] }, { @@ -695,7 +488,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:16,182 - hydromt_fiat - fiat - INFO - Writing model exposure table file to exposure/exposure.csv.\n" + "2023-11-02 09:43:11,327 - hydromt_fiat - fiat - INFO - Writing model exposure table file to exposure/exposure.csv.\n" ] }, { @@ -709,7 +502,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "2023-10-31 14:00:16,187 - hydromt_fiat - fiat - INFO - Writing model vulnerability_curves table file to vulnerability/vulnerability_curves.csv.\n" + "2023-11-02 09:43:11,332 - hydromt_fiat - fiat - INFO - Writing model vulnerability_curves table file to vulnerability/vulnerability_curves.csv.\n" ] }, { diff --git a/examples/aggregation_zones_example.ipynb b/examples/aggregation_zones_example.ipynb index 1f1b0a3d..dda47b9a 100644 --- a/examples/aggregation_zones_example.ipynb +++ b/examples/aggregation_zones_example.ipynb @@ -27,7 +27,7 @@ "\n", "`pip install hydromt_fiat`\n", "\n", - "If you want to know more about the installation process or if you are interested to install HydroMT-FIAT as a developer, please check out the [Installation Guide](../docs/installation.rst).\n" + "If you want to know more about the installation process or if you are interested to install HydroMT-FIAT as a developer, please check out the [Installation Guide](../installation.rst).\n" ] }, { @@ -158,7 +158,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## **Step 3:** Load the configuration file" + "# **Step 3:** Load the configuration file" ] }, { diff --git a/examples/global_OSM_JRC.ipynb b/examples/global_OSM_JRC.ipynb index 9b159d14..d5aea6e8 100644 --- a/examples/global_OSM_JRC.ipynb +++ b/examples/global_OSM_JRC.ipynb @@ -353,7 +353,7 @@ "metadata": {}, "outputs": [], "source": [ - "gdf.explore(column='Max Potential Damage: Structure')" + "gdf.explore(column='Max Potential Damage: Total')" ] }, {