hydra-floods

HYDrologic Remote sensing Analysis for Floods Python package

https://github.com/servir-mekong/hydra-floods

Science Score: 59.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    3 of 14 committers (21.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

earth-engine flood google-cloud near-real-time remote-sensing surface-water
Last synced: 6 months ago · JSON representation

Repository

HYDrologic Remote sensing Analysis for Floods Python package

Basic Info
Statistics
  • Stars: 182
  • Watchers: 15
  • Forks: 51
  • Open Issues: 13
  • Releases: 9
Topics
earth-engine flood google-cloud near-real-time remote-sensing surface-water
Created over 7 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License Code of conduct

README.md

hydra-floods

docs unittests License: MIT PyPI version DOI

Introduction

The Hydrologic Remote Sensing Analysis for Floods (or HYDRAFloods) is an open source Python application for downloading, processing, and delivering surface water maps derived from remote sensing data. The bases behind the tool is to provide sensor agnostic approaches to produce surface water maps. Furthermore, there are workflows that leverage multiple remote sensing dataset in conjunction to provide daily surface water maps for flood application.

Installation

The recommended way to get up and started using the hydrafloods packages is to install using pip:

pip install hydrafloods

pip should handle some of the basic dependencies such as the Earth Engine Python API that we need for the majority of the functionality. It is planned to add hydrafloods to the conda-forge channel but that is currently not completed.

To use the hydrafloods package successfully, Google Cloud and Earth Engine authentication is necessary. Tointialize the Google Cloud environment and authenticate using your credentials, run the following command:

gcloud init

To authenticate the Earth Engine Python API with your credentials, run the following:

earthengine authenticate

For more information on setup and installation of the hydrafloods package, please see the Installation Docs.

Example

To highlight a quick example of the hydrafloods API and simplicity to produce high-quality surface water maps we provide a quick example of mapping surface water using Sentinel-1 over the confluence of the Mekong and Tonle Sap rivers, which experiences frequent flooding.

```python

import the hydrafloods and ee package

import hydrafloods as hf import ee ee.Initialize()

specify start and end time as well as geographic region to process

starttime = "2019-10-05" endtime = "2019-10-06" region = ee.Geometry.Rectangle([104, 11.5, 106, 12.5 ])

get the Sentinel-1 collection

the hf.dataset classes performs the spatial-temporal filtering for you

s1 = hf.datasets.Sentinel1(region, starttime, endtime)

apply a water mapping function to the S1 dataset

this applies the "Edge Otsu" algorithm from https://doi.org/10.3390/rs12152469

waterimgs = s1.applyfunc( hf.thresholding.edgeotsu, initialthreshold=-14, threshnodata=-20, edge_buffer=300 )

take the mode from multiple images

since this is just imagery from one day, it will simply mosaic the images

watermap = ee.Image(waterimgs.collection.mode())

export the water map

hf.geeutils.exportimage( watermap, region, "users//watermapexample", scale=30, ) ```

(This script is complete, it should run "as is")

At the end of the script execution, there will be an Earth Engine export task running the process on the EE servers for use later in the EE platform. The resulting surface water image should look like the following figure. It should be noted that hydrafloods can scale quickly and easily by simply changing the start or end time and region to process, allowing for processing of surface water maps with minimal effort in terms of coding.

Quick Start Results

Figure 1. Sentinel-1 backscatter image (left) and resulting surface water map (right) from 2019-10-05 for a region in Cambodia as in the example.

Learn more about the package throughout the documentation such as installation, the algorithms available, or setting up the package to run operationally using the CLI.

Get in touch

Contribute

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. Please see the Contributing Guidelines for details on where to contribute and how to get started.

Citation

Markert, K., Bhandari, B., Haag, A., Mayer, T., Poortinga, A., van Verseveld, W., & Soe Thwal, N. (2023). Hydrologic Remote Sensing Analysis for Floods (HYDRAFloods) (v2023.10.14). Zenodo. https://doi.org/10.5281/zenodo.15841684

License

hydrafloods is available under the open source MIT License.

Owner

  • Name: SERVIR-Mekong
  • Login: Servir-Mekong
  • Kind: organization
  • Email: dsaah@sig-gis.com
  • Location: Bangkok, thailand

SERVIR-Mekong

GitHub Events

Total
  • Watch event: 17
  • Push event: 3
  • Fork event: 4
Last Year
  • Watch event: 17
  • Push event: 3
  • Fork event: 4

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 485
  • Total Committers: 14
  • Avg Commits per committer: 34.643
  • Development Distribution Score (DDS): 0.107
Past Year
  • Commits: 3
  • Committers: 2
  • Avg Commits per committer: 1.5
  • Development Distribution Score (DDS): 0.333
Top Committers
Name Email Commits
kmarkert k****t@g****m 433
ArjenHaag A****g 14
MayerT1 4****1 12
Biplov Bhandari b****5@g****m 5
jayh j****n@u****u 4
Ate p****e@g****m 4
verseve w****d@g****m 3
John Dilger j****r@g****m 2
kmarkert l****r@S****l 2
loaner l****r@S****v 2
kaileymohamed k****d@o****m 1
aweigel-ghrc a****9@u****u 1
Nyein Soe Thwal n****l@g****m 1
Farrukh Chishtie 3****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 36
  • Total pull requests: 17
  • Average time to close issues: 5 months
  • Average time to close pull requests: 6 days
  • Total issue authors: 18
  • Total pull request authors: 8
  • Average comments per issue: 2.61
  • Average comments per pull request: 0.53
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • KMarkert (9)
  • mickymags (7)
  • ArjenHaag (4)
  • kaileymohamed (2)
  • lg760411 (1)
  • devapatel3 (1)
  • dangeol (1)
  • hardreddata (1)
  • s-boeck (1)
  • biplovbhandari (1)
  • mn5hk (1)
  • elbeejay (1)
  • SOutmani (1)
  • JustinWenzhaoLi (1)
  • aaraney (1)
Pull Request Authors
  • KMarkert (5)
  • biplovbhandari (5)
  • jdilger (2)
  • elbeejay (2)
  • Tjalling-dejong (1)
  • nst11 (1)
  • kaileymohamed (1)
  • ArjenHaag (1)
Top Labels
Issue Labels
Stale (9) enhancement (8) bug (8) docs (7) question (6) wontfix (1) help wanted (1) feature (1) good first issue (1)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 415 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 78
  • Total maintainers: 1
proxy.golang.org: github.com/Servir-Mekong/hydra-floods
  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/servir-mekong/hydra-floods
  • Versions: 8
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
pypi.org: hydrafloods

HYDrologic Remote sensing Analysis for Floods

  • Versions: 62
  • Dependent Packages: 1
  • Dependent Repositories: 2
  • Downloads: 415 Last month
Rankings
Stargazers count: 6.1%
Forks count: 6.1%
Dependent packages count: 7.3%
Average: 8.5%
Downloads: 11.3%
Dependent repos count: 11.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • simplecmr *
.github/workflows/docs.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/pypi-publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/unittests.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
environment.yml conda
  • earthengine-api
  • fire
  • gcsfs
  • gdal
  • geopandas
  • netcdf4
  • numpy
  • pandas
  • pip
  • pyproj
  • pyresample
  • python 3.7.*
  • requests
  • scipy
  • shapely
  • xarray
  • xmltodict
  • yaml
docker/Dockerfile docker
  • continuumio/miniconda3 latest build