{% import "macros.html" as mc %}

Added concepts

The table below lists the added concepts

{% set select_query = "prefix owl: prefix rdf: prefix rdfs: prefix xsd: prefix vb: prefix eurovoc: prefix euvoc: prefix label: prefix status: prefix align: prefix skos: prefix skosxl: prefix dct: prefix dc: prefix prov: prefix lemon: prefix lexinfo: prefix lexvo: prefix oldevo: prefix thes: PREFIX dsv: PREFIX sd: PREFIX sh: PREFIX xhv: SELECT distinct ?class (?instance AS ?addedInstance) (str(?prefLabel) AS ?addedInstanceLabel) WHERE { GRAPH ?versionHistoryGraph { VALUES ( ?versionHistoryGraph ?oldVersion ?newVersion ?class ?language ) { ( undef undef undef skos:Concept 'en' ) } ?versionset dsv:currentVersionRecord/xhv:prev/dc:identifier ?previousVersion . ?versionset dsv:currentVersionRecord/dc:identifier ?latestVersion . BIND(coalesce(?oldVersion, ?previousVersion) AS ?oldVersionSelected) BIND(coalesce(?newVersion, ?latestVersion) AS ?newVersionSelected) ?delta a sh:SchemeDelta ; sh:deltaFrom/dc:identifier ?oldVersionSelected ; sh:deltaTo/dc:identifier ?newVersionSelected ; sh:deltaFrom/sh:usingNamedGraph/sd:name ?oldVersionGraph ; sh:deltaTo/sh:usingNamedGraph/sd:name ?newVersionGraph . ?insertions a sh:SchemeDeltaInsertions ; dct:isPartOf ?delta ; sh:usingNamedGraph/sd:name ?insertionsGraph . ?deletions a sh:SchemeDeltaDeletions ; dct:isPartOf ?delta ; sh:usingNamedGraph/sd:name ?deletionsGraph . } GRAPH ?insertionsGraph { ?instance a ?class . optional { ?instance skos:prefLabel ?prefLabel . FILTER (lang(?prefLabel) = 'en') } } FILTER NOT EXISTS { GRAPH ?oldVersionGraph { ?instance ?p [] . } } } ORDER BY ?instance" %} {% set content, error = from_endpoint(conf.default_endpoint).with_query(select_query).fetch_tabular() %} {% call mc.render_fetch_results(content, error) %} {% set substituted_content = replace_strings_in_tabular(content, target_columns=['class', 'addedInstance'], value_mapping_dict=inverted_prefixes, mark_touched_rows=False ) %} {# TODO: need a function that adds a relative count column, so that we can see the percentage of classes #} {# {{ content["percentage"] = content["instances"] / content["instances"].sum() }}#} {{ mc.pandas_table(content, "Overview") }} {% endcall %} {# TODO: class instiatiation overlaps and # shared instances #} {# TODO: need for an agregation function over selected columns in a dataframe #}