Coder Social home page Coder Social logo

ckanext-scheming's Introduction

ckanext-scheming

This CKAN extension provides a way to configure and share metadata schemas using a YAML or JSON schema description. Custom validation and template snippets for editing and display are supported.

Note:
Use a custom schema based on: GeoDCAT-AP/INSPIRE for the spanish context (NTI-RISP).

Warning:
Needs ckanext-spatial to work.

Tests

Table of contents:

Requirements

This plugin is compatible with CKAN 2.8 or later.

Installation

You can install the extension with the following shell commands:

cd $CKAN_VENV/src/

pip install -e "git+https://github.com/ckan/ckanext-scheming.git#egg=ckanext-scheming"

Configuration

Set the schemas you want to use with configuration options:

# Each of the plugins is optional depending on your use
ckan.plugins = scheming_datasets scheming_groups scheming_organizations

#   module-path:file to schemas being used
scheming.dataset_schemas = ckanext.spatialx:spatialx_schema.yaml
                           ckanext.spatialx:spatialxy_schema.yaml
#   will try to load "spatialx_schema.yaml" and "spatialxy_schema.yaml"
#   as dataset schemas

#   For group and organization schemas (replace myplugin with your custom plugin)
scheming.group_schemas = ckanext.scheming:group_with_bookface.json
                         ckanext.myplugin:/etc/ckan/default/group_with_custom_fields.json
scheming.organization_schemas = ckanext.scheming:org_with_dept_id.json
                                ckanext.myplugin:org_with_custom_fields.json
#
#   URLs may also be used, e.g:
#
# scheming.dataset_schemas = http://example.com/spatialx_schema.yaml

#   Preset files may be included as well. The default preset setting is:
scheming.presets = ckanext.scheming:presets.json

#   The is_fallback setting may be changed as well. Defaults to false:
scheming.dataset_fallback = false

Schema Types

With this plugin, you can customize the group, organization, and dataset entities in CKAN. Adding and enabling a schema will modify the forms used to update and create each entity, indicated by the respective type property at the root level. Such as group_type, organization_type, and dataset_type. Non-default types are supported properly as is indicated throughout the examples.

Example Schemas

Dataset schemas:

These schemas are included in ckanext-scheming and may be enabled with e.g: scheming.dataset_schemas = ckanext.scheming:camel_photos.yaml

These schemas use presets defined in presets.json.

Group schemas:

Organization schemas:

Common Schema Keys

scheming_version

Set to 2. Future versions of ckanext-scheming may use a larger number to indicate a change to the schema format.

about_url

about_url: https://github.com/link-to-my-project

about_url is a link to human-readable information about this schema. ckanext-scheming automatically publishes your schema and this link allows users to learn more about it.

Dataset Schema Keys

dataset_type

dataset_type: camel-photos

This is the "type" field stored in the dataset. It is also used to set the URL for searching this type of dataset.

Normal datasets would be available under the URL /dataset, but datasets with the camel_photos.json schema above would appear under /camel-photos instead.

dataset_fields, resource_fields

dataset_fields:

- field_name: title
  label: Title
  preset: title

- field_name: name
  label: URL
  preset: dataset_slug

...

Fields are specified in the order you would like them to appear in the dataset and resource editing pages.

Fields you exclude will not be shown to the end user, and will not be accepted when editing or updating this type of dataset.

Group / Organization Schema Keys

group_type

group_type: group

is used for modifying the default group schema

group_type: theme

is an example of defining a custom group type, as seen in the example schemas above

Like dataset_type, a group_type of group allows you to customize the default group schema under the URL /group, such as the modified schema in group_with_bookface.json, but a schema with a custom type such as custom_group_with_status.json schema above would appear under /theme instead, because its group_type field is set to "theme".

organization_type

organization_type: organization

is used for modifying the default organization schema

organization_type: publisher

is an example of defining a custom organization type, as seen in the example schemas above

fields

fields:

- field_name: title
  label: Name
  form_snippet: large_text.html
  form_attrs:
    data_module: slug-preview-target
  form_placeholder: My Organization

...

A single fields list replaces the dataset_fields and resource_fields schema properties doin dataset schemas.


Field Keys

field_name

The field_name value is the name of an existing CKAN dataset or resource field or a new extra field. Existing dataset field names include:

  • name - the URI for the dataset
  • title
  • notes - the dataset description
  • author
  • author_email
  • maintainer
  • maintainer_email

New field names should follow the current lowercase_with_underscores naming convention. Don't name your field mySpecialField, use my_special_field instead.

label

The label value is a human-readable label for this field as it will appear in the dataset editing form. This label may be a string or an object providing multiple language versions:

- field_name: title
  label:
    en: Title
    fr: Titre

When using a plain string translations will be provided with gettext:

- field_name: title
  label: Title

repeating_subfields

This field is the parent of group of repeating subfields. The value is a list of fields entered the same way as normal fields.

NOTE: CKAN needs an IPackageController plugin with before_index to convert repeating subfields to formats that can be indexed by solr. For testing you may use the included scheming_nerf_index plugin to encode all repeating fields as JSON strings to prevent solr errors.

repeating_label may be used to provide a singular version of the label for each group.

- field_name: contacts
  label: Contacts
  repeating_label: Contact
  repeating_subfields:

  - field_name: address
    label: Address
    required: true

  - field_name: city
    label: City

  - field_name: phone
    label: Phone Number

start_form_page

Dataset fields may be divided into separate form pages for creation and editing. CKAN 2.9+ only. Form pages for dataset type only supported by CKAN 2.10+ or with ckan/ckan#7032 . Adding start_form_page to a field marks this field as the start of a new page of fields.

- start_form_page:
    title: Detailed Metadata
    description:
      These fields improve search and give users important links

  field_name: address
  label: Address

A title and description should be provided to help with navigation. These values may be strings or objects providing multiple language versions of text.

required

  required: true

Use for fields that must be included. Set to false or don't include this key for fields that are optional.

Setting to true will mark the field as required in the editing form and include not_empty in the default validators that will be applied when validators is not specified.

NOTE: To honor this settings with custom validators include scheming_required as the first validator. scheming_required will check the required setting for this field and apply either the not_empty or ignore_missing validator.

choices

The choices list may be provided for select and multiple choice fields. List elements include labels for human-readable text for each element (may be multiple languages like a field label) and values that will be stored in the dataset or resource:

- field_name: category
  preset: select
  choices:
  - value: bactrian
    label: Bactrian Camel
  - value: hybrid
    label: Hybrid Camel

