We'll need to process the Wieczorek datasets downloaded in #39 to the NHM-scale. We will adopt code from USGS-R/drb-inland-salinity-ml to do this.
This issue involves the following sub-tasks:
[x] For each NHM segment, gather the NHDv2 attributes for the total upstream watershed. This is relatively simple because we can use the comid_down column from the NHM-NHDv2 crosswalk table to pull the attribute values for only those COMIDs that represent the downstream terminus of each NHM segment.
[x] For each attribute/variable in 1_fetch/in/nhdv2_attributes_from_sciencebase.csv, we need to specify a new column called CAT_aggregation_operation which tells us how we should process that attribute when we're moving from the NHDPlusv2-scale for which these attributes were computed to the NHM-scale which (often) encompasses multiple NHDPlusv2 catchments.
[x] For each NHM segment, use the catchment aggregation specified in the step above to process the NHDv2-scale attributes to the NHM-scale.
[x] Combine upstream- and catchment-scale attributes into a single data frame with one row per NHM seg id.
We'll need to process the Wieczorek datasets downloaded in #39 to the NHM-scale. We will adopt code from USGS-R/drb-inland-salinity-ml to do this.
This issue involves the following sub-tasks:
comid_down
column from the NHM-NHDv2 crosswalk table to pull the attribute values for only those COMIDs that represent the downstream terminus of each NHM segment.1_fetch/in/nhdv2_attributes_from_sciencebase.csv
, we need to specify a new column calledCAT_aggregation_operation
which tells us how we should process that attribute when we're moving from the NHDPlusv2-scale for which these attributes were computed to the NHM-scale which (often) encompasses multiple NHDPlusv2 catchments.