/
CitationTemplate.tmpl
258 lines (250 loc) · 10.9 KB
/
CitationTemplate.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<title>Perl6Citations</title>
<link rel="stylesheet" href="min.css" />
<link rel="stylesheet" href="second.min.css" />
<link href="favicon.ico".
rel="shortcut icon"
type="image/x-icon">
<script type="text/javascript"
src="dygraph-combined.js">
</script>
<script type="text/javascript"
src="synchronizer.js">
</script>
<style>
.dygraph-legend > span { display: none; }
.dygraph-legend > span.highlight { display: inline; }
</style>
</head>
<body>
<div class="container">
<header class="panel panel-primary lead">
<div class="panel-heading">
<h1 class="panel-title">Ecosystem Citation Index</h1>
</div>
<div class="panel-body suckin-btm">
<img class="pull-right" alt="»ö«" id="logo" src="camelia-logo.png">
<p>A citation index is calculated for each module in the
<a href="http://modules.perl6.org">Perl6 Ecosystem</a>, numbering <TMPL_VAR N_MOD> as of <TMPL_VAR DATE>.</p>
<p><TMPL_VAR N_CIT> <i>Topline</i> modules were cited, or <TMPL_VAR PC_CIT> of the total.</p>
<P>A module <I>simply cites</I> another
if it lists it in the <B>"depends"</B> list. A module <I>recursively cites</I> another if a cited
module in turn cites another module.</P>
<P>The following modules are considered to exist in all installations and so excluded from this analysis:
<B><TMPL_VAR CORES></B>.
</P>
<P>This page contains the data for the top <TMPL_VAR N_ROWS> modules in
<a href="#graphs">graphical form</a> from the time data was collected to the present,
<a href="#tabulation">tabulated</a> for the top <TMPL_VAR N_ROWS> modules. Modules <a href="#cyclic">
in a cycle</a> and modules
<a href="#xecosystem">not in the Ecosystem</a> (possibly module meta data errors) are listed,
followed by <a href="#definitions">definitions and credits</a>.<p>
</div>
</header>
<table class="table table-condensed" id="graphs">
<tr>
<th style="text-align:center">Simply Cited</th><th style="text-align:center">Recursively Cited</th>
</tr>
<tr>
<td><div class="panel panel-default" id="simple" style="margin: auto"></div></td>
<td><div class="panel panel-default" id="recursive" style="margin: auto"></div></td>
</tr>
<tr>
<th colspan="2" style="text-align:center">All Module Numbers</th>
</tr>
<tr>
<td colspan="2"><div class="panel panel-default" id="allmods" style="margin: auto"></div></td>
</tr>
</table>
<div class="panel panel-default" id="tabulation">
<div class="table-responsive">
<table class="table table-condensed table-striped panel-body" id="dists">
<thead>
<tr>
<th></th>
<th colspan="3" style="text-align: center">Sorted in simple order</th>
<th colspan="3" style="text-align: center">Sorted in recursive order</th>
</tr>
<tr>
<th></th><th></th>
<th style="text-align: center">Simple</th>
<th style="text-align: center">Recursive</th>
<th></th>
<th style="text-align: center">Simple</th>
<th style="text-align: center">Recursive</th>
</tr>
<tr>
<th>Order</th>
<th>Module Name</th>
<th>Index</td>
<th>Index</td>
<th>Module Name</th>
<th>Index</th>
<th>Index</th>
</tr>
</thead>
<tbody>
<TMPL_LOOP modules>
<tr>
<td class="name"><TMPL_VAR order></td>
<td class="name"><TMPL_VAR s_name></td>
<td><TMPL_VAR s_s_sim></td>
<td><TMPL_VAR s_r_rec></td>
<td><TMPL_VAR r_name></td>
<td><TMPL_VAR r_s_sim></td>
<td><TMPL_VAR r_r_rec></td>
</tr>
</TMPL_LOOP>
</tbody>
</table>
</div>
</div>
<TMPL_IF Cyclic>
<footer class="panel panel-primary" id="cyclic">
<div class="panel-heading">
<h1 class="panel-title">Modules in Reference Cycle</h1>
</div>
<div class="panel-body panel-primary">
<P>A reference cycle occurs when one module <b>M</b> refers to another module,
[which refers to another module,]* which
refers to module <b>M</b>.</p>
<p>A reference cycle could be handled in several ways in a citation system. However, since self-referential
modules introduce instabilities to an ecosystem of modules, they should be considered <b>evil</b>, and detected.
Consequently, the strategy chosen here is to eliminate all such modules from the citation pool.</p>
<p>
Technically, the modules identified here as in a reference cycle, are analysed as nodes in a directed graph
and are <strong>strongly connected</strong> as determined using
Tarjan's algorithm. </p>
<p>The literature indicates that modules may be strongly connected without being in a
cycle. If this is the case - that is the modules listed as cyclical below are not self referential - please let the author
know since acyclic, strongly connected nodes in a directed graph are mathematically interesting.
</p>
<table class="table table-condensed table-striped panel-body">
<thead>
<tr><th>Cycle</th><th>Modules in Cycle</th></tr>
</thead>
<tbody>
<TMPL_LOOP CyclicLoop>
<tr><td><TMPL_VAR Cycle></td><td><TMPL_VAR ModList></td></tr>
</TMPL_LOOP>
</tbody>
</table>
</div>
</footer>
</TMPL_IF>
<TMPL_IF XEcosystem>
<footer class="panel panel-primary" id="xecosystem">
<div class="panel-heading">
<h1 class="panel-title">Modules Not in Ecosystem</h1>
</div>
<div class="panel-body panel-primary">
<P>The <B>depends</B> list of a <I>topline</I> ecosystem module sometimes contains a module name that is
not itself a topline ecosystem module. The module may be:
<ul><li>incorrectly referenced (eg., upper/lower case spelling error)
</ul>
</p>
<P>Naturally, the modules listed here are an artifact of the algorithm. If they should be included in the Ecosystem analysis,
let me know how the selection might be modified.</p>
<P>Non-topline modules that are cited are:</p>
<table class="table table-condensed table-striped panel-body">
<thead>
<tr><th>Module Name</th><th>Module is cited by</th></tr>
</thead>
<tbody>
<TMPL_LOOP XEcoLoop>
<tr><td><TMPL_VAR ModName></td><td><TMPL_VAR ModCited></td></tr>
</TMPL_LOOP>
</tbody>
</table>
</div>
</footer>
</TMPL_IF>
<footer class="panel suckin-btm" id="definitions">
<div class="panel-heading">
<h1 class="panel-title">Definitions and Credits</h1>
</div>
<div class="panel-body panel-primary">
<a href="https://github.com/finanalyst/ModuleCitation">
<img class="pull-right" src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a>
<p>The Citation Index is defined as <code>100 * # times cited by any module / # cited modules</code></p>
<p>The structure of the 'depends' field as specified in S22 allows for source diversity that complicates analysis. The 'provides' list allows
for situations in which multiple modules can 'provide' the same dependency.<br>
The following criteria are applied:
<ol type="1">
<li>Where alternative dependencies are permitted, each of the alternatives is counted equally since this is a citation index.</li>
<li>Where a dependency is from another language, as defined by the <code>:from</code> adverb, the module is excluded because we are interested in Perl6 modules.</li>
<li>If a dependency being cited is 'provided' by a Top-Line module, but is also the name of a Top-Line module, then only the top-line module is cited.</li>
<li>If a dependency being cited is 'provided' by more than one Top-Line module (and is not itself Top-Line), then EACH Top-Line is cited (as per Criterion 1).</li>
</ol>
</p>
<p>Graphs drawn with package from <a href="http://dygraphs.com/">Dynagraphs</a>. </p>
<p>Data is gathered from Ecosystem and cpan6 projects file (used by zef). Adverbs are stripped from Module names.</p>
<p>Thanks to Zoffix and Moritz Lentz for suggestions.</p>
<p>Analysis is the author's, no grant has been made, no aim is intended other than interest. Hopefully, no one is offended.
Kind suggestions always welcome at rnhainsworth at the main gmail domain.</p>
</div>
</footer>
</div>
<script type="text/javascript">
var g = new Dygraph(
document.getElementById("recursive"),
"GraphFile_recursive.csv",
{ width: 480,
height: 320,
stackedGraph: 0,
highlightCircleSize: 2,
strokeWidth: 1,
strokeBorderWidth: 1,
axes: {
y: {valueFormatter: function(y) { return y.toFixed(2) + '%' }, axisLabelFormatter: function(y) { return y.toFixed(0) + '%' } },
},
highlightSeriesOpts: {
strokeWidth: 3,
strokeBorderWidth: 1,
highlightCircleSize: 5
}}
),
h = new Dygraph(
document.getElementById("simple"),
"GraphFile_simple.csv",
{ width: 480,
height: 320,
stackedGraph: 0,
highlightCircleSize: 2,
strokeWidth: 1,
strokeBorderWidth: 1,
axes: {
y: {valueFormatter: function(y) { return y.toFixed(2) + '%' }, axisLabelFormatter: function(y) { return y.toFixed(0) + '%' } },
},
highlightSeriesOpts: {
strokeWidth: 3,
strokeBorderWidth: 1,
highlightCircleSize: 5
}}
),
i = new Dygraph(
document.getElementById("allmods"),
"GraphFile_AllModules.csv",
{ width: 480,
height: 320,
stackedGraph: 0,
highlightCircleSize: 2,
strokeWidth: 1,
strokeBorderWidth: 1,
axes: {
y: {valueFormatter: function(y) { return y.toFixed(0) }, axisLabelFormatter: function(y) { return y.toFixed(0) }}
},
highlightSeriesOpts: {
strokeWidth: 3,
strokeBorderWidth: 1,
highlightCircleSize: 5
}}
);
var sync = Dygraph.synchronize( g,h,i ,{zoom: false, selection: true });
</script>
</body>
</html>