nickmckay / LiPD-utilities

Input/output and manipulation utilities for LiPD files in Matlab, R and Python
http://nickmckay.github.io/LiPD-utilities/
GNU General Public License v2.0
29 stars 9 forks source link

Python: No resolution calculated #9

Closed chrismheiser closed 7 years ago

chrismheiser commented 7 years ago

For some reasons the resolution didn't get calculated on this file

  • Deborah

ODP658.Sarnthein.1989.xlsx ODP658.Sarnthein.1989.zip

chrismheiser commented 7 years ago

@khider Looks like the code is working as intended, but maybe not the way you want. Resolutions are calculated when there is a year, age, yr bp column in the table OR if a column has an inferredVariableType of year or age.

Table 1: No age, year, yr bp in any column. Table 2: Found "LR04 age" and calculated resolution.

Is there a new rule that needs to be added or am I missing something?

khider commented 7 years ago

@chrismheiser I thought in this case it would return a missing value rather than just leave it blank. My bad.

chrismheiser commented 7 years ago

Oh, I see. That's not how it's written. I'm open to doing that, though I find it easier to leave it out when not needing it. Is that something that the wiki would benefit from?

khider commented 7 years ago

That's something other people could benefit from. Blank on the wiki means the data/metadata was not given. In this case, it's not available (uncalculable).

chrismheiser commented 7 years ago

So you want this for every column?

"hasMaxValue" : 'NaN', "hasMeanValue" : 'NaN', "hasMedianValue" : 'NaN', "hasMinValue" : 'NaN', "hasResolution" : { "hasMaxValue" : 'NaN', "hasMeanValue" : 'NaN', "hasMedianValue" : 'NaN', "hasMinValue" : 'NaN' },

khider commented 7 years ago

well, no for the hasMaxValue and so on. Regardless of whether there is an age column, the column should have its own values. But yes for the HasResolution dictionary

chrismheiser commented 7 years ago

Yes every column has its own values. That was a bad example by me.