For storing non-string values see output_validators.

For required select fields you may also want to add this setting so that users are forced to choose an item in the form, otherwise the first choice will be selected in the form by default:

  form_include_blank_choice: true

To set the number of choices displayed in the multiple_select form snippets use:

  select_size: 5

To sort choices alphabetically in form and display snippets use:

  sorted_choices: true

choices_helper

If a choices list is not provided you must provide a choices_helper function that will return a list of choices in the same format as the choices list above.

You may register your own helper function or use the scheming_datastore_choices helper included in ckanext-scheming:

- field_name: country
  preset: select
  choices_helper: scheming_datastore_choices
  datastore_choices_resource: countries-resource-id-or-alias
  datastore_choices_columns:
    value: Country Code
    label: English Country Name
  datastore_additional_choices:
  - value: none
    label: None
  - value: na
    label: N/A

preset

A preset specifies a set of default values for other field keys. They allow reuse of definitions for validation and snippets for common field types.

This extension includes the following presets in presets.json:

  preset: title

title validation and large text form snippet

  preset: select

validation that choice is from choices, form select box and display snippet

  preset: radio

validation that choice is from choices, form radio buttons group and display snippet

  preset: multiple_checkbox

multiple choice from choices rendered as checkboxes in the form, stored as a list of values

  preset: multiple_select

multiple choice from choices rendered as a multiple select box in the form, stored as a list of values

  preset: multiple_text

repeating text field with add and remove buttons, stored as a list of strings

  preset: date

date validation and form snippet

  preset: datetime

date and time validation and form snippet

  preset: dataset_slug

dataset slug validation and form snippet that autofills the value from the title field

  preset: tag_string_autocomplete

tag string validation and form autocomplete

  preset: dataset_organization

organization validation and form select box

  preset: resource_url_upload

resource url validaton and link/upload form field

  preset: resource_format_autocomplete

resource format validation and form autocomplete

  preset: organization_url_upload

organization url validaton and link/upload form field format guessing based on url and autocompleting form field

  preset: json_object

