Option to describe attributes
pvgenuchten opened this issue · 6 comments
pvgenuchten commented
This is a request to add a section on pygeometa mcf to describe attributes of a dataset.
attributes typically have non-human friendly labels. In metadata you can give a description of attribute names which are localised and human friendly, plus extra details such as type and extra metadata. 4 use cases:
- option to give localised human friendly label for attributes
- In the mcf to iso19139 conversion, use the attribute info to convert to a linked iso19110 document (in iso19115:2012, iso19110 can be embedded)
- for a csv file you have to define a .vrt file for GDAL to indicate which fields to use as Lat and Lon, by including this in the metadata, the vrt can be automatically generated
- For each attribute a link can be added to a generic ontology, providing a minimal approach for mapping to rdf
Sample:
attributes:
- name: id
type: numeric
identifier: true
- name: title
type: string
href: http://purl.org/dc/terms/title
title:
en: title
fr: titre
- name: x
type: geometry/point/lat
- name: y
type: geometry/point/lon
tomkralidis commented
Good idea @pvgenuchten. Proposal below:
attributes:
- name: foo
title:
en: foo title
description:
en: foo description
url: https://example.org/foo
type: int
units: SI_unit
values: (enumerated list or min/max)
...where values
could be one of:
values: [1, 2, 3, 4]
values:
range: [1, 4]
Thoughts?
pvgenuchten commented
Yes, good suggestion,
Further inspiration can be taken from:
- iso19110
- Datapackage convention let's users free in selecting a schema syntax, however for tabular data they suggest https://specs.frictionlessdata.io/table-schema
- owl/rdf/json-ld
- uml/xsd/json-schema
Do we need a thing on cardinality (0,,1..n)
I think we need more guidance on codelist:
- an option to reference an online codelist like:
values:
codelist:
title:
en: World Reference Soil Base Types
description:
en: "The WRB is an international soil classification system under the lead management of FAO for naming soils and creating soil map legends.(en)"
url: http://aims.fao.org/aos/agrovoc/c_89f35c33
- or write out the list
values:
codelist:
- code: "alisol"
label:
en: "Alisol"
description
en: "Alisols have a higher clay content in the subsoil than in the topsoil, as a result of pedogenetic processes (especially clay migration) leading to an argic subsoil horizon. Alisols have high-activity clays throughout the argic horizon and a low base saturation in the 50–100 cm depth. They occur predominantly in humid tropical, humid subtropical and humid temperate regions. Many Alisols correlate with Parabraunerden (Germany), Argissolos (Brazil), Ultisols with high-activity clays (United States of America), Kurosols (Australia), and Fersialsols and Sols fersiallitiques très lessivés (France)."
url: http://aims.fao.org/aos/agrovoc/c_479c499a
- code: "Anthrosol"
label:
en: "Anthrosol"
description
en: "Anthrosols comprise soils that have been modified profoundly through human activities, such as addition of organic or mineral material, charcoal or household wastes, or irrigation and cultivation. The group includes soils otherwise known as Plaggen soils, Paddy soils, Oasis soils, or Terra Preta de Indio. Many of them correspond to Highly cultivated soils and Anciently irrigated soils (Russia), Terrestrische anthropogene Böden (Germany), Anthroposols (Australia) and Anthrosols (China)."
url: http://aims.fao.org/aos/agrovoc/c_4515b13e
- an interesting approach in the table-spec of data package for rdf types (for example skos concepts). Suggestion to define the type of a field as a rdfType, which would automatically indicate how to populate it
tomkralidis commented
@pvgenuchten proposal for values, being one of:
enum
values:
enum: [1, 2, 3. 4]
range
values:
range: [1, 4]
codelist
values:
codelist:
- name: foo
title:
en: foo title
abstract:
en: foo description
url: https://example.org/values/foo
tomkralidis commented
@pvgenuchten PR in #62
pvgenuchten commented
should be #162, giving it a look, thanx Tom
tomkralidis commented
Implemented in #162