Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get instantaneous values method #3

Open
hwreeves-USGS opened this issue Aug 19, 2020 · 2 comments
Open

Add get instantaneous values method #3

hwreeves-USGS opened this issue Aug 19, 2020 · 2 comments

Comments

@hwreeves-USGS
Copy link

  • Follow the style used for get_dvs() and write a get_ivs() method to allow gage height to be pulled.
  • Write a get_iv test
  • Write an example notebook
@aleaf
Copy link
Owner

aleaf commented Aug 19, 2020

@hwreeves-USGS, this would be great! Would also be interested to hear any ideas you might have on how to really make it general, so any 5 digit parameter code could be submitted, without pydrograph necessarily knowing what it was.

@aleaf
Copy link
Owner

aleaf commented Sep 3, 2020

@hwreeves-USGS, @lauraschachter, regarding resampling- adding a resample method as an argument to a get_ivs() function would be great. I would suggest adding two arguments- 1) a freq argument (following pandas terminology) that dictates the time interval to resample to. Input to this argument could be any pandas frequency string, and could then be simply passed to df.resample(). 2) a resample_method argument that could take the name of a method call on the pandas resampler object (e.g. mean). This would be great to start out, but I could see at some point in the future maybe wanting the ability to support quantiles (e.g. q10 for the 10th percentile). But just supporting methods on the pandas resampler is great for now.

Regarding default behavior- I know pydrograph (for now at least) is more focused on groundwater model-related applications, but I still think we should try to make it as agnostic and explicit as possible in terms of what it does. Along these lines, I think a get_ivs() method should just return the instantaneous values it gets from NWIS, without defaulting to any time-series processing. It's easy enough for a user to specify the two above arguments to get a desired frequency and statistic, and that has the added benefit of making their code is more explicit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants