RTIInternational / teehr

Tools for Exploratory Evaluation in Hydrologic Research
https://rtiinternational.github.io/teehr/
MIT License
8 stars 8 forks source link

Add dataframe metadata for the accessor class #261

Open samlamont opened 1 week ago

samlamont commented 1 week ago

We can take advantage of the pandas dataframe attrs dictionary to include metadata with the dataframe resulting from a query, which can be parsed by the accessor class methods.

The metadata could be added in the to_pandas() and to_geopandas() methods and could include information describing how the dataframe was created and things like the list of metric pydantic models (include_metrics)

This could then be read by the accessor class to help determine which methods are valid (timeseries vs. metrics) and to set plot characteristics (eg., axis limits, etc)