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

Add meta-data #2

Closed
boriskaus opened this issue Nov 3, 2021 · 7 comments
Closed

Add meta-data #2

boriskaus opened this issue Nov 3, 2021 · 7 comments
Labels
help wanted Extra attention is needed

Comments

@boriskaus
Copy link
Member

There has been a recurring request to attach metadata to the GeoData structure. In principle it should be straightforward to add another field to the GeoData structure (say a String).
Yet, I am personally not really sure whether this would be sufficient or whether this needs to come in a certain form within the geosciences.

@boriskaus boriskaus added the help wanted Extra attention is needed label Nov 3, 2021
@LucaDeSiena
Copy link
Collaborator

What kind of metadata are we talking about? If I have an example it is easier for me to understand how to include them.

@mthielma
Copy link
Contributor

mthielma commented Nov 9, 2021

We were thinking to add metadata like the one in the IRIS EMC files:
ExMetaData
.
But we are happy to discuss what kind of metadata would make sense.

@mthielma
Copy link
Contributor

We have now introduced an additional field "atts" in the GeoData structure. atts is a dictionary where keys and values can be given. Which attributes are set is within the responsibility of the person who is importing the data. If no attributes are given upon creation of the GeoData structure, a note will be appended that no attributes were given to this structure.

@boriskaus
Copy link
Member Author

I have a number of comments:

  1. Does this imply that we have to reprocess all the alps data again? That is really a pain
  2. We currently have notes and tell that this should be a string. We could make an attributes out of that with Type Any. That is not type-stable but would allow to store any type of data at a later stage.

@mthielma
Copy link
Contributor

We added this a while ago (Dec 7, 2021), but did not close this issue. Most of the Alps data has already been processed accordingly.

Where is notes to be found? I did not find it as a filed in GeoData. Anyway, I don't think this is necessary, as atts has been implemented a while now. The atts dictionary also takes any data type, so I think this should be flexible enough.

@boriskaus
Copy link
Member Author

Ok I see now, my mistake. My only suggestion for change would be to not print attributes if they are empty. We could make attributes Union{Dict,Nothing} and set the default to nothing. If nothing is set there is no need to display it; that would be a bit cleaner than the current way (and backwards compatible)

@boriskaus
Copy link
Member Author

this has been implemented meanwhile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants