From 5d8c568e12cf789e062a13a37a5219cb1e23a998 Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Thu, 22 Apr 2021 09:57:38 -0500 Subject: [PATCH] minor clean up --- reg/providers.csv | 2 +- reg/ref_gages.csv | 1 - runner.R | 8 +++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/reg/providers.csv b/reg/providers.csv index 762c249..2f7eaa5 100644 --- a/reg/providers.csv +++ b/reg/providers.csv @@ -1,3 +1,3 @@ id,provider,description 1,https://waterdata.usgs.gov,U.S. Geological Survey Water Mission Area -2,https://cdec.water.ca.gov,California Data Exchange Center +2,https://cdec.water.ca.gov,California Data Exchange Center \ No newline at end of file diff --git a/reg/ref_gages.csv b/reg/ref_gages.csv index 698125d..b8ca4d2 100644 --- a/reg/ref_gages.csv +++ b/reg/ref_gages.csv @@ -1,5 +1,4 @@ id,provider,provider_id -111,1,a123 1000001,1,08332622 1000002,1,08332620 1000003,1,08332616 diff --git a/runner.R b/runner.R index c7b0077..c57eaf8 100644 --- a/runner.R +++ b/runner.R @@ -40,7 +40,7 @@ plan <- drake_plan( # This functions loads locally stored streamstats sites. streamstats_sites = get_streamstats_sites(), - # this function filters and renames NWIS Gage Locations + # this function filters and renames gage locations to a common table gage_locations = get_gage_locations(nwis_gage, streamstats_sites, cdec_gage), # This Gage layer from NHDPlusV2 is a basic starting point for @@ -70,9 +70,11 @@ plan <- drake_plan( # Each entry will have a provider and provider_id that acts as a unique # primary key. The existing registry file will have a unique attribute # that contains that primary key. - providers = read_csv(drake::file_in("reg/providers.csv")), + providers = read_csv(file_in("reg/providers.csv")), + + registry = build_registry(gage_locations, - registry = registry_file, + registry = file_in(registry_file), providers = providers), # Creates an output for USGS namespace reference locations