USGS-R / drb-gw-hw-model-prep

Code repo to prepare groundwater and headwater-related datasets for modeling river temperature in the Delaware River Basin
Other
0 stars 3 forks source link

Fetch NHDPlusv2 attributes from ScienceBase #43

Closed lekoenig closed 2 years ago

lekoenig commented 2 years ago

This PR takes and modifies code from the USGS-R/drb-inland-salinity-ml repo to download NHDPlusv2 attributes from ScienceBase. I'm looking for a high-level review/awareness for this PR since the code has already been reviewed as part of the inland salinity project.

I've added a csv to our pipeline (1_fetch/in/nhdv2_attributes_from_sciencebase.csv) that defines the variable names we're interested in and their associated ScienceBase repo. When we build p1_sb_attributes_downloaded_csvs, we download each of the datasets from ScienceBase and then subset the national-scale data to our list of DRB COMIDs. The subset data files get saved as csv's and saved in 1_fetch/out/nhdv2_attr. We'll use these csv's in a later step to process the attributes to the NHM-scale, again borrowing from existing workflows in USGS-R/drb-inland-salinity-ml.

One more note - I wrapped the STATSGO variables we already had into this workflow and omitted the statsgo-specific targets.

Closes #39