ckanext-topics
Topics and subtopics for classifying datasets in CKAN. Tested for CKAN 2.7.2
Features
This extension provides mechanisms for classifying your datasets in a hierarchy of topics and subtopics. This topics will appear under the Additional info of the dataset:

Topics and subtopics can be assigned to a datasets in its edit page. The available subtopics will be filtered by the selected topic:

Then you can filter search results by a specific topic or subtopic:

Sysadmins can view the complete list of topics and edit them:


Reordering of topics and subtopics is available, but is a bit tedious to do (see Limitations and tradeoffs)
Limitations and tradeoffs
When we started the implementation of this features, we had two possible approaches:
- Create a new model to support topics and subtopics, with the associated complexity of managing database migrations, taking care of the faceted search etc.
- Adapt existing CKAN features for this purpose. In this case Tag Vocabularies
We opted for 2, which had the following advantages and disadvantages:
Advantages
- We didn’t have to bother about adding a new model to CKAN, creating its database table, indexing this new model in Solr etc.
- Faceted search was pretty easy to implement.
Disadvantages
The Tag Vocabularies feature is not prepared to support making a hierarchy of them, nor ordering. We have two tag vocabularies, one for topics and other for subtopics:
“`
ckan_default=# select * from vocabulary;
id | name
————————————–+——————
69f6965b-5fb1-4736-b4