The Topic Taxonomy is a classification scheme for organising and finding content on GOV.UK, based on its subject area.
Not to be confused with the Topics published throught Collections Publisher.
Editing the Topic Taxonomy
The taxonomy is managed in content-tagger. Users must have the “GDS Editor” permission in content-tagger in order to see the relevent pages.
The topics in the taxonomy (we call them “taxons” in code) are persisted in the publishing-api as content items. For an example see the “Education” taxon.
This means that taxons inherit the publishing-api workflow, and can be in either draft state or published.
The link type
parent_taxons is used to store the relationship
between taxons. A reverse link called
child_taxons is setup through the publishing-api.
There is no technical limit in what can be tagged to the taxonomy, but not every type of content in the publishing-api is suitable for tagging to the taxonomy.
Content Tagger has a generic interface for tagging content to the taxonomy.
Pages that belong to selected organisations (like those related to the education theme) can be tagged to the taxonomy in Whitehall.
The relationship between a page and a taxon is persisted in the publishing-api “links hash”. For example, see the taxons link in the content item for this guidance document.
Accessing the taxonomy
The level one taxons are associated with the GOV.UK home page through
level_one_taxons link type.
This is the content item for the top-level “Education” taxon:
You can use this to find the structure of the taxonomy by following
Accessing tagged content
You can fetch content tagged to a particular taxon from the Search API (rummager).
This works with a
content_id rather than URL. To find all content
tagged to the above mentioned “Education taxon”:
You can also access all content tagged to a taxon and the part of the taxonomy below it. The following will give you everything tagged to topics in the “Education” taxonomy:
You can see the number of documents in each topic by using
High level metrics regarding the taxonomy are recorded in Graphite, and can be looked at through a Grafana dashboard.
A rake task in Content Tagger is run through the deploy Jenkins every 30 minutes to push metrics to Graphite (via StatsD).