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

Improvements for measurements dataframe #38

Closed
9 tasks done
veenstrajelmer opened this issue Mar 1, 2024 · 0 comments · Fixed by #45
Closed
9 tasks done

Improvements for measurements dataframe #38

veenstrajelmer opened this issue Mar 1, 2024 · 0 comments · Fixed by #45

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Mar 1, 2024

  • ddlpy version: master
  • Python version: 3.11
  • Operating System: Windows

Description

Some suggestions for improvements for the dataframe returned by ddlpy.measurements():

  • replace ".code" with ".Code" in column names, for consistency. To avoid doing this downstream: measurements.columns = [x.replace(".code",".Code") for x in measurements.columns] >> https://github.com/openearth/ddlpy/blob/dd57a45d8a20e8146bcd76c05b8115c72d3aceca/ddlpy/ddlpy.py#L156
  • replace locatie_code with Code
  • rename "t" to "time", so this is recognized by xarray as the time variable/dimension
  • set "time" as index, makes plotting easier and probably easier for xarray
  • if nodata, return None instead of []?
  • nodata print al logging
  • also keep "Code" as column in locations dataframe (is now dropped when setting as index), would simplify code here and there. However, single source of truth is also worth something. (in that case consider dropping "Tijdstip" column since it is a duplicate of "t" >> won't do
  • consider QC as int, but avoid TypeError "int() argument must be a string, a bytes-like object or a real number, not 'NoneType'" >> won't do
  • update testcases, example script and jupyter notebook
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

Successfully merging a pull request may close this issue.

1 participant