JSON based input. Only JSON objects are supported. The input JSON will be loaded during output (eg when loading the dataset in a template or via the API

  preset: markdown

markdown text area and display

You may define your own presets by adding additional files to the scheming.presets configuration setting.

form_snippet

The form_snippet value is the name of the snippet template to use for this field in the dataset or resource editing form. A number of snippets are provided with this extension, but you may also provide your own by creating templates under scheming/form_snippets/ in a template directory in your own extension.

This snippet is passed the field dict containing all the keys and values in this field record, including any additional ones you added to your that aren't handled by this extension.

The included form snippets may be found under templates/scheming/form_snippets.

display_snippet

The display_snippet value is the name of the snippet template to use for this field in the dataset, resource, group or organization view page. A number of snippets are provided with this extension, but you may also provide your own by creating templates under scheming/display_snippets/ in a template directory in your own extension.

This snippet is passed the field dict containing all the keys and values in this field record, including any additional ones you added to your that aren't handled by this extension.

The included display snippets may be found under templates/scheming/display_snippets.

If display_snippet: null is used the field will be removed from the view page.

display_property

- field_name: author
  label: Author
  display_property: dc:creator

Set a property attribute on dataset fields displayed as "Additional Info", useful for adding RDF markup.

validators

The validators value is a space-separated string of validator and converter functions to use for this field when creating or updating data. When a validator name is followed by parenthesis the function is called passing the comma-separated values within as string parameters and the result is used as the validator/converter.

  validators: if_empty_same_as(name) unicode_safe

is the same as a plugin using the validators:

[get_validator('if_empty_same_as')("name"), unicode_safe]

This string does not contain arbitrary python code to be executed, you may only use registered validator functions, optionally calling them with static string values provided.

NOTE: ckanext-scheming automatically adds calls to convert_to_extras for extra fields when required.

New validators and converters may be added using the IValidators plugin interface.

Validators that need access to other values in this schema (e.g. to test values against the choices list) may be decorated with the scheming.validation.scheming_validator function. This decorator will make scheming pass this field dict to the validator and use its return value for validation of the field.

CKAN's validator functions reference lists available validators ready to be used.

output_validators

Internally all extra fields are stored as strings. If you are attempting to save and restore other types of data you will need to use output validators.

For example if you use a simple "yes/no" question, you will need to let ckanext-scheming know that this data needs to be stored and retrieved as a boolean. This is acheieved using validators and output_validators keys.

  - field_name: is_camel_friendly
    label: Is this camel friendly?
    required: true
    preset: select
    choices:
      - value: false
        label: "No"
      - value: true
        label: "Yes"
    validators: scheming_required boolean_validator
    output_validators: boolean_validator

The output_validators value is like validators but used when retrieving values from the database instead of when saving them. These validators may be used to transform the data before it is sent to the user.

NOTE: ckanext-scheming automatically adds calls to convert_from_extras for extra fields when required.

create_validators

The create_validators value if present overrides validators during create only.

help_text

  help_text: License definitions and additional information

If this key is supplied, its value will be shown after the field as help text. Help text may be provided in multiple languages like label fields.

Help text must be plain text, no markdown or HTML are allowed unless:

  help_allow_html: true

Allow HTML inside the help text if set to true. Default is false.

Adjust the position of help_text with:

  help_inline: true

Display help text inline (next to the field) if set to true. Default is false (display help text under the field).

Action API Endpoints

The extension adds action endpoints which expose any configured schemas via: https://github.com/ckan/ckanext-scheming/blob/master/ckanext/scheming/logic.py

Some examples:

Calling http://localhost:5000/api/3/action/scheming_dataset_schema_list

Returns:

{
  help: "http://localhost:5005/api/3/action/help_show?name=scheming_dataset_schema_list",
  success: true,
  result: [
    "dataset",
    "camel-photos"
  ]
}

Calling http://localhost:5000/api/3/action/scheming_dataset_schema_show?type=dataset

Returns:

{
  help: "http://localhost:5005/api/3/action/help_show?name=scheming_dataset_schema_show",
  success: true,
  result: {
    scheming_version: 2,
    dataset_type: "dataset",
    about: "A reimplementation of the default CKAN dataset schema",
    about_url: "http://github.com/ckan/ckanext-scheming",
    dataset_fields: [...],
    resource_fields: [...]
  }
}

The full list of API actions are available in ckanext/scheming/logic.py

Running the Tests

To run the tests:

pytest --ckan-ini=test.ini ckanext/scheming/tests

ckanext-scheming's People

Contributors

wardi avatar amercader avatar tktech avatar smotornyuk avatar mjanez avatar rabiasajjad avatar brew avatar laurentgoderre avatar maxfredenburgh avatar deniszgonjanin avatar jqnatividad avatar ccancellieri avatar benjaminlaot avatar boykoc avatar bzar avatar engerrs avatar roc avatar zharktas avatar jvickery-tbs avatar dsanjurjo avatar howff avatar habibayoub avatar cole-fields avatar avdata99 avatar samuelbradley avatar thriuin avatar mattfullerton avatar luketully avatar kourylape avatar fanjinfei avatar

ckanext-scheming's Issues

Feature - Improve spatial_uri URIs

Steps

  • Add generic continents

    # Geographic identifier (O)
    - field_name: spatial_uri
    label:
    en: Geographic identifier
    es: Identificador geográfico
    validators: ignore_missing
    form_snippet: select.html
    display_property: dcat:theme
    display_snippet: spatial_uris.html
    select_size: 10
    sorted_choices: true
    choices:
    - label:
    es: España
    en: Spain
    ca: España
    gl: España
    eu: España
    value: http://datos.gob.es/recurso/sector-publico/territorio/Pais/España
    - label:
    es: Andalucía
    en: Andalucía
    ca: Andalucía
    gl: Andalucía
    eu: Andalucía
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Andalucia
    - label:
    es: Almería
    en: Almería
    ca: Almería
    gl: Almería
    eu: Almería
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Almeria
    - label:
    es: Cádiz
    en: Cádiz
    ca: Cádiz
    gl: Cádiz
    eu: Cádiz
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Cadiz
    - label:
    es: Córdoba
    en: Córdoba
    ca: Córdoba
    gl: Córdoba
    eu: Córdoba
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Cordoba
    - label:
    es: Granada
    en: Granada
    ca: Granada
    gl: Granada
    eu: Granada
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Granada
    - label:
    es: Huelva
    en: Huelva
    ca: Huelva
    gl: Huelva
    eu: Huelva
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Huelva
    - label:
    es: Jaén
    en: Jaén
    ca: Jaén
    gl: Jaén
    eu: Jaén
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Jaen
    - label:
    es: Málaga
    en: Málaga
    ca: Málaga
    gl: Málaga
    eu: Málaga
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Malaga
    - label:
    es: Sevilla
    en: Sevilla
    ca: Sevilla
    gl: Sevilla
    eu: Sevilla
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Sevilla
    - label:
    es: Aragón
    en: Aragón
    ca: Aragón
    gl: Aragón
    eu: Aragón
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Aragon
    - label:
    es: Huesca
    en: Huesca
    ca: Huesca
    gl: Huesca
    eu: Huesca
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Huesca
    - label:
    es: Teruel
    en: Teruel
    ca: Teruel
    gl: Teruel
    eu: Teruel
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Teruel
    - label:
    es: Zaragoza
    en: Zaragoza
    ca: Zaragoza
    gl: Zaragoza
    eu: Zaragoza
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Zaragoza
    - label:
    es: Principado de Asturias
    en: Principado de Asturias
    ca: Principado de Asturias
    gl: Principado de Asturias
    eu: Principado de Asturias
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Principado-Asturias
    - label:
    es: Asturias
    en: Asturias
    ca: Asturias
    gl: Asturias
    eu: Asturias
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Asturias
    - label:
    es: Illes Balears
    en: Illes Balears
    ca: Illes Balears
    gl: Illes Balears
    eu: Illes Balears
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Illes-Balears
    - label:
    es: Provincia de Illes Balears
    en: Provincia de Illes Balears
    ca: Provincia de Illes Balears
    gl: Provincia de Illes Balears
    eu: Provincia de Illes Balears
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Illes-Balears
    - label:
    es: Canarias
    en: Canarias
    ca: Canarias
    gl: Canarias
    eu: Canarias
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Canarias
    - label:
    es: Las Palmas
    en: Las Palmas
    ca: Las Palmas
    gl: Las Palmas
    eu: Las Palmas
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Las-Palmas
    - label:
    es: Santa Cruz de Tenerife
    en: Santa Cruz de Tenerife
    ca: Santa Cruz de Tenerife
    gl: Santa Cruz de Tenerife
    eu: Santa Cruz de Tenerife
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Santa-Cruz-Tenerife
    - label:
    es: Cantabria
    en: Cantabria
    ca: Cantabria
    gl: Cantabria
    eu: Cantabria
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Cantabria
    - label:
    es: Provincia de Cantabria
    en: Provincia de Cantabria
    ca: Provincia de Cantabria
    gl: Provincia de Cantabria
    eu: Provincia de Cantabria
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Cantabria
    - label:
    es: Castilla y León
    en: Castilla y León
    ca: Castilla y León
    gl: Castilla y León
    eu: Castilla y León
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Castilla-Leon
    - label:
    es: Ávila
    en: Ávila
    ca: Ávila
    gl: Ávila
    eu: Ávila
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Avila
    - label:
    es: Burgos
    en: Burgos
    ca: Burgos
    gl: Burgos
    eu: Burgos
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Burgos
    - label:
    es: León
    en: León
    ca: León
    gl: León
    eu: León
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Leon
    - label:
    es: Palencia
    en: Palencia
    ca: Palencia
    gl: Palencia
    eu: Palencia
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Palencia
    - label:
    es: Salamanca
    en: Salamanca
    ca: Salamanca
    gl: Salamanca
    eu: Salamanca
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Salamanca
    - label:
    es: Segovia
    en: Segovia
    ca: Segovia
    gl: Segovia
    eu: Segovia
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Segovia
    - label:
    es: Soria
    en: Soria
    ca: Soria
    gl: Soria
    eu: Soria
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Soria
    - label:
    es: Valladolid
    en: Valladolid
    ca: Valladolid
    gl: Valladolid
    eu: Valladolid
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Valladolid
    - label:
    es: Zamora
    en: Zamora
    ca: Zamora
    gl: Zamora
    eu: Zamora
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Zamora
    - label:
    es: Castilla-La Mancha
    en: Castilla-La Mancha
    ca: Castilla-La Mancha
    gl: Castilla-La Mancha
    eu: Castilla-La Mancha
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Castilla-La-Mancha
    - label:
    es: Albacete
    en: Albacete
    ca: Albacete
    gl: Albacete
    eu: Albacete
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Albacete
    - label:
    es: Ciudad Real
    en: Ciudad Real
    ca: Ciudad Real
    gl: Ciudad Real
    eu: Ciudad Real
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Ciudad-Real
    - label:
    es: Cuenca
    en: Cuenca
    ca: Cuenca
    gl: Cuenca
    eu: Cuenca
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Cuenca
    - label:
    es: Guadalajara
    en: Guadalajara
    ca: Guadalajara
    gl: Guadalajara
    eu: Guadalajara
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Guadalajara
    - label:
    es: Toledo
    en: Toledo
    ca: Toledo
    gl: Toledo
    eu: Toledo
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Toledo
    - label:
    es: Cataluña
    en: Cataluña
    ca: Cataluña
    gl: Cataluña
    eu: Cataluña
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Cataluna
    - label:
    es: Barcelona
    en: Barcelona
    ca: Barcelona
    gl: Barcelona
    eu: Barcelona
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Barcelona
    - label:
    es: Girona
    en: Girona
    ca: Girona
    gl: Girona
    eu: Girona
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Girona
    - label:
    es: Lleida
    en: Lleida
    ca: Lleida
    gl: Lleida
    eu: Lleida
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Lleida
    - label:
    es: Tarragona
    en: Tarragona
    ca: Tarragona
    gl: Tarragona
    eu: Tarragona
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Tarragona
    - label:
    es: Comunitat Valenciana
    en: Comunitat Valenciana
    ca: Comunitat Valenciana
    gl: Comunitat Valenciana
    eu: Comunitat Valenciana
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Comunitat-Valenciana
    - label:
    es: Alicante
    en: Alicante
    ca: Alicante
    gl: Alicante
    eu: Alicante
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Alicante
    - label:
    es: Castellón
    en: Castellón
    ca: Castellón
    gl: Castellón
    eu: Castellón
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Castellon
    - label:
    es: Valencia
    en: Valencia
    ca: Valencia
    gl: Valencia
    eu: Valencia
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Valencia
    - label:
    es: Extremadura
    en: Extremadura
    ca: Extremadura
    gl: Extremadura
    eu: Extremadura
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Extremadura
    - label:
    es: Badajoz
    en: Badajoz
    ca: Badajoz
    gl: Badajoz
    eu: Badajoz
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Badajoz
    - label:
    es: Cáceres
    en: Cáceres
    ca: Cáceres
    gl: Cáceres
    eu: Cáceres
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Caceres
    - label:
    es: Galicia
    en: Galicia
    ca: Galicia
    gl: Galicia
    eu: Galicia
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Galicia
    - label:
    es: A Coruña
    en: A Coruña
    ca: A Coruña
    gl: A Coruña
    eu: A Coruña
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/A-Coruna
    - label:
    es: Lugo
    en: Lugo
    ca: Lugo
    gl: Lugo
    eu: Lugo
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Lugo
    - label:
    es: Ourense
    en: Ourense
    ca: Ourense
    gl: Ourense
    eu: Ourense
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Ourense
    - label:
    es: Pontevedra
    en: Pontevedra
    ca: Pontevedra
    gl: Pontevedra
    eu: Pontevedra
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Pontevedra
    - label:
    es: Comunidad de Madrid
    en: Comunidad de Madrid
    ca: Comunidad de Madrid
    gl: Comunidad de Madrid
    eu: Comunidad de Madrid
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Comunidad-Madrid
    - label:
    es: Madrid
    en: Madrid
    ca: Madrid
    gl: Madrid
    eu: Madrid
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Madrid
    - label:
    es: Región de Murcia
    en: Región de Murcia
    ca: Región de Murcia
    gl: Región de Murcia
    eu: Región de Murcia
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Region-Murcia
    - label:
    es: Murcia
    en: Murcia
    ca: Murcia
    gl: Murcia
    eu: Murcia
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Murcia
    - label:
    es: C. Foral de Navarra
    en: C. Foral de Navarra
    ca: C. Foral de Navarra
    gl: C. Foral de Navarra
    eu: C. Foral de Navarra
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Comunidad-Foral-Navarra
    - label:
    es: Navarra
    en: Navarra
    ca: Navarra
    gl: Navarra
    eu: Navarra
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Navarra
    - label:
    es: País Vasco
    en: País Vasco
    ca: País Vasco
    gl: País Vasco
    eu: País Vasco
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Pais-Vasco
    - label:
    es: Álava
    en: Álava
    ca: Álava
    gl: Álava
    eu: Álava
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Alava
    - label:
    es: Guipúzcoa
    en: Guipúzcoa
    ca: Guipúzcoa
    gl: Guipúzcoa
    eu: Guipúzcoa
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Guipuzcoa
    - label:
    es: Vizcaya
    en: Vizcaya
    ca: Vizcaya
    gl: Vizcaya
    eu: Vizcaya
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Vizcaya
    - label:
    es: La Rioja
    en: La Rioja
    ca: La Rioja
    gl: La Rioja
    eu: La Rioja
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/La-Rioja
    - label:
    es: Provincia de La Rioja
    en: Provincia de La Rioja
    ca: Provincia de La Rioja
    gl: Provincia de La Rioja
    eu: Provincia de La Rioja
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/La-Rioja
    - label:
    es: Ceuta
    en: Ceuta
    ca: Ceuta
    gl: Ceuta
    eu: Ceuta
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Ceuta
    - label:
    es: Provincia de Ceuta
    en: Provincia de Ceuta
    ca: Provincia de Ceuta
    gl: Provincia de Ceuta
    eu: Provincia de Ceuta
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Ceuta
    - label:
    es: Melilla
    en: Melilla
    ca: Melilla
    gl: Melilla
    eu: Melilla
    value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Melilla
    - label:
    es: Provincia de Melilla
    en: Provincia de Melilla
    ca: Provincia de Melilla
    gl: Provincia de Melilla
    eu: Provincia de Melilla
    value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Melilla
    help_text:
    en: 'Geographic coverage of the dataset. More information in <a href="http://www.boe.es/diario_boe/txt.php?id=BOE-A-2013-2380" target="_blank" rel="noopener">NTI-RISP Annex V</a>.'
    es: 'Ámbito geográfico cubierto por el conjunto de datos. Más información en el <a href="http://www.boe.es/diario_boe/txt.php?id=BOE-A-2013-2380" target="_blank" rel="noopener">Anexo V de NTI-RISP</a>.'
    help_allow_html: True

  • Add generic icon for non-spanish uris

    {%- if val in spatial_uris_list -%}
    {%- set img_url = h.url_for_static('/images/icons/theme_es/sector/spain.svg') -%}
    <li>
    <img src="{{ img_url }}" title="{{ label }}" alt="{{ label }}" class="{{ _class }}-icon"></img> <a href="{{ val }}">{{ label }}</a>
    </li>
    {%- endif -%}

DCAT-AP Info

Property URI Used for Class Vocabulary URI Vocabulary URI Usage Note
dct:spatial Catalogue, Dataset EU Vocabularies Continents Named Authority List, EU Vocabularies Countries Named Authority List, EU Vocabularies Places Named Authority List, Geonames http://publications.europa.eu/resource/authority/continent, http://publications.europa.eu/resource/authority/country, http://publications.europa.eu/resource/authority/place, http://sws.geonames.org/ The EU Vocabularies Name Authority Lists must be used for continents, countries and places that are in those lists; if a particular location is not in one of the mentioned Named Authority Lists, Geonames URIs must be used.

Feature - Migration from ckanext-facet_scheming

OpenDataGIS/ckanext-facet_scheming#7

  • Import icons from ckanext-facet_scheming.

    • theme
    • theme_es
    • spatial_uri
  • Update templates to synchronise with the new ckanext-facet_scheming definition of icon folders. templates/scheming/display_snippets/

    • themes.html
    • themes_es.html
    • spatial_uris.html
  • Create a ckan_geodcatap-facet_scheming.yaml to use with ckanext-facet_scheming and its snippets.

Feature - Create a DCAT-AP Schema (EU)

Create a new schema based on the Spanish GeoDCAT-AP YAML for an international context without the mandatory elements of the NTI-RISP standard, only DCAT-AP.

Note
Info about the latest mapping: Schema GeoDCAT-AP.

Steps to complete a ckan_geodcatap_eu.yaml version from ckan_geodcatap.yaml:

Metadata properties:

  • Update theme_es of the NTI-RISP (ES) to theme_dcat_ap (MDR Data Themes)
    # NTI-RISP Theme (M)
    ## Taxonomy [NTI-RISP Annex IV](http://www.boe.es/eli/es/res/2013/02/19/(4)/con#aniv)
    - field_name: theme_es
    label:
    en: Themes (NTI-RISP)
    es: Temáticas (NTI-RISP)
    validators: ignore_missing scheming_multiple_choice
    form_snippet: multiple_select.html
    display_property: dcat:theme
    display_snippet: themes_es.html
    select_size: 10
    required: True
    help_text:
    en: '<a href="http://www.boe.es/eli/es/res/2013/02/19/(4)/con#aniv" target="_blank" rel="noopener">Themes</a> (NTI-RISP Annex IV)'
    es: '<a href="http://www.boe.es/eli/es/res/2013/02/19/(4)/con#aniv" target="_blank" rel="noopener">Temáticas</a> (Anexo IV NTI-RISP)'
    help_allow_html: True
    sorted_choices: true
    choices:
    - value: http://datos.gob.es/kos/sector-publico/sector/ciencia-tecnologia
    notation: ciencia-tecnologia
    label:
    en: Science and technology
    es: Ciencia y tecnología
    ca: Ciència i tecnologia
    gl: Ciencia e tecnoloxía
    eu: Zientzia eta teknologia
    description:
    en: ''
    es: 'Incluye: Innovación, Investigación, I/u002BD/u002BI, Telecomunicaciones,
    Inernet y Sociedad de la Información.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/TECH
    - value: http://datos.gob.es/kos/sector-publico/sector/comercio
    notation: comercio
    label:
    en: Commerce
    es: Comercio
    ca: Comerç
    gl: Comercio
    eu: Merkataritza
    description:
    en: ''
    es: 'Incluye: Consumo.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
    - value: http://datos.gob.es/kos/sector-publico/sector/cultura-ocio
    notation: cultura-ocio
    label:
    en: Culture and leisure
    es: Cultura y ocio
    ca: Cultura i lleure
    gl: Cultura e lecer
    eu: Kultura eta aisia
    description:
    en: ''
    es: 'Incluye: Tiempo libre.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/EDUC
    - value: http://datos.gob.es/kos/sector-publico/sector/demografia
    notation: demografia
    label:
    en: Demography
    es: Demografía
    ca: Demografia
    gl: Demografía
    eu: Demografia
    description:
    en: ''
    es: 'Incluye: Inmigración y Emigración, Familia, Mujeres, Infancia, Mayores,
    Padrón.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/SOCI
    - value: http://datos.gob.es/kos/sector-publico/sector/deporte
    notation: deporte
    label:
    en: Sport
    es: Deporte
    ca: Esport
    gl: Deporte
    eu: Kirola
    description:
    en: ''
    es: 'Incluye: Instalaciones deportivas, Federaciones, Competiciones.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/EDUC
    - value: http://datos.gob.es/kos/sector-publico/sector/economia
    notation: economia
    label:
    en: Economy
    es: Economía
    ca: Economia
    gl: Economía
    eu: Ekonomia
    description:
    en: ''
    es: 'Incluye: Deuda, Moneda y Banca y finanzas.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
    - value: http://datos.gob.es/kos/sector-publico/sector/educacion
    notation: educacion
    label:
    en: Education
    es: Educación
    ca: Educació
    gl: Educación
    eu: Hezkuntza
    description:
    en: ''
    es: 'Incluye: Formación.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/EDUC
    - value: http://datos.gob.es/kos/sector-publico/sector/empleo
    notation: empleo
    label:
    en: Employment
    es: Empleo
    ca: Ocupació
    gl: Emprego
    eu: Enplegua
    description:
    en: ''
    es: 'Incluye: Trabajo, Mercado laboral.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
    - value: http://datos.gob.es/kos/sector-publico/sector/energia
    notation: energia
    label:
    en: Energy
    es: Energía
    ca: Energia
    gl: Enerxía
    eu: Energia
    description:
    en: ''
    es: 'Incluye: Fuentes renovables.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ENER
    - value: http://datos.gob.es/kos/sector-publico/sector/hacienda
    notation: hacienda
    label:
    en: Treasury
    es: Hacienda
    ca: Hisenda
    gl: Facenda
    eu: Ogasuna
    description:
    en: ''
    es: 'Incluye: Impuestos.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/GOVE
    - value: http://datos.gob.es/kos/sector-publico/sector/industria
    notation: industria
    label:
    en: Industry
    es: Industria
    ca: Indústria
    gl: Industria
    eu: Industria
    description:
    en: ''
    es: 'Incluye: Minería.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
    - value: http://datos.gob.es/kos/sector-publico/sector/legislacion-justicia
    notation: legislacion-justicia
    label:
    en: Legislation and justice
    es: Legislación y justicia
    ca: Legislació i justícia
    gl: Lexislación e xustiza
    eu: Legegintza eta justizia
    description:
    en: ''
    es: 'Incluye: Registros.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/JUST
    - value: http://datos.gob.es/kos/sector-publico/sector/medio-ambiente
    notation: medio-ambiente
    label:
    en: Environment
    es: Medio ambiente
    ca: Medi ambient
    gl: Medio ambiente
    eu: Ingurumena
    description:
    en: ''
    es: 'Incluye: Meteorología, Geografía, Conservación fauna y flora.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ENVI
    - value: http://datos.gob.es/kos/sector-publico/sector/medio-rural-pesca
    notation: medio-rural-pesca
    label:
    en: Rural environment
    es: Medio Rural
    ca: Medi rural
    gl: Medio rural
    eu: Nekazaritza
    description:
    en: ''
    es: 'Incluye: Agricultura, Ganadería, Pesca y Silvicultura.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/AGRI
    - value: http://datos.gob.es/kos/sector-publico/sector/salud
    notation: salud
    label:
    en: Healthcare
    es: Salud
    ca: Salut
    gl: Saúde
    eu: Osasuna
    description:
    en: ''
    es: 'Incluye: Sanidad.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/HEAL
    - value: http://datos.gob.es/kos/sector-publico/sector/sector-publico
    notation: sector-publico
    label:
    en: Public sector
    es: Sector público
    ca: Sector públic
    gl: Sector público
    eu: Sektore publikoa
    description:
    en: ''
    es: 'Incluye: Presupuestos, Organigrama institucional, Legislación interna,
    Función pública.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/GOVE
    - value: http://datos.gob.es/kos/sector-publico/sector/seguridad
    notation: seguridad
    label:
    en: Security
    es: Seguridad
    ca: Seguretat
    gl: Seguridade
    eu: Segurtasuna
    description:
    en: ''
    es: 'Incluye: Protección civil, Defensa.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/JUST
    - value: http://datos.gob.es/kos/sector-publico/sector/sociedad-bienestar
    notation: sociedad-bienestar
    label:
    en: Society and welfare
    es: Sociedad y bienestar
    ca: Societat i benestar
    gl: Sociedade e benestar
    eu: Gizartea eta ongizatea
    description:
    en: ''
    es: 'Incluye: Participación ciudadana, Marginación, Envejecimiento Activo, Autonomía
    personal y Dependencia, Invalidez, Jubilación, Seguros y Pensiones, Prestaciones
    y Subvenciones.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/SOCI
    - value: http://datos.gob.es/kos/sector-publico/sector/transporte
    notation: transporte
    label:
    en: Transport
    es: Transporte
    ca: Transport
    gl: Transporte
    eu: Garraioa
    description:
    en: ''
    es: 'Incluye: Comunicaciones y Tr/u00E1fico.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/TRAN
    - value: http://datos.gob.es/kos/sector-publico/sector/turismo
    notation: turismo
    label:
    en: Tourism
    es: Turismo
    ca: Turisme
    gl: Turismo
    eu: Turismoa
    description:
    en: ''
    es: 'Incluye: Alojamientos, Hostelería, Gastronomía.'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/ECON
    - value: http://datos.gob.es/kos/sector-publico/sector/urbanismo-infraestructuras
    notation: urbanismo-infraestructuras
    label:
    en: Town planning and infrastructures
    es: Urbanismo e infraestructuras
    ca: Urbanisme i infraestructures
    gl: Urbanismo e infraestruturas
    eu: Hirigintza eta azpiegiturak
    description:
    en: ''
    es: 'Incluye: Saneamiento público, Construcción (infraestructuras, equipamientos
    públicos).'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/REGI
    - value: http://datos.gob.es/kos/sector-publico/sector/vivienda
    notation: vivienda
    label:
    en: Housing
    es: Vivienda
    ca: Habitatge
    gl: Vivenda
    eu: Etxebizitza
    description:
    en: ''
    es: 'Incluye: Mercado inmobiliario, Construcción (viviendas).'
    ca: ''
    gl: ''
    eu: ''
    dcat_ap: http://publications.europa.eu/resource/authority/data-theme/REGI
  • Update multi-value from codelist spatial_uri of the NTI-RISP (ES) to a stored as text value. For example to use geonames values: https://www.geonames.org/2510769/kingdom-of-spain.html

    dct:spatial

    Vocabs: DR Continents Named Authority List , MDR Countries Named Authority List , MDR Places Named Authority List , Geonames.

    Definition: The MDR Name Authority Lists must be used for continents, countries and places that are in those lists; if a particular location is not in one of the mentioned Named Authority Lists, Geonames URIs must be used.

    DCAT-AP

- field_name: spatial_uri
label:
en: Geographic identifier
es: Identificador geográfico
validators: ignore_missing
form_snippet: select.html
display_property: dcat:theme
display_snippet: spatial_uris.html
select_size: 10
sorted_choices: true
choices:
- label:
es: España
en: Spain
ca: España
gl: España
eu: España
value: http://datos.gob.es/recurso/sector-publico/territorio/Pais/España
- label:
es: Andalucía
en: Andalucía
ca: Andalucía
gl: Andalucía
eu: Andalucía
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Andalucia
- label:
es: Almería
en: Almería
ca: Almería
gl: Almería
eu: Almería
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Almeria
- label:
es: Cádiz
en: Cádiz
ca: Cádiz
gl: Cádiz
eu: Cádiz
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Cadiz
- label:
es: Córdoba
en: Córdoba
ca: Córdoba
gl: Córdoba
eu: Córdoba
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Cordoba
- label:
es: Granada
en: Granada
ca: Granada
gl: Granada
eu: Granada
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Granada
- label:
es: Huelva
en: Huelva
ca: Huelva
gl: Huelva
eu: Huelva
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Huelva
- label:
es: Jaén
en: Jaén
ca: Jaén
gl: Jaén
eu: Jaén
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Jaen
- label:
es: Málaga
en: Málaga
ca: Málaga
gl: Málaga
eu: Málaga
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Malaga
- label:
es: Sevilla
en: Sevilla
ca: Sevilla
gl: Sevilla
eu: Sevilla
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Sevilla
- label:
es: Aragón
en: Aragón
ca: Aragón
gl: Aragón
eu: Aragón
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Aragon
- label:
es: Huesca
en: Huesca
ca: Huesca
gl: Huesca
eu: Huesca
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Huesca
- label:
es: Teruel
en: Teruel
ca: Teruel
gl: Teruel
eu: Teruel
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Teruel
- label:
es: Zaragoza
en: Zaragoza
ca: Zaragoza
gl: Zaragoza
eu: Zaragoza
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Zaragoza
- label:
es: Principado de Asturias
en: Principado de Asturias
ca: Principado de Asturias
gl: Principado de Asturias
eu: Principado de Asturias
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Principado-Asturias
- label:
es: Asturias
en: Asturias
ca: Asturias
gl: Asturias
eu: Asturias
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Asturias
- label:
es: Illes Balears
en: Illes Balears
ca: Illes Balears
gl: Illes Balears
eu: Illes Balears
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Illes-Balears
- label:
es: Provincia de Illes Balears
en: Provincia de Illes Balears
ca: Provincia de Illes Balears
gl: Provincia de Illes Balears
eu: Provincia de Illes Balears
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Illes-Balears
- label:
es: Canarias
en: Canarias
ca: Canarias
gl: Canarias
eu: Canarias
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Canarias
- label:
es: Las Palmas
en: Las Palmas
ca: Las Palmas
gl: Las Palmas
eu: Las Palmas
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Las-Palmas
- label:
es: Santa Cruz de Tenerife
en: Santa Cruz de Tenerife
ca: Santa Cruz de Tenerife
gl: Santa Cruz de Tenerife
eu: Santa Cruz de Tenerife
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Santa-Cruz-Tenerife
- label:
es: Cantabria
en: Cantabria
ca: Cantabria
gl: Cantabria
eu: Cantabria
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Cantabria
- label:
es: Provincia de Cantabria
en: Provincia de Cantabria
ca: Provincia de Cantabria
gl: Provincia de Cantabria
eu: Provincia de Cantabria
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Cantabria
- label:
es: Castilla y León
en: Castilla y León
ca: Castilla y León
gl: Castilla y León
eu: Castilla y León
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Castilla-Leon
- label:
es: Ávila
en: Ávila
ca: Ávila
gl: Ávila
eu: Ávila
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Avila
- label:
es: Burgos
en: Burgos
ca: Burgos
gl: Burgos
eu: Burgos
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Burgos
- label:
es: León
en: León
ca: León
gl: León
eu: León
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Leon
- label:
es: Palencia
en: Palencia
ca: Palencia
gl: Palencia
eu: Palencia
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Palencia
- label:
es: Salamanca
en: Salamanca
ca: Salamanca
gl: Salamanca
eu: Salamanca
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Salamanca
- label:
es: Segovia
en: Segovia
ca: Segovia
gl: Segovia
eu: Segovia
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Segovia
- label:
es: Soria
en: Soria
ca: Soria
gl: Soria
eu: Soria
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Soria
- label:
es: Valladolid
en: Valladolid
ca: Valladolid
gl: Valladolid
eu: Valladolid
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Valladolid
- label:
es: Zamora
en: Zamora
ca: Zamora
gl: Zamora
eu: Zamora
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Zamora
- label:
es: Castilla-La Mancha
en: Castilla-La Mancha
ca: Castilla-La Mancha
gl: Castilla-La Mancha
eu: Castilla-La Mancha
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Castilla-La-Mancha
- label:
es: Albacete
en: Albacete
ca: Albacete
gl: Albacete
eu: Albacete
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Albacete
- label:
es: Ciudad Real
en: Ciudad Real
ca: Ciudad Real
gl: Ciudad Real
eu: Ciudad Real
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Ciudad-Real
- label:
es: Cuenca
en: Cuenca
ca: Cuenca
gl: Cuenca
eu: Cuenca
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Cuenca
- label:
es: Guadalajara
en: Guadalajara
ca: Guadalajara
gl: Guadalajara
eu: Guadalajara
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Guadalajara
- label:
es: Toledo
en: Toledo
ca: Toledo
gl: Toledo
eu: Toledo
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Toledo
- label:
es: Cataluña
en: Cataluña
ca: Cataluña
gl: Cataluña
eu: Cataluña
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Cataluna
- label:
es: Barcelona
en: Barcelona
ca: Barcelona
gl: Barcelona
eu: Barcelona
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Barcelona
- label:
es: Girona
en: Girona
ca: Girona
gl: Girona
eu: Girona
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Girona
- label:
es: Lleida
en: Lleida
ca: Lleida
gl: Lleida
eu: Lleida
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Lleida
- label:
es: Tarragona
en: Tarragona
ca: Tarragona
gl: Tarragona
eu: Tarragona
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Tarragona
- label:
es: Comunitat Valenciana
en: Comunitat Valenciana
ca: Comunitat Valenciana
gl: Comunitat Valenciana
eu: Comunitat Valenciana
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Comunitat-Valenciana
- label:
es: Alicante
en: Alicante
ca: Alicante
gl: Alicante
eu: Alicante
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Alicante
- label:
es: Castellón
en: Castellón
ca: Castellón
gl: Castellón
eu: Castellón
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Castellon
- label:
es: Valencia
en: Valencia
ca: Valencia
gl: Valencia
eu: Valencia
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Valencia
- label:
es: Extremadura
en: Extremadura
ca: Extremadura
gl: Extremadura
eu: Extremadura
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Extremadura
- label:
es: Badajoz
en: Badajoz
ca: Badajoz
gl: Badajoz
eu: Badajoz
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Badajoz
- label:
es: Cáceres
en: Cáceres
ca: Cáceres
gl: Cáceres
eu: Cáceres
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Caceres
- label:
es: Galicia
en: Galicia
ca: Galicia
gl: Galicia
eu: Galicia
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Galicia
- label:
es: A Coruña
en: A Coruña
ca: A Coruña
gl: A Coruña
eu: A Coruña
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/A-Coruna
- label:
es: Lugo
en: Lugo
ca: Lugo
gl: Lugo
eu: Lugo
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Lugo
- label:
es: Ourense
en: Ourense
ca: Ourense
gl: Ourense
eu: Ourense
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Ourense
- label:
es: Pontevedra
en: Pontevedra
ca: Pontevedra
gl: Pontevedra
eu: Pontevedra
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Pontevedra
- label:
es: Comunidad de Madrid
en: Comunidad de Madrid
ca: Comunidad de Madrid
gl: Comunidad de Madrid
eu: Comunidad de Madrid
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Comunidad-Madrid
- label:
es: Madrid
en: Madrid
ca: Madrid
gl: Madrid
eu: Madrid
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Madrid
- label:
es: Región de Murcia
en: Región de Murcia
ca: Región de Murcia
gl: Región de Murcia
eu: Región de Murcia
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Region-Murcia
- label:
es: Murcia
en: Murcia
ca: Murcia
gl: Murcia
eu: Murcia
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Murcia
- label:
es: C. Foral de Navarra
en: C. Foral de Navarra
ca: C. Foral de Navarra
gl: C. Foral de Navarra
eu: C. Foral de Navarra
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Comunidad-Foral-Navarra
- label:
es: Navarra
en: Navarra
ca: Navarra
gl: Navarra
eu: Navarra
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Navarra
- label:
es: País Vasco
en: País Vasco
ca: País Vasco
gl: País Vasco
eu: País Vasco
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Pais-Vasco
- label:
es: Álava
en: Álava
ca: Álava
gl: Álava
eu: Álava
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Alava
- label:
es: Guipúzcoa
en: Guipúzcoa
ca: Guipúzcoa
gl: Guipúzcoa
eu: Guipúzcoa
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Guipuzcoa
- label:
es: Vizcaya
en: Vizcaya
ca: Vizcaya
gl: Vizcaya
eu: Vizcaya
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Vizcaya
- label:
es: La Rioja
en: La Rioja
ca: La Rioja
gl: La Rioja
eu: La Rioja
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/La-Rioja
- label:
es: Provincia de La Rioja
en: Provincia de La Rioja
ca: Provincia de La Rioja
gl: Provincia de La Rioja
eu: Provincia de La Rioja
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/La-Rioja
- label:
es: Ceuta
en: Ceuta
ca: Ceuta
gl: Ceuta
eu: Ceuta
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Ceuta
- label:
es: Provincia de Ceuta
en: Provincia de Ceuta
ca: Provincia de Ceuta
gl: Provincia de Ceuta
eu: Provincia de Ceuta
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Ceuta
- label:
es: Melilla
en: Melilla
ca: Melilla
gl: Melilla
eu: Melilla
value: http://datos.gob.es/recurso/sector-publico/territorio/Autonomia/Melilla
- label:
es: Provincia de Melilla
en: Provincia de Melilla
ca: Provincia de Melilla
gl: Provincia de Melilla
eu: Provincia de Melilla
value: http://datos.gob.es/recurso/sector-publico/territorio/Provincia/Melilla
help_text:
en: 'Geographic coverage of the dataset. More information in <a href="http://www.boe.es/diario_boe/txt.php?id=BOE-A-2013-2380" target="_blank" rel="noopener">NTI-RISP Annex V</a>.'
es: 'Ámbito geográfico cubierto por el conjunto de datos. Más información en el <a href="http://www.boe.es/diario_boe/txt.php?id=BOE-A-2013-2380" target="_blank" rel="noopener">Anexo V de NTI-RISP</a>.'
help_allow_html: True

  • Add european languages from MDR Authority Language
    - field_name: language
    label:
    en: Metadata language
    es: Idioma de los metadatos
    preset: select
    display_property: dct:language
    display_snippet: link_schema.html
    form_include_blank_choice: False
    validators: not_empty scheming_required
    required: true
    sorted_choices: true
    choices:
    - label:
    en: Spanish
    es: Español
    value: http://publications.europa.eu/resource/authority/language/SPA
    - label:
    en: English
    es: Inglés
    value: http://publications.europa.eu/resource/authority/language/ENG

Feature - Add graphic_overview element to GeoDCAT-AP Schema

Context info

Description:
Graphic that provides an illustration of the dataset

  • Pygeometa MCF Core schema

  • XML Schema ISO19139 gmd:graphicOverview:

    <gmd:identificationInfo>
    ...
      <gmd:graphicOverview>
        <gmd:MD_BrowseGraphic>
          <gmd:fileName>
            <gco:CharacterString>{{ record['identification']['browsegraphic']|e }}</gco:CharacterString>
            </gmd:fileName>
        </gmd:MD_BrowseGraphic>
      </gmd:graphicOverview>
    </gmd:identificationInfo>

Tasks

Basic

- field_name: graphic_overview
  label:
    en: Graphic overview of the dataset
    es: Descripción gráfica del conjunto de datos
  display_snippet: link_name.html
  form_placeholder: http://example.com/dataset.jpg
  help_text:
    en: "Graphic that provides an illustration of the dataset."
    es: "Gráfico que ilustra el conjunto de datos."

Enhancements

Feature - Download buttons RDF/ISO19139 metadata

RDF,TTL, RDF-XML semantic metadata and XML (ISO191139 if exists).

Currently, ckanext-scheming extension provides a great way to customize metadata fields and schema for CKAN data portals. However, there is no straightforward way to download metadata in RDF, XML, TTL, RDF-XML formats in the dataset page (only the URI endpoints i.e: https://example.org/dataset_id.ttl) . This feature would be extremely useful for data publishers and users who want to integrate CKAN metadata with other tools or systems.

The download buttons should be easily accessible on the metadata page and should allow users to download metadata in their desired format instead of add as distributions in the dataset page.

This feature would greatly enhance the usability and interoperability of CKAN data portals, making it easier for users to work with CKAN metadata in a variety of contexts.

Enhancement - Migrate JSON Lists to Object Lists

Migrating JSON lists to object lists in ckanext-scheming may be necessary for several reasons. Here are some common reasons:

  1. Data validation: CKAN uses ckanext-scheming to validate the data that is entered into a dataset. If a JSON list field is not validated properly, it can be difficult to verify and validate, which can lead to errors and incorrect data. By migrating to an object list, it is possible to define a more specific structure for the list, which makes validation easier and reduces the likelihood of errors.

  2. Compatibility with other tools: Some analysis and visualization tools may require data to be presented in an object list rather than a JSON list. By migrating to an object list, you ensure that the data is compatible with a variety of tools.

  3. Flexibility in data structure: JSON lists have a flexible structure, which means there is no defined structure for each element in the list. By migrating to an object list, a more specific structure can be defined for each element in the list, which can make it easier to work with the data and derive meaningful insights from it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.