Skip to content

Commit

Permalink
Added KPI figures (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
margaretha committed Mar 10, 2023
1 parent d803374 commit 6234f8b
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 80 deletions.
12 changes: 12 additions & 0 deletions SIS/clarin/model/centre.xqm
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,15 @@ let $flat :=

return fn:distinct-values($flat)
};

declare function centre:get-centre-by-research-infrastructure($ri as xs:string,
$status as xs:string){
for $c in $centre:centres[nodeInfo/ri=$ri]
let $c-status := $c/nodeInfo/ri/@status
return
if (contains($c-status,$status))
then $c
else ()


};
17 changes: 17 additions & 0 deletions SIS/clarin/modules/centre.xql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ declare function cm:get-centre($id) {
centre:get-centre($id)
};

declare function cm:get-centre-by-research-infrastructure($ri as xs:string, $status as xs:string) {
centre:get-centre-by-research-infrastructure($ri,$status)
};

declare function cm:count-number-of-centres-with-recommendations($centres){
let $centre-with-recommendations :=
for $c in $centres
let $recommendations := cm:get-recommendations(data($c/@id))
let $numOfRecommendations := count($recommendations/formats/format)
return
if ($numOfRecommendations >0)
then 1
else 0

return sum($centre-with-recommendations)
};

declare function cm:getLastUpdateCommitId($id){
let $recommendation := recommendation:get-recommendations-for-centre($id)
let $commitId := $recommendation/header/lastUpdateCommitID/text()
Expand Down
11 changes: 11 additions & 0 deletions SIS/clarin/resources/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ body {
color:#333;
font-family:helvetica,arial,sans-serif;
font-size:13px;
line-height:1.4;
}

div#all {
Expand Down Expand Up @@ -55,6 +56,10 @@ ul.column {
column-gap: 20px;
}

li{
margin-bottom:5px;
}

.button{
margin-top:5px;
border: 1px #CCCCCC solid;
Expand Down Expand Up @@ -262,6 +267,12 @@ th {
border-bottom-color:black;
}

.column{
border: 1px solid lightgrey;
padding:5px;
vertical-align:top;
}

.row{
border-bottom:1px solid #DDDDDD;
text-align:left;
Expand Down
174 changes: 94 additions & 80 deletions SIS/clarin/views/kpi.xq
Original file line number Diff line number Diff line change
Expand Up @@ -5,96 +5,110 @@ declare option exist:serialize "method=xhtml media-type=text/html indent=yes doc

import module namespace menu = "http://clarin.ids-mannheim.de/standards/menu" at "../modules/menu.xql";
import module namespace app = "http://clarin.ids-mannheim.de/standards/app" at "../modules/app.xql";
import module namespace stm = "http://clarin.ids-mannheim.de/standards/statistics-module" at "../modules/statistics.xql";
import module namespace format = "http://clarin.ids-mannheim.de/standards/format" at "../model/format.xqm";
import module namespace domain = "http://clarin.ids-mannheim.de/standards/domain" at "../model/domain.xqm";
import module namespace cm = "http://clarin.ids-mannheim.de/standards/centre-module" at "../modules/centre.xql";
import module namespace rf = "http://clarin.ids-mannheim.de/standards/recommended-formats" at "../modules/recommended-formats.xql";

(:
@author margaretha
@author margaretha, banski
:)

let $reset := request:get-parameter('reset', '')
let $threshold := if ($reset) then (1) else request:get-parameter('threshold', 1)
let $top3 := if ($reset) then () else request:get-parameter('top3', '')
return

let $B-centres := cm:get-centre-by-research-infrastructure("CLARIN","B-centre")
let $numOfBCentres := fn:count($B-centres)
let $numOfBCentresWithRecommendations := cm:count-number-of-centres-with-recommendations($B-centres)
let $percentage := format-number($numOfBCentresWithRecommendations div $numOfBCentres,'0%')

<html>
<head>
<title>Relevant CLARIN KPIs</title>
<link rel="stylesheet" type="text/css" href="{app:resource("style.css", "css")}"/>
<script type="text/javascript" src="{app:resource("edit.js", "js")}"/>
<script type="text/javascript" src="{app:resource("utils.js", "js")}"/>
</head>
<body>
<div id="all">
<div class="logoheader"/>
{menu:view()}
<div class="content">
<div class="navigation">
&gt; <a href="{app:link("views/recommended-formats-with-search.xq")}">Format Recommendations</a>
&gt; <a href="{app:link("views/list-statistics.xq")}">Statistics</a>
&gt; <a href="{app:link("views/kpi.xq")}">Relevant KPIs</a>
</div>
<div class="title">Relevant CLARIN KPIs</div>
<div>
<p>Among the 12 Key Performance Indicators that have been adopted as measures of performance of
CLARIN, at least three reference areas that the SIS either draws on or directly serves. The two crucial ones are the following:</p>
</div>
<div>
<table style="">
<tr>
<th></th>
<th style="width:200px">Key Performance Indicator</th>
<th>Measurement</th>
</tr>
<tr>
<td style="vertical-align:top">1.</td>
<td>Number of certified B-centres</td>
<td>Number of certified B-centres</td>
</tr>
<tr>
<td style="vertical-align:top">2.</td>
<td style="vertical-align:top">Collections of standards and mappings</td>
<td>Percentage of centres offering repository services that have published an
overview of formats that can be processed in their repository</td>
</tr>
return


<html>
<head>
<title>Relevant CLARIN KPIs</title>
<link rel="stylesheet" type="text/css" href="{app:resource("style.css", "css")}"/>
</head>
<body>
<div id="all">
<div class="logoheader"/>
{menu:view()}
<div class="content">
<div class="navigation">
&gt; <a href="{app:link("views/recommended-formats-with-search.xq")}">Format Recommendations</a>
&gt; <a href="{app:link("views/list-statistics.xq")}">Statistics</a>
&gt; <a href="{app:link("views/kpi.xq")}">Relevant KPIs</a>
</div>
<div class="title">Relevant CLARIN KPIs</div>
<div>
<p>Among the 12 Key Performance Indicators that have been adopted as measures of performance of
CLARIN, at least three reference areas that the SIS either draws on or directly serves. The two crucial ones are the following:</p>
</div>
<div>
<table style="width:600px; border-collapse:collapse;">
<tr>
<th class="column"></th>
<th class="column" style="width:200px">Key Performance Indicator</th>
<th class="column">Measurement</th>
</tr>
<tr>
<td class="column">1.</td>
<td class="column">Number of certified B-centres</td>
<td class="column">Number of certified B-centres</td>
</tr>
<tr>
<td class="column">2.</td>
<td class="column">Collections of standards and mappings</td>
<td class="column">Percentage of centres offering repository services that have published an
overview of formats that can be processed in their repository</td>
</tr>

</table>
</table>
</div>
<div><p>Below, we provide data on KPIs #1 and #2, on the basis of the current content of the SIS.</p>
<ul>
<li>CLARIN B-centres recorded in the SIS: <b>count(cm:get_centres(RI=CLARIN, status=B-centre))</b> </li>
<li>Number of B-centres that have provided information (and recorded that in the SIS): <b>count( rf:get_centres_where count(/recommendation/formats/* gt 0) )</b></li>
<li>KPI "Collections of standards and mappings" as represented in the SIS: <b>100 *
count(rf:get_centres_where count(/recommendation/formats/* gt 0)) /
count(get_centres(RI=CLARIN, status=B-centre)) %</b></li>
</ul>

<table style="width:600px; border-collapse:collapse;">
<tr>
<td class="column">CLARIN B-centres recorded in the SIS</td>
<td class="column">{$numOfBCentres}</td>
</tr>
<tr>
<td class="column">Number of B-centres that have provided information (and recorded that in the SIS)</td>
<td class="column">{$numOfBCentresWithRecommendations}</td>
</tr>
<tr>
<td class="column">KPI "Collections of standards and mappings" as represented in the SIS </td>
<td class="column">{$percentage}</td>
</tr>
</table>
<!--
<ul>
<li>CLARIN B-centres recorded in the SIS: <b>count(cm:get_centres(RI=CLARIN, status=B-centre))</b>
</li>
<li>Number of B-centres that have provided information (and recorded that in the SIS): <b>count( rf:get_centres_where count(/recommendation/formats/* gt 0) )</b></li>
<li>KPI "Collections of standards and mappings" as represented in the SIS: <b>100 *
count(rf:get_centres_where count(/recommendation/formats/* gt 0)) /
count(get_centres(RI=CLARIN, status=B-centre)) %</b></li>
</ul>
-->
</div>
<div>
<p>Please note that:</p>
<ul>
<li>CLARIN is a dynamic and developing infrastructure: new centres join, existing centres can be disbanded or
change their status, and updating that information requires a bit of a time lag.
See <a href="https://www.clarin.eu/content/certified-b-centres">the list of certified B-centres</a> at clarin.eu for the most up-to-date information.</li>
<li>The SIC and the SIS team have provided this platform for sharing the recommendations but cannot be responsible for inputting them
or keeping them current for each centre – that is <a href="https://github.com/clarin-eric/standards/wiki/Updating-format-recommendations">the
role of the centres themselves</a>. If you notice that recommendations from some data-depositing centre are missing, please kindly consider inviting that
centre to provide their information to the SIS.</li>
<li>The SIS provides information on all <a href="{app:link("views/list-centres.xq")}">centres that allow
for data depositions</a> (some of them are not B-centres, and some of them may not be CLARIN centres either). That set is wider than the set of
<a href="{app:link("views/list-centres.xq?status=B-centre&amp;submit=Filter")}">CLARIN B-centres</a>,
which is the basis for the calculation of the CLARIN KPI listed as #2 above.</li>
</ul>
<p>The third potentially relevant KPI is "Collaboration with RIs", and its measure is "Number of official collaborations with RIs as
confirmed in formal agreements". Regarding this KPI, the SIS can provide only indirect and rather imprecise information: it can be gleaned from the number of
Research Infrastructures other than CLARIN that the SIS lists information on. More details in this area can be found in
<a href="https://www.clarin.eu/content/clarin-and">the relevant section(s) of clarin.eu</a>.</p>
<p>Please note that:</p>
<ul>
<li>CLARIN is a dynamic and developing infrastructure: new centres join, existing centres can be disbanded or
change their status, and updating that information requires a bit of a time lag.
See <a href="https://www.clarin.eu/content/certified-b-centres">the list of certified B-centres</a> at clarin.eu for the most up-to-date information.</li>
<li>The SIC and the SIS team have provided this platform for sharing the recommendations but cannot be responsible for inputting them
or keeping them current for each centre – that is <a href="https://github.com/clarin-eric/standards/wiki/Updating-format-recommendations">the
role of the centres themselves</a>. If you notice that recommendations from some data-depositing centre are missing, please kindly consider inviting that
centre to provide their information to the SIS.</li>
<li>The SIS provides information on all <a href="{app:link("views/list-centres.xq")}">centres that allow
for data depositions</a> (some of them are not B-centres, and some of them may not be CLARIN centres either). That set is wider than the set of
<a href="{app:link("views/list-centres.xq?status=B-centre&amp;submit=Filter")}">CLARIN B-centres</a>,
which is the basis for the calculation of the CLARIN KPI listed as #2 above.</li>
</ul>
<p>The third potentially relevant KPI is "Collaboration with RIs", and its measure is "Number of official collaborations with RIs as
confirmed in formal agreements". Regarding this KPI, the SIS can provide only indirect and rather imprecise information: it can be gleaned from the number of
Research Infrastructures other than CLARIN that the SIS lists information on. More details in this area can be found in
<a href="https://www.clarin.eu/content/clarin-and">the relevant section(s) of clarin.eu</a>.</p>
</div>
</div>
<div class="footer">{app:footer()}</div>
</div>
<div class="footer">{app:footer()}</div>
</div>
</body>
</html>
</body>
</html>

0 comments on commit 6234f8b

Please sign in to comment.