--- license: cc-by-4.0 pretty_name: CONUS Flash-Flood Benchmark (L1-L3) tags: [hydrology, flash-flood, benchmark, usgs, noaa, mrms, streamflow] size_categories: [10K= 2 yr). ## TL;DR for agents — manifest = discover, jq = filter, resolve_url = download ```bash BASE=https://huggingface.co/datasets/skyan1002/flash-flood-benchmark-data/resolve/main curl -sL "$BASE/manifest.jsonl" -o manifest.jsonl # one comma-safe index of every record + file ``` Every line is one JSON object: `record_type` (record|artifact), `level`, `ff_episode_id`, `gage_id`, `year`, `month`, `begin_date` (YYYY-MM-DD), `primary_state_abbrev`, `all_states_abbrev`, plus L3 fields (`benchmark_tier`, `flash_flood_class`, `is_strict_flash_flood`, `selected`, `lp3_return_period_yr`, ...) and, for artifacts, `artifact_kind`, `resolve_url`, `bytes`, `sha256`. ## Quickstart recipes ```bash # 1) Screen: L3 strict flash floods in TX, July 2025 jq -c 'select(.record_type=="record" and .level=="L3" and .primary_state_abbrev=="TX" and .is_strict_flash_flood==true and .begin_date>="2025-07-01" and .begin_date<="2025-07-31") | {testbed_id, lp3_return_period_yr, peak_value}' manifest.jsonl # 2) Download every file for one testbed (resolve URLs precomputed; -L follows the LFS/CDN redirect) jq -r 'select(.testbed_id=="FF_2025_07_TX_ep002__08167000" and .record_type=="artifact").resolve_url' \ manifest.jsonl | xargs -n1 curl -L -O # 3) Just the hydrograph CSVs for the curated set (selected & RP>=2), budget by bytes first jq -r 'select(.selected==true and .lp3_return_period_yr>=2 and .artifact_kind=="streamflow") | "\(.bytes)\t\(.resolve_url)"' manifest.jsonl # 4) L1 episodes that touched TX in 2015 (any-touch via all_states_abbrev) jq -c 'select(.level=="L1" and (.all_states_abbrev|test("(^|\\|)TX(\\||$)")) and .year==2015) | {ff_episode_id, primary_state_abbrev, begin_date}' manifest.jsonl # 5) One-shot curated bundle (26 selected & RP>=2, ~0.2 GB) curl -L "$BASE/bundles/testbeds_selected26.zip" -o selected26.zip # 6) A single light file (no zip): one watershed polygon curl -L "$BASE/testbeds/FF_2025_07_TX_ep002/08167000/watershed.geojson" -o ws.geojson ``` ## Optional: server-side filter (no manifest download) ```bash curl -sG https://datasets-server.huggingface.co/filter \ --data-urlencode dataset=skyan1002/flash-flood-benchmark-data \ --data-urlencode config=l3_testbeds --data-urlencode split=train \ --data-urlencode "where=\"primary_state_abbrev\"='TX' AND year=2025 AND is_strict_flash_flood=true" \ --data-urlencode length=100 ``` Rules: double-quote column names, single-quote strings, URL-encode, length<=100 (page with offset), re-index may lag minutes after an update. ## Contracts (read before scripting) - **State:** filter on `primary_state_abbrev` (2-letter). For multi-state episodes use `all_states_abbrev` (pipe-joined, e.g. `NJ|NY|PA`). - **Time:** `begin_date`/`end_date` are `YYYY-MM-DD` (lexical compare == date range); `year`/`month` are robust integer handles across levels. - **Download:** always `curl -L` (LFS objects 302-redirect; without -L you get a tiny pointer). Use `-C -` to resume; check the `bytes` column before multi-GB pulls. - **Never** `awk -F,` / `cut -d,` the raw CSVs in `catalog/raw_csv/` — fields contain commas. Use `jq` on `manifest.jsonl`, the Parquet configs, the `/filter` API, or a real CSV parser. - **zarr** gridded forcing ships inside `packages/.zip`; unzip then open with `zarr.open_group` (NOT `xr.open_zarr`). The light `mrms_2min_precip_basin_mean.csv` is the curl-friendly alternative. ## Helper CLI (optional) `ffbench` (POSIX sh; needs curl, uses jq if present) wraps the same URLs: ```bash curl -sL "$BASE/ffbench" -o ffbench && chmod +x ffbench ./ffbench query --level l3 --state TX --start 2025-07-01 --end 2025-07-31 --strict ./ffbench get FF_2025_07_TX_ep002__08167000 --out ./tx_testbed ./ffbench bundle selected26 ``` ## Layout `catalog/*.parquet` (+ `catalog/raw_csv/`), `manifest.{jsonl,csv,parquet}`, `manifest_schema.json`, `testbeds///` (loose light files), `packages/__.zip` (full per-testbed), `bundles/` (selected26, strict152). Figures/interactive map: companion Space `skyan1002/flash-flood-benchmark` and dataset `skyan1002/flash-flood-benchmark-figures`. ## License & citation CC-BY-4.0. Derived from public USGS (NWIS, STN, NLDI, 3DEP) and NOAA (NCEI Storm Events, NSSL MRMS/FLASH-CREST) data. See `CITATION.cff`.