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

Requests for only the most recent data should be parsed differently #54

Open
mroberge opened this issue Oct 12, 2019 · 0 comments
Open

Comments

@mroberge
Copy link
Owner

  • HydroFunctions version: 0.1.8dev
  • Python version: 3.7

Description

If you don't specify a start date or a period, the NWIS will return the most recent data for your sites. This produces two problems:

  • you get a warning that HF can't figure out the period, so period gets set to <0 Minutes>
  • It produces a dataframe with lots of different rows, each with a different time. If you request a subset of the dataframe, you still get all of these rows.

What I Did

new = hf.NWIS(stateCd='MD')
new.df()

Potential Solutions

  • don't allow NWIS to make 'recent' requests; instead create a 'Search'/'Find_Sites' class or function that returns a dict
  • create a condition in the NWIS parameter parsing that identifies when a 'recent' request is being made, and treat it differently from your normal .df() parsing.
  • If you allow NWIS to make these requests, then at least have the NWIS.repr string list the most recent observation for each parameter.
mroberge added a commit that referenced this issue Jun 4, 2021
This is a potential solution for recent requests.
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

1 participant