OpenEnergyPlatform / academy

The Open Energy Academy is a collection of courses, tutorials, and questions for the Open Energy Family
https://openenergyplatform.github.io/academy/
GNU Affero General Public License v3.0
16 stars 6 forks source link

timestamps #22

Closed klarareder closed 5 years ago

klarareder commented 5 years ago

As a user, I would like to be clearly shown which timestamp is used (right, left, middle).

christian-rli commented 5 years ago

RequirementSpecificationID=42

klarareder commented 5 years ago

The timestamp shall be shown as part of the metadata: field in jason: temportal (resolution already exists) add new : "timestamp": "left/middle/right", "aggregationType": "sum/average/current"

if the resolution does change within one table this has to be mentioned in the description

klarareder commented 5 years ago

If anyone has a better name than "timestamp", it is highly welcome!

klarareder commented 5 years ago

@christian-rli when I add the two new variables would that be in: metadata_tool\src\metadata_tool\metadata_version_to_1_4.py Line 226 add something like: d_temporal['timestamp'] = ''

christian-rli commented 5 years ago

it depends on where you'd like to add them. The location you point to is in the tool for the conversion from version 1.3 to 1.4. I would first change the reference json files of version 1.4 here: https://github.com/OpenEnergyPlatform/examples/blob/master/metadata/oep_metadata_example.json https://github.com/OpenEnergyPlatform/examples/blob/master/metadata/oep_metadata_template.json I will do this later today and adapt the tool right afterwards.

christian-rli commented 5 years ago

I added a timestamp tag in the reference files in this commit https://github.com/OpenEnergyPlatform/examples/commit/fc5a53e276f6eff94ba4c874eeaf6b79731c498b and I updated the description page for the metadata string (https://github.com/OpenEnergyPlatform/examples/wiki/Metadata-Description).

christian-rli commented 5 years ago

I implemented the creation of a timestamp tag in the metadata_tool as well. https://github.com/OpenEnergyPlatform/metadata_tool/commit/5a8ce4ca9e4798829d9e7d81a909811142cb1562

MGlauer commented 5 years ago

I just realised that timestamp is not a good label for 'left'/'middle'/'right' (because it is no timestamp). I would suggest we use orientation instead.

christian-rli commented 5 years ago

I have no objections to orientation. Just throwing alignment into the discussion as well. preferences to be voted on by thumbs up / down.

MGlauer commented 5 years ago

tbh: I favor alignment :D

Ludee commented 5 years ago

alignment is good but can be interpreted as something else. Can we use timestampAlignment

klarareder commented 5 years ago

I googled for translations of 'Zeitstempel' and I asked my collegues. All I found was timestamp and that was also my collegues feedback, but they did agree that is ambigous. Hence, I throw in the word: timestampInterval

klarareder commented 5 years ago

I was wondering if we could implement conditional fields (I am not sure how difficult that is):

"aggregationType": "sum/average/current"

if sum or average a selected only than pops up a new window with the timestampInterval/timestampAlignment/orientation. Because in case of current this information is not needed.

christian-rli commented 5 years ago

timestampAlignment is a lot more straightforward, notably more so than start and end. If we want to keep those, I would suggest using alignment. If just alignment is too ambiguous for us and we opt for timestampAlignment, we might want to consider changing the other keys to startTimeseries and endTimeseries or something similar.

christian-rli commented 5 years ago

@klarareder I think conditional fields can be implemented in the tool to create metadata. Some points of information only make sense when others are given, but i don't think that needs to be implemented in the string. Keeping it simple and maintaining its structure, regardless of the content, provides more advantages.

stap-m commented 5 years ago

The timestamp shall be shown as part of the metadata: field in jason: temportal (resolution already exists) add new : "timestamp": "left/middle/right", "aggregationType": "sum/average/current"

what about: "intervalSpezification" instead of timestamp?

christian-rli commented 5 years ago

If I recall correctly, we decided against the inclusion of intervals in one of our last calls, because intervals can vary. I understand intervals as the span between two timestamps, so it would describe something other than what we mean by alignment (left/right/middle).

klarareder commented 5 years ago

Indeed intervals may vary, but we decided, if the dataset has variing intervals that has to be explained in the description. But (left/right/middle) describe an interval. It is one point in time and with the resolution and timestamp together we know the length of the interval. E.g.: resolution=15min, point in time=13:00 o'clock, timestamp=right => inverval from 12:45-13:00 o'clock

christian-rli commented 5 years ago

I added aggregationType in this commit. But I have a suggestion concerning timestamps that I hope factors in all suggestions. Currently the temporal class looks like this:

"temporal": 
    {"referenceDate": "2016-01-01",
    "start": "2017-01-01T00:00+01",
    "end": "2017-12-31T23:00+01",
    "resolution": "1 h",
    "timestamp": "left",
    "aggregationType": "sum"},

This looks confusing. Basically all items here (with the exception of referenceDate) belong to a potential timeseries, but timeseries has no structural implementation. So why not make it a new class? My suggestion:

"temporal":{
    "referenceDate": "2016-01-01",
    "timeseries": {
        "start":"2017-01-01T00:00+01",
        "end":"2017-12-31T00:00+01",
        "resolution": "1 h",
        "alignment":"left",
        "aggregationType":"sum"}
}

In my opinion this looks more straight forward and includes most of (/all?) the suggestions. I welcome timely feedback on this, so we can finish metadata version 1.4.

klarareder commented 5 years ago

looks like a very good idea