Skip to content

Commit aaf7e26

Browse files
added module for the flood inundation mapping evaluation with SDML benchmark dataset (#27)
* update the benchmark fim_lookup query within fimserv * update the date field and formatting of codes * added the evaluation module within FIMserv
1 parent 83b2789 commit aaf7e26

23 files changed

+699
-242
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies = [
2323
"localtileserver>=0.10.5",
2424
"tqdm>=4.67.0",
2525
"scipy>=1.14.1",
26-
"aiohttp==3.10.8",
26+
"aiohttp>=3.12.14",
2727
"scikit-learn>=1.5.2",
2828
"tabulate>=0.9.0",
2929
"nodejs-bin>=18.4.0a4",

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ propcache==0.4.0
628628
# via yarl
629629
proto-plus==1.26.1
630630
# via google-api-core
631-
protobuf==5.28.3
631+
protobuf>=5.29.5
632632
# via
633633
# google-api-core
634634
# googleapis-common-protos
@@ -866,7 +866,7 @@ sphinxcontrib-serializinghtml==2.0.0
866866
# via sphinx
867867
stack-data==0.6.3
868868
# via ipython
869-
starlette==0.48.0
869+
starlette==0.49.1
870870
# via sphinx-autobuild
871871
statsmodels==0.14.5
872872
# via arch

src/fimserve/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@
3131
# Statistics
3232
from .statistics.calculatestatistics import CalculateStatistics
3333

34-
#For intersected HUC8 boundary
34+
# For intersected HUC8 boundary
3535
from .intersectedHUC import getIntersectedHUC8ID
3636

3737

38-
#evaluation of FIM
38+
# evaluation of FIM
3939
from .fimevaluation.fims_setup import FIMService, fim_lookup
40+
from .fimevaluation.run_fimeval import run_evaluation
4041

4142

4243
__all__ = [
@@ -57,4 +58,5 @@
5758
"getIntersectedHUC8ID",
5859
"FIMService",
5960
"fim_lookup",
61+
"run_evaluation",
6062
]

src/fimserve/datadownload.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def setup_directories():
1717

1818
return code_dir, data_dir, output_dir
1919

20+
2021
def clone_repository(code_dir, version=None):
2122
repo_path = os.path.join(code_dir)
2223
repo_url = "https://github.com/NOAA-OWP/inundation-mapping.git"
@@ -65,7 +66,10 @@ def download_data(huc_number, base_dir, version=None):
6566
hydrotable_path = os.path.join(output_dir, "branch_ids.csv")
6667
fim_inputs_path = os.path.join(base_dir, f"flood_{huc_number}", "fim_inputs.csv")
6768

68-
with open(hydrotable_path, "r") as infile, open(fim_inputs_path, "w", newline="") as outfile:
69+
with (
70+
open(hydrotable_path, "r") as infile,
71+
open(fim_inputs_path, "w", newline="") as outfile,
72+
):
6973
reader = csv.reader(infile)
7074
writer = csv.writer(outfile)
7175
for row in reader:
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
from .fims_setup import FIMService, fim_lookup
2+
from .run_fimeval import run_evaluation
23

3-
__all__ = ["FIMService", "fim_lookup"]
4+
__all__ = ["FIMService", "fim_lookup", "run_evaluation"]

0 commit comments

Comments
 (0)