Hydrocron

An API that repackages hydrology datasets from the Surface Water and Ocean Topography satellite into formats that make time-series analysis easier.
https://github.com/podaac/hydrocron

Category: Hydrosphere
Sub Category: Ocean and Hydrology Data Access

Keywords

development tva

Last synced: about 4 hours ago
JSON representation

Repository metadata

API for retreiving time series of SWOT data

README.md

Overview

Hydrocron is an API that repackages hydrology datasets from the Surface Water and Ocean Topography (SWOT) satellite into formats that make time-series analysis easier, including GeoJSON and CSV. To use Hydrocron, see the official documentation with examples and tutorials here: https://podaac.github.io/hydrocron/intro.html

The following sections of this readme describe how to install and run a development version of Hydrocron locally on your own computer. This is not recommended if you just want to access SWOT data through Hydrocron. To access data, see the documentation linked above.

To contribute to the development of Hydrocron, see the contributing guidelines and browse the open issues.

NOTE: the following instructions for installing and running a local version of Hydrocron are out of date, and may result in a broken install. We are aware of the issue and working on restoring local development functionality. Please open a new issue or ask a question on the PO.DAAC forum if you need to run a local installation.

Requirements

Python 3.10+

Running Locally with Docker

  1. Build or pull the hydrocron docker image
  2. Run docker compose to launch dynamodb local and hydrocron local
  3. Load test data into dynamodb local
  4. Execute sample requests

1. Build or Pull Hydrocron Docker

Build the docker container:


docker build . -f docker/Dockerfile -t hydrocron:latest

Pull a pre-built image from https://github.com/podaac/hydrocron/pkgs/container/hydrocron:

docker pull ghcr.io/podaac/hydrocron:latest

2. Run Docker Compose

Launch dynamodb local on port 8000 and hyrdrocron on port 9000

docker-compose up

3. Load Test Data

If you have not setup a python environment yet, use poetry to first initialize the virtual environment.

poetry install

This will load the data in test/data into the local dynamo db instance.

python tests/load_data_local.py

NOTE - By default data will be removed when the container is stopped. There are some commented lines in docker-compose.yml
that can be used to allow the data to persist across container restarts if desired.

4. Execute Sample Requests

The docker container is running a lambda container image. By posting data to port 9000, the lambda handler will be invoked
and will return results from the loaded test data. For example:

curl --location 'http://localhost:9000/2015-03-31/functions/function/invocations' \
--header 'Content-Type: application/json' \
--data '{
    "body":{
        "feature": "Reach",
        "reach_id": "71224100223",
        "start_time": "2022-08-04T00:00:00+00:00",
        "end_time": "2022-08-23T00:00:00+00:00",
        "output": "csv",
        "fields": "feature_id,time_str,wse"
    }
}'

Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 1 day ago

Total Commits: 210
Total Committers: 8
Avg Commits per committer: 26.25
Development Distribution Score (DDS): 0.571

Commits in past year: 57
Committers in past year: 5
Avg Commits per committer in past year: 11.4
Development Distribution Score (DDS) in past year: 0.456

Name Email Commits
frankinspace f****e 90
Nikki Tebaldi 1****t 60
Victoria McDonald 4****d 45
Vanesa 1****l 9
Cassie Nickles 4****s 2
James Wood J****d@j****v 2
jamesfwood j****d 1
vggonzal 9****m 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 211
Total pull requests: 109
Average time to close issues: 2 months
Average time to close pull requests: 8 days
Total issue authors: 11
Total pull request authors: 5
Average comments per issue: 1.84
Average comments per pull request: 0.82
Merged pull request: 103
Bot issues: 0
Bot pull requests: 0

Past year issues: 85
Past year pull requests: 42
Past year average time to close issues: about 2 months
Past year average time to close pull requests: 9 days
Past year issue authors: 8
Past year pull request authors: 4
Past year average comments per issue: 1.54
Past year average comments per pull request: 0.98
Past year merged pull request: 38
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/podaac/hydrocron

Top Issue Authors

  • frankinspace (92)
  • torimcd (49)
  • nikki-t (46)
  • vggonzal (7)
  • devincowan (6)
  • cassienickles (4)
  • merrittharlan (3)
  • efried130 (1)
  • Travis-Simmons (1)
  • viviant100 (1)
  • schuter (1)

