metadata¶
-
context
()[source]¶ Project context information for metadata
Returns: dict – OEP metadata conform data license information
-
generate_resource_fields_from_db_table
(schema, table, geom_columns=None)[source]¶ Generate a template for the resource fields for metadata from a database table.
For details on the fields see field 14.6.1 of Open Energy Metadata standard. The fields name and type are automatically filled, the description and unit must be filled manually.
Examples
>>> from egon.data.metadata import generate_resource_fields_from_db_table >>> resources = generate_resource_fields_from_db_table( ... 'openstreetmap', 'osm_point', ['geom', 'geom_centroid'] ... ) # doctest: +SKIP
Parameters: - schema (str) – The target table’s database schema
- table (str) – Database table on which to put the given comment
- geom_columns (list of str) – Names of all geometry columns in the table. This is required to return Geometry data type for those columns as SQL Alchemy does not recognize them correctly. Defaults to [‘geom’].
Returns: list of dict – Resource fields
-
generate_resource_fields_from_sqla_model
(model)[source]¶ Generate a template for the resource fields for metadata from a SQL Alchemy model.
For details on the fields see field 14.6.1 of Open Energy Metadata standard. The fields name and type are automatically filled, the description and unit must be filled manually.
Examples
>>> from egon.data.metadata import generate_resource_fields_from_sqla_model >>> from egon.data.datasets.zensus_vg250 import Vg250Sta >>> resources = generate_resource_fields_from_sqla_model(Vg250Sta)
Parameters: model (sqlalchemy.ext.declarative.declarative_base()) – SQLA model Returns: list of dict – Resource fields
-
license_ccby
(attribution)[source]¶ License information for Creative Commons Attribution 4.0 International (CC-BY-4.0)
Parameters: attribution (str) – Attribution for the dataset incl. © symbol, e.g. ‘© GeoBasis-DE / BKG’ Returns: dict – OEP metadata conform data license information
-
license_geonutzv
(attribution)[source]¶ License information for GeoNutzV
Parameters: attribution (str) – Attribution for the dataset incl. © symbol, e.g. ‘© GeoBasis-DE / BKG’ Returns: dict – OEP metadata conform data license information
-
license_odbl
(attribution)[source]¶ License information for Open Data Commons Open Database License (ODbL-1.0)
Parameters: attribution (str) – Attribution for the dataset incl. © symbol, e.g. ‘© OpenStreetMap contributors’ Returns: dict – OEP metadata conform data license information