Extension Taxonomy


Extension Basics

Title
Taxonomy
Name
ckanext-taxonomy
Type
Public extension
Description
CKAN extension providing hierarchical tag support with taxonomies, including SKOS import and URI-based term management as an alternative to CKAN's built-in tag vocabularies.
CKAN versions
Download-Url (zip)
Last commit
10 years ago (2015-07-21 00:00:00)
Url to repo
Category
Data Management & Quality


Background Infos

Description (long)
Show details

ckanext-taxonomy

Hierarchical tags.

The current support for tag vocabularies in CKAN is rather limited, and this extension provides an alternative implementation of tags, or more accurately terms where: - Terms belong to a taxonomy which is a simple named entity - Terms can have child terms and parent terms so that they are hierarchical - Terms have a name, but also a URI, and a title which is the display string - Terms and taxonomies can be generated from SKOS data

Information about the API is available in API.md

Installation

  1. Install the code:

    cd /usr/lib/ckan/default/src
    git clone https://github.com/datagovuk/ckanext-taxonomy.git
    cd ckanext-taxonomy
    python setup.py install
    

    NB you should not use pip install -e to install it, since that appears to install the copy of python-skos from PyPI when it should install the DGU version.

  2. Add taxonomy to your ckan.plugins setting in your ckan.ini file

  3. Setup the database for taxonomies: paster taxonomy init -c <PATH-TO-CONFIG>

Running Tests

cd ckanext-taxonomy
nosetests . --with-pylons=test-core.ini

Importing a SKOS Document

WARNING: Importing will currently delete an existing taxonomy if it exists with the same name.

Import DGU themes:

paster taxonomy load --filename dgu-themes.rdf --name dgu --title "DGU Themes" --uri "http://data.gov.uk/themes"

Importing cofog from a file:

paster taxonomy load --filename COFOG.rdf --name cofog --title cofog --uri "http://unstats.un.org/unsd/cr/registry/regcst.asp?Cl=4"

Importing from a url:

paster taxonomy load --url http://..../COFOG.rdf --name cofog --title cofog --uri "..."

Removing Taxonomy

  1. Run paster --plugin=ckanext-taxonomy cleanup -c <PATH-TO-CONFIG> to remove the database tables
  2. Remove taxonomy from your plugins section in ckan.ini

License

AGPL-3.0 (Crown Copyright)

Version
1.0
Version release date
(not set)
Contact name
Ross Jones
Contakt email
Contact Url
(not set)


Installation Guide

Configuration hints

Archived repository. Requires python-skos (DGU version). DB initialization required. Use python setup.py install, NOT pip install -e.

Plugins to configure (ckan.ini)
taxonomy
CKAN Settings (ckan.ini)
DB migration to be executed
paster taxonomy init -c <PATH-TO-CONFIG>
<< back to Extensions