NOAA-OWP / hydrotools

Suite of tools for retrieving USGS NWIS observations and evaluating National Water Model (NWM) data.
Other
53 stars 12 forks source link

Optionally include additional metadata with `nwis_client get` requests #214

Closed jarq6c closed 1 year ago

jarq6c commented 1 year ago

This PR adds an include_expanded_metadata switch to nwis_client.iv.IVDataService.get. This is a boolean switch that adds the following columns to the resulting dataframe: ['siteName', 'srs', 'latitude', 'longitude', 'siteTypeCd', 'hucCd', 'countyCd', 'stateCd']. These data were always present in the raw json, but were previously ignored. This addition should benefit any geospatial applications.

Additions

Removals

Changes

Testing

  1. Added two new tests for get_raw and get using the new parameter.

Notes

-

Todos

-

Checklist

jarq6c commented 1 year ago

Appears 3.7 error is unrelated.

Edit: 3.7 is EOL in 2023-06-27. Should probably drop it and add 3.10.

jarq6c commented 1 year ago

Agreed and updated column names.

jarq6c commented 1 year ago

Deployed: https://pypi.org/project/hydrotools.nwis-client/3.3.1/