generated from cgs-earth/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
60,688 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
FROM fraunhoferiosb/frost-server | ||
FROM hylkevds/frost-http-waterquality | ||
|
||
ENV plugins_multiDatastream_enable=false | ||
ENV http_cors_enable=true | ||
ENV http_cors_allowed_origins=* | ||
ENV persistence_db_driver=org.postgresql.Driver | ||
ENV persistence_autoUpdateDatabase=true | ||
ENV persistence_idGenerationMode=ServerAndClientGenerated | ||
ENV plugins_coreModel_idType_thing=STRING | ||
ENV plugins_coreModel_idType_location=STRING | ||
ENV plugins_coreModel_idType_datastream=STRING | ||
ENV plugins_coreModel_idType=STRING | ||
ENV mqtt_Enabled=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# ================================================================= | ||
# | ||
# Copyright (c) 2025 Lincoln Institute of Land Policy | ||
# | ||
# Licensed under the MIT License. | ||
# | ||
# ================================================================= | ||
|
||
from dagster import Definitions | ||
from wqie.assets import county_stations | ||
from wqie.jobs import process_county_stations | ||
|
||
|
||
defs = Definitions( | ||
assets=[county_stations], | ||
jobs=[process_county_stations], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# ================================================================= | ||
# | ||
# Authors: Ben Webb <[email protected]> | ||
# | ||
# Copyright (c) 2025 Lincoln Institute of Land Policy | ||
# | ||
# Licensed under the MIT License. | ||
# | ||
# ================================================================= | ||
|
||
from dagster import asset | ||
from wqie.ops.fetch import fetch_station_metadata, fetch_site_metadata | ||
from wqie.ops.transform import transform_stations | ||
from wqie.partitions import county_partitions | ||
|
||
|
||
@asset(partitions_def=county_partitions) | ||
def county_stations(context): | ||
"""Fetch and process stations for a single county partition.""" | ||
|
||
# Extract the partition key (county) | ||
county = context.asset_partition_key_for_output() | ||
|
||
# Fetch and process data | ||
stations = fetch_station_metadata(county) | ||
site_details = fetch_site_metadata( | ||
[s["MonitoringLocationIdentifier"] for s in stations] | ||
) | ||
return transform_stations(site_details) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# ================================================================= | ||
# | ||
# Authors: Colton Loftus <[email protected]> | ||
# Authors: Ben Webb <[email protected]> | ||
# | ||
# Copyright (c) 2025 Lincoln Institute of Land Policy | ||
# | ||
# Licensed under the MIT License. | ||
# | ||
# ================================================================= | ||
|
||
from wqie.util import get_env | ||
|
||
API_BACKEND_URL = get_env( | ||
"API_BACKEND_URL", fallback="http://localhost:8888/FROST-Server/v1.1" | ||
) | ||
GEOCONNEX_URL = "https://geoconnex.us" | ||
NLDI_URL = "https://labs.waterdata.usgs.gov/api/nldi" | ||
STATION_URL = 'https://www.waterqualitydata.us/data/Station/search' | ||
RESULTS_URL = 'https://www.waterqualitydata.us/data/Result/search' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# ================================================================= | ||
# | ||
# Authors: Ben Webb <[email protected]> | ||
# | ||
# Copyright (c) 2025 Lincoln Institute of Land Policy | ||
# | ||
# Licensed under the MIT License. | ||
# | ||
# ================================================================= | ||
|
||
from dagster import job, op | ||
from wqie.ops.fetch import fetch_station_metadata, fetch_site_metadata | ||
from wqie.ops.transform import transform_stations, publish_station_collection | ||
from wqie.partitions import county_partitions | ||
|
||
|
||
@op | ||
def fetch_and_process_stations(context): | ||
"""Fetch and process stations for a single county partition.""" | ||
|
||
# Extract partition key (county) | ||
county = context.partition_key | ||
|
||
# Fetch and process data | ||
stations = fetch_station_metadata(county) | ||
site_details = fetch_site_metadata( | ||
[s["MonitoringLocationIdentifier"] for s in stations] | ||
) | ||
sites = transform_stations(site_details) | ||
return publish_station_collection(sites) | ||
|
||
|
||
@job(partitions_def=county_partitions) | ||
def process_county_stations(): | ||
"""Job to process stations for a single county partition.""" | ||
fetch_and_process_stations() |
Oops, something went wrong.