Top Pull Request Authors

  • nikki-t (37)
  • torimcd (35)
  • frankinspace (17)
  • vggonzal (17)
  • cassienickles (3)

Top Issue Labels

  • enhancement (101)
  • bug (39)
  • documentation (12)
  • dependency (8)
  • help wanted (6)
  • question (4)

Top Pull Request Labels

  • enhancement (5)
  • documentation (2)

Dependencies

docker-compose.yml docker
  • amazon/dynamodb-local latest
poetry.lock pypi
  • aiobotocore 2.5.4
  • aiohttp 3.8.5
  • aioitertools 0.11.0
  • aiosignal 1.3.1
  • astroid 2.15.8
  • async-timeout 4.0.3
  • attrs 23.1.0
  • boto3 1.28.17
  • boto3-stubs 1.28.56
  • botocore 1.31.17
  • botocore-stubs 1.31.56
  • bounded-pool-executor 0.0.3
  • certifi 2023.7.22
  • cffi 1.15.1
  • charset-normalizer 3.2.0
  • click 8.1.7
  • click-plugins 1.1.1
  • clickclick 20.10.2
  • cligj 0.7.2
  • colorama 0.4.6
  • connexion 2.14.2
  • cryptography 41.0.4
  • dill 0.3.7
  • earthaccess 0.5.3
  • exceptiongroup 1.1.3
  • fiona 1.9.4.post1
  • flake8 6.1.0
  • flask 2.2.5
  • flask-testing 0.8.1
  • frozenlist 1.4.0
  • fsspec 2023.9.2
  • geopandas 0.13.2
  • hydrocron-db 0.1.0
  • idna 3.4
  • inflection 0.5.1
  • iniconfig 2.0.0
  • isort 5.12.0
  • itsdangerous 2.1.2
  • jinja2 3.1.2
  • jmespath 1.0.1
  • jsonschema 4.19.1
  • jsonschema-specifications 2023.7.1
  • lazy-object-proxy 1.9.0
  • markupsafe 2.1.3
  • mccabe 0.7.0
  • mirakuru 2.5.1
  • multidict 6.0.4
  • multimethod 1.10
  • mypy-boto3-dynamodb 1.28.55
  • numpy 1.25.2
  • packaging 23.1
  • pandas 2.1.0
  • pandas 2.1.1
  • platformdirs 3.10.0
  • pluggy 1.3.0
  • port-for 0.7.1
  • pqdm 0.2.0
  • psutil 5.9.5
  • pycodestyle 2.11.0
  • pycparser 2.21
  • pyflakes 3.1.0
  • pylint 2.17.6
  • pymysql 1.1.0
  • pyproj 3.6.1
  • pytest 7.4.2
  • pytest-dynamodb 2.2.3
  • python-cmr 0.9.0
  • python-dateutil 2.8.2
  • python-dotenv 1.0.0
  • pytz 2023.3.post1
  • pyyaml 6.0.1
  • referencing 0.30.2
  • requests 2.31.0
  • rpds-py 0.10.3
  • s3fs 2023.9.2
  • s3transfer 0.6.2
  • shapely 2.0.1
  • six 1.16.0
  • swagger-ui-bundle 0.0.9
  • tinynetrc 1.3.1
  • tomli 2.0.1
  • tomlkit 0.12.1
  • tqdm 4.66.1
  • types-awscrt 0.19.1
  • types-s3transfer 0.7.0
  • typing-extensions 4.8.0
  • tzdata 2023.3
  • urllib3 1.26.16
  • werkzeug 2.2.3
  • wrapt 1.15.0
  • yarl 1.9.2
pyproject.toml pypi
.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • docker/build-push-action v3 composite
  • docker/login-action v1 composite
  • docker/metadata-action v4 composite
  • getsentry/action-github-app-token v2 composite
  • snyk/actions/python-3.9 master composite
docker/Dockerfile docker
  • public.ecr.aws/lambda/python 3.10 build
.github/workflows/deploy-pages.yml actions
  • abatilo/actions-poetry v2 composite
  • actions/checkout v3 composite
  • actions/configure-pages v3 composite
  • actions/deploy-pages v2 composite
  • actions/setup-python v4 composite
  • actions/upload-pages-artifact v2 composite
  • getsentry/action-github-app-token v2 composite
.github/workflows/release-created.yml actions
  • abatilo/actions-poetry v3 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • getsentry/action-github-app-token v3 composite

Score: 6.173786103901936