Install the extension:
source /home/www-data/pyenv/bin/activate
pip install -e git+https://github.com/liip/ckanext-ddi.git#egg=ckanext-ddi –src /home/www-data
cd /home/www-data/ckanext-ddi
pip install -r requirements.txt
python setup.py develop
Enable plugins in your config file:
ckan.plugins = ddi_schema ddi_theme nada_harvester
Note: Omit ddi_theme if you don’t want the frontend part.
Configuration options:
Path to DDI-specific YAML configuration file (required)
ckanext.ddi.config_file = /path/to/my/config.yml
Default license for all DDI imports if not specified
ckanext.ddi.default_license = CC0-1.0
Allow duplicate datasets (default: False)
Duplicates determined by unique id_number attribute
ckanext.ddi.allow_duplicates = True
Override existing datasets on import (default: False)
If True, existing datasets are updated; if False, new ones created
ckanext.ddi.override_datasets = False
DDI configuration file (YAML) structure:
sections:
identification: Identification
overview: Overview
contact: Contact information
vocabularies:
kind_of_data:
- Sample survey data [ssd]
- Census/enumeration data [cen]
- Administrative records data [adm]
fields:
identification:
title:
type: text
visible: False
display: Title
url:
type: url
display_field: title
visible: True
display: Source
overview:
abstract:
type: markdown
visible: True
display: Abstract
Command line import:
paster –plugin=ckanext-ddi ddi import [] -c
NADA harvester configuration (JSON):
{
“user”: “harvest”,
“access_type”: “public_use”,
“license”: “CC-BY-SA-4.0”
}
Access types: “” (all), “direct_access”, “public_use” (default), “licensed”, “data_enclave”, “data_external”, “no_data_available”, “open_data”
Requires ckanext-harvest for NADA harvester functionality.