ArtesiaWater / hydropandas

Module for loading observation data into custom DataFrames
https://hydropandas.readthedocs.io
MIT License
52 stars 11 forks source link

support new DINO header? #83

Closed d2hydro closed 1 year ago

d2hydro commented 1 year ago

Hi!

Great stuff! Could it be that the headers in DINO changed?

This is what I've done:

  1. ordered some dino-data via there website: https://www.dinoloket.nl/ondergrondgegevens
  2. unzipped the content in a folder (de_tol)
  3. tried to load a well with the way you do in your example notebook: _import hydropandas as hpd fname = 'de_tol\Grondwaterstanden_Put\B31G2363001_0.csv' gw = hpd.GroundwaterObs.fromdino(fname=fname)

I get a key error: KeyError: 'startdatum'

That is not surprising as I see START DATUM in the header of the attached file.

If you can confirm this is due to a change in DINO (and not my ignorance), I can mod the code myself and do a merge request for you to review.

Thanks in advance!

B31G2363001_0.csv

dbrakenhoff commented 1 year ago

As far as I can tell, the *_0.csv (with heads relative to surface level) have different headers than the *_1.csv (heads relative to NAP). We rarely look at the *_0.csv files so it's not very surprising if our routines don't work for those files.

We'd welcome a contribution to fix the code to also support those headers, but it would have to keep working for the *_1.csv files as well. But, if you're interested in the heads relative to NAP, then maybe you don't need to fix anything?

d2hydro commented 1 year ago

As far as I can tell, the *_0.csv (with heads relative to surface level) have different headers than the *_1.csv (heads relative to NAP). We rarely look at the *_0.csv files so it's not very surprising if our routines don't work for those files.

We'd welcome a contribution to fix the code to also support those headers, but it would have to keep working for the *_1.csv files as well. But, if you're interested in the heads relative to NAP, then maybe you don't need to fix anything?

thanks @dbrakenhoff! I came to that conclusion; it is simply my ignorance ;-). The *_1.csv's can all be read.