DOI-USGS / ds-pipelines-targets-example-wqp

An example targets pipeline for pulling data from the Water Quality Portal (WQP)
Other
10 stars 14 forks source link

Flip wqp inventory and data pull comparisons back #70

Closed lindsayplatt closed 2 years ago

lindsayplatt commented 2 years ago

When running the code for reviewing #69, I got a message about the inventory and the data having different numbers of records. This seemed odd because both had just built within the same 10 minute span. I dug into the summarize_wqp_data() function and found that the records and sites for what was downloaded and what was inventoried were recently switched by accident. So, we are comparing the excpected number of records to the downloaded number of sites and vice versa.

A simple flip of these two object names will solve the problem!

compare_summaries <- wqp_summary %>%
    left_join(wqp_inventory_summary, by = "CharacteristicName") %>% 
    mutate(results_diff = n_records_expected - n_records,
           sites_diff = n_sites_expected - n_sites)
lekoenig commented 2 years ago

lol it was me 😱