USGS-R / drb-estuary-salinity-ml

Creative Commons Zero v1.0 Universal
0 stars 4 forks source link

update proportion calculation #36

Closed amsnyder closed 2 years ago

amsnyder commented 2 years ago

I updated the calculation of the proportion of measurements per day. Previously, I was counting the number of timestamps per day as our expected number of observations. As described in issue #27, it was dropping certain parameters because they were measured less frequently than other parameters at that site. To fix the issue, I counted the measurements taken per day for each parameter individually. I then took the mode of each of those counts to be the expected number of measurements for that parameter. I think used this as the denominator when calculation what proportion of measurements we have available.

amsnyder commented 2 years ago

That field was put in so that we could specify other time intervals to aggregate over (hourly, weekly, etc. averages). We haven't had a need to do anything but daily yet, so it is the only aggregation level I wrote code for at this point.