diff --git a/examples/aggregation_zones_example.ipynb b/examples/aggregation_zones_example.ipynb index 152d80dc..967e01c8 100644 --- a/examples/aggregation_zones_example.ipynb +++ b/examples/aggregation_zones_example.ipynb @@ -58,8 +58,8 @@ "from pathlib import Path\n", "import os \n", "#Load aggregation zones as GeoDataFrames\n", - "exposure=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones_example\" / \"exposure\" / \"buildings.gpkg\")\n", - "base_zone=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones_example\" / \"aggregation_zones\" / \"base_zones.gpkg\")\n", + "exposure=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"exposure\" / \"buildings.gpkg\")\n", + "base_zone=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"aggregation_zones\" / \"base_zones.gpkg\")\n", "\n", "m = base_zone.explore(column = 'ZONE_BASE')\n", "m = exposure.explore(m=m, color = '#FFFACD')\n", @@ -179,7 +179,7 @@ "#Let's read the yaml file with the required information \n", "#and set up the FIAT model for the two test cases. \n", "\n", - "with open(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones_example\" / \"config_aggregation.yml\", 'r') as file:\n", + "with open(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"config_aggregation.yml\", 'r') as file:\n", " config_aggregation = yaml.safe_load(file)\n", "\n", "print(json.dumps(config_aggregation, indent=4, sort_keys=False))" @@ -208,7 +208,7 @@ "outputs": [], "source": [ "# Set up Fiat Model\n", - "root = Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones_example\"\n", + "root = Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"fiat_model\"\n", "\n", "#If case exist\n", "if Path(config_aggregation[\"cases\"][\"test1_single_aggregation\"][\"new_root\"]).exists():\n", @@ -320,10 +320,10 @@ "outputs": [], "source": [ "#Load *.csv into dataframe\n", - "df_single_aggregation = pd.read_csv(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones_example\" / \"output\" / \"aggregation_zones_test1\" / \"exposure\" / \"exposure.csv\")\n", + "df_single_aggregation = pd.read_csv(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"output\" / \"aggregation_zones_test1\" / \"exposure\" / \"exposure.csv\")\n", "\n", "#Load original exposure geopackage into GeoDataFrame\n", - "new_exposure=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones_example\" / \"output\" / \"aggregation_zones_test1\" / \"exposure\" / \"buildings.gpkg\")\n", + "new_exposure=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"output\" / \"aggregation_zones_test1\" / \"exposure\" / \"buildings.gpkg\")\n", "\n", "#Merge dataframe with GeoDataFrame\n", "merged_gdf = new_exposure.merge(df_single_aggregation, left_on='Object ID', right_on='Object ID', how='inner')\n", @@ -354,10 +354,10 @@ "outputs": [], "source": [ "#Load *.csv into dataframe\n", - "df_multiple_aggregation = pd.read_csv(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones_example\" / \"output\" / \"aggregation_zones_test2\" / \"exposure\" / \"exposure.csv\")\n", + "df_multiple_aggregation = pd.read_csv(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"output\" / \"aggregation_zones_test2\" / \"exposure\" / \"exposure.csv\")\n", "\n", "#Load original exposure geopackage into GeoDataFrame\n", - "new_exposure=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones_example\" / \"output\" / \"aggregation_zones_test2\" / \"exposure\" / \"buildings.gpkg\")\n", + "new_exposure=gpd.read_file(Path(os.path.abspath(\"\")) / \"data\" / \"aggregation_zones\" / \"output\" / \"aggregation_zones_test2\" / \"exposure\" / \"buildings.gpkg\")\n", "\n", "#Merge dataframe with GeoDataFrame\n", "merged_gdf_multiple = new_exposure.merge(df_multiple_aggregation, left_on='Object ID', right_on='Object ID', how='inner')"