forked from w3c/dwbp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdwbp-example.html
449 lines (416 loc) · 18.9 KB
/
dwbp-example.html
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
<!DOCTYPE html>
<html prefix="dcat: http://www.w3.org/ns/dcat#
dqv: http://www.w3.org/ns/dqv#
dct: http://purl.org/dc/terms/" lang="en" >
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<title>DWBP - Examples</title>
<meta content="width=device-width,initial-scale=1" name="viewport">
<style type="text/css">
.container {
font-family: sans-serif;
max-width: 968px;
margin: 0 auto;
}
.human-readable-example {
background-color: transparent;
border-collapse: collapse;
border-spacing: 0px;
color: #333;
width: 100%;
}
.human-readable-example td {
padding: 6px 3px 6px 3px;
}
.human-readable-example tr:first-child td:first-child {
width: 25%;
}
.human-readable-example tr:nth-child(even) {
background-color: #F7F7F7;
}
.human-readable-example tr:nth-child(odd) {
background-color: #FFFFFF;
}
div.example {
padding: 0.5em;
border-left: 0.5em solid #E0CB52;
border-color: #E0CB52;
background: none repeat scroll 0% 0% #FCFAEE;
}
a {
color: #00C;
text-decoration: none;
}
a[href]:hover {
background: none repeat scroll 0% 0% #FFA;
}
form#duv-feedback {
width: 48%;
float: left;
}
form#duv-feedback fieldset label {
margin-top: 10px;
width: 100%;
display: block;
}
form#duv-feedback fieldset input {
width: 100%;
}
form#duv-feedback fieldset textarea {
width: 100%;
}
div#rdf-duv-feedback {
float: right;
width: 48%;
}
pre#rdf-duv-feedback-turtle {
white-space: pre-wrap;
}
</style>
</head>
<body>
<div class="container">
<h1>Example of Dataset - Human-readable</h1>
<section id="abstract">
<p>This is the human-readable version of examples used in the <a href="http://w3.org/TR/dwbp/"><abbr title="Data on the Web Best Practices">DWBP</abbr> document</a>.</p>
</section>
<section resource="#timetable-001" typeof="dcat:Dataset">
<p>The dataset description is based on following example:</p>
<div class="example">
<p>John works for the Transport Agency of MyCity and he is in charge of publishing the data about bus stops of the city on the Web. John wants to publish these data for different types of data consumers such as developers interested on creating applications but also for software agents. It is really important that both humans and software agents can easily understand and process the data. He also expects the data to be available up to date and to be easily discoverable on the Web.</p>
</div>
<h2 id="dataset-description">Dataset description</h2>
<table class="human-readable-example">
<tbody>
<tr>
<td>Title</td>
<td property="dct:title">Bus timetable of MyCity</td>
</tr>
<tr>
<td>URI</td>
<td>http://data.mycity.example/public-transport/road/bus/dataset/bus-stops-2015-05-05</td>
</tr>
<tr>
<td>Keywords</td>
<td><span property="dcat:keyword">transport</span>, <span property="dcat:keyword">mobility</span>, <span property="dcat:keyword">bus</span></td>
</tr>
<tr>
<td>Publication date</td>
<td><span property="dct:issued" content="2015-05-05" datatype="xsd:date">2015-05-05</span></td>
</tr>
<tr>
<td>Last modification</td>
<td><span property="dct:modified" content="2015-05-05" datatype="xsd:date">2015-05-05</span></td>
</tr>
<tr>
<td id="publisher">Publisher</td>
<td property="dct:publisher" resource="#publisher" typeof="foaf:Organization prov:Agent"><span property="foaf:name">Transport Agency MyCity</span></td>
</tr>
<tr>
<td>Creator</td>
<td property="dct:creator" typeof="foaf:Person"><span property="foaf:name">John</span> <<a href="mailto:john@mycitytransport.org" property="foaf:mail">john@mycitytransport.org</a>><span property="prov:onBehalfOf" resource="#publisher"></span></td>
</tr>
<tr>
<td>Contact point</td>
<td><a property="dcat:contactPoint" href="http://data.mycity.example.com/public-transport/contact">http://data.mycity.example.com/public-transport/contact</a></td>
</tr>
<tr>
<td>Period that the dataset covers</td>
<td><a property="dct:temporal" href="http://reference.data.gov.uk/id/year/2014">The
British calendar year of 2014</a></td>
</tr>
<tr>
<td>Spatial coverage</td>
<td><a property="dct:spatial" href="http://www.geonames.org/3399415">Fortaleza,
Brazil</a></td>
</tr>
<tr>
<td>Frequency at the dataset is published</td>
<td><a property="dct:accrualPeriodicity" href="http://purl.org/linked-data/sdmx/2009/code#freq-A">Annual</a></td>
</tr>
<tr>
<td>Theme</td>
<td>Mobility</td>
</tr>
<tr>
<td>Language</td>
<td>English, Portuguese</td>
</tr>
<tr>
<td>Version</td>
<td>1.0</td>
</tr>
</tbody>
</table>
<h2 id="dataset-distributions">Dataset distributions</h2>
<h3 property="dcat:distribution" resource="#timetable-001-RDF" > RDF Distribution </h3>
<table resource="#timetable-001-RDF" typeof="dcat:Distribution" class="human-readable-example">
<tbody>
<tr>
<td>Title</td>
<td property="dct:title">bus-stops-2015-05-05.ttl</td>
</tr>
<tr>
<td>Description</td>
<td property="dct:description">RDF distribution of bus-stops-2015-05-05 dataset.</td>
</tr>
<tr>
<td>Media type</td>
<td property="dcat:mediaType">text/turtle</td>
</tr>
<tr>
<td>License</td>
<td> <a href="http://creativecommons.org/licenses/by-sa/3.0/"> CC
BY-SA 3.0 </a></td>
</tr>
<tr>
<td>Publication date</td>
<td><span property="dct:issued" content="2015-05-05" datatype="xsd:date">2015-05-05</span></td>
</tr>
<tr>
<td>Last modification</td>
<td><span property="dct:modified" content="2015-05-05" datatype="xsd:date">2015-05-05</span></td>
</tr>
<tr>
<td>Download URL</td>
<td> <a property="dcat:downloadURL" href="http://data.mycity.gov/public-transport/road/bus/dataset/timetable.ttl">http://data.mycity.gov/public-transport/road/bus/dataset/bus-stops-2015-05-05.ttl</a></td>
</tr>
</tbody>
</table>
<h3 id="timetable-001-CSV" property="dcat:distribution" resource="#timetable-001-CSV"> CSV Distribution </h3>
<table about="#timetable-001-CSV" typeof="dcat:Distribution" class="human-readable-example">
<tbody>
<tr>
<td>Title</td>
<td property="dct:title">bus-stops-2015-05-05.csv</td>
</tr>
<tr>
<td>Description</td>
<td property="dct:description">CSV distribution of bus-stops-2015-05-05 dataset.</td>
</tr>
<tr>
<td>Media type</td>
<td property="dcat:mediaType">text/csv</td>
</tr>
<tr>
<td>License</td>
<td> <a href="http://creativecommons.org/licenses/by-sa/3.0/"> CC
BY-SA 3.0 </a></td>
</tr>
<tr>
<td>Publication date</td>
<td><span property="dct:issued" content="2015-05-05" datatype="xsd:date">2015-05-05</span></td>
</tr>
<tr>
<td>Last modification</td>
<td><span property="dct:modified" content="2015-05-05" datatype="xsd:date">2015-05-05</span></td>
</tr>
<tr>
<td>Download URL</td>
<td> <a property="dcat:downloadURL" href="http://data.mycity.gov/public-transport/road/bus/dataset/bus-stops-2015-05-05.csv">http://data.mycity.gov/public-transport/road/bus/dataset/bus-stops-2015-05-05.csv</a> </td>
</tr>
</tbody>
</table>
<h2 id="dataset-version-history">Dataset version history </h2>
<table class="human-readable-example">
<tbody>
<tr>
<td>Current Version</td>
<td>1.1</td>
</tr>
</tbody>
</table>
<h2 id="dataset-strucutral-metadata">Dataset structural metadata</h2>
<!--<p>Schema of the dataset "Bus stops of MyCity".</p> -->
<table class="human-readable-example">
<tbody>
<tr>
<th>Field</th>
<th>Titles</th>
<th>Description</th>
<th>Datatype</th>
<th>Primary key</th>
<th>Required</th>
</tr>
<tr>
<td>stop_id</td>
<td>Identifier</td>
<td>An identifier for the bus stop.</td>
<td>string</td>
<td>true</td>
<td>true</td>
</tr>
<tr>
<td>stop_name</td>
<td>Name</td>
<td>The name of the bus stop.</td>
<td>string</td>
<td></td>
<td></td>
</tr>
<tr>
<td>stop_desc</td>
<td>Description</td>
<td>A description for the bus stop.</td>
<td>string</td>
<td></td>
<td></td>
</tr>
<tr>
<td>stop_lat</td>
<td>Latitude</td>
<td>The latitude of the bus stop.</td>
<td>numeric</td>
<td></td>
<td></td>
</tr>
<tr>
<td>stop_long</td>
<td>Longitude</td>
<td>The longitude of the bus stop.</td>
<td>numeric</td>
<td></td>
<td></td>
</tr>
<tr>
<td>zone_id</td>
<td>Zone</td>
<td>An identifier for the zone where the bus stop is located.</td>
<td>string</td>
<td></td>
<td></td>
</tr>
<tr>
<td>stop_url</td>
<td>URL</td>
<td>URL that identifies the bus stop.</td>
<td>string</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</section>
<section>
<h2> Dataset /Distribution quality </h2>
<section>
<h3 about="#timetable-001-CSV" property="dqv:hasQualityMeasurement" resource="#measure1"> Quality measure 1 </h3>
<table class="human-readable-example" resource="#measure1" typeof="dqv:QualityMeasurement" id="measure1">
<tr>
<td property="dqv:metric" resource="#csvCompletenessMetric">Metric</td>
<td about="#csvCompletenessMetric" typeof="dqv:Metric"> <span property="skos:definition">Ratio between the number of objects represented in the cvs and the number of objects expected to be represented according to the declared dataset scope.</span> </td>
</tr>
<tr>
<td>Value </td>
<td> <span property="dqv:value" datatype="xsd:double">0.5</span> (Double)</td>
</tr>
<tr>
<td>Computed on</td>
<td property="dqv:computedOn" resource="#timetable-001-CSV"><a href="#timetable-001-CSV">timetable-001-CSV </a></td>
</tr>
<tr>
<td about="#csvCompletenessMetric" property="dqv:inDimension" resource="#completeness"> Dimension </td>
<td>
<table class="human-readable-example" about="#completeness" typeof="dqv:Dimension" property="dqv:inCategory" resource="#intrinsicDimensions">
<tr>
<td><span property="skos:prefLabel">Completeness</span></td>
</tr>
<tr>
<td><span property="skos:definition">Completeness refers to the degree to which all required information is present in a particular dataset.</span></td>
</tr>
</table>
</td>
</tr>
</table>
<h3 about="#timetable-001-CSV" property="dqv:hasQualityMeasurement" resource="#measure2">Quality measure 2</h3>
<table class="human-readable-example" resource="#measure2" typeof="dqv:QualityMeasurement" id="measure2">
<tr>
<td property="dqv:metric" resource="#downloadURLAvailabilityMetric">Metric</td>
<td about="#downloadURLAvailabilityMetric" typeof="dqv:Metric"> <span property="skos:definition">It checks if dcat:downloadURL is available and if its value is dereferenceable.</span> </td>
</tr>
<tr>
<td>Value </td>
<td> <span property="dqv:value" datatype="xsd:boolean">true</span> (Boolean)</td>
</tr>
<tr>
<td>Computed on</td>
<td property="dqv:computedOn" resource="#timetable-001-CSV"><a href="#timetable-001-CSV">timetable-001-CSV </a></td>
</tr>
<tr>
<td about="#downloadURLAvailabilityMetric" property="dqv:inDimension" resource="#availability"> Dimension </td>
<td>
<table class="human-readable-example" about="#availability" typeof="dqv:Dimension" property="dqv:inCategory" resource="#accessibility">
<tr>
<td><span property="skos:prefLabel">Availability</span></td>
</tr>
<tr>
<td><span property="skos:definition">Availability of a dataset is the extent to which data (or some portion of it) is present, obtainable and ready for use.</span></td>
</tr>
</table>
</td>
</tr>
</table>
</section>
<section>
<h3>Data Usage Feedback</h3>
<p>The following form is used to get feedback about the dataset Bus timetable of MyCity (http://data.mycity.example/public-transport/road/bus/dataset/timetable)</p>
<form id="duv-feedback" onkeyup="fillRDF()">
<fieldset>
<legend>Personal info</legend>
<label for="foaf-name">Name</label>
<input type="text" id="foaf-name" value="Bernadette Loscio">
</fieldset>
<fieldset>
<legend>Dataset</legend>
<label for="feedback-about">Feedback about</label>
<select name="feedbackAbout" id="feedback-about">
<option value="timetable-001-RDF">RDF distribution of bus-stops-2015-05-05 datase</option>
<option selected value="timetable-001-CSV">CSV distribution of bus-stops-2015-05-05 datase</option>
</select>
<label for="duv-rating">Rating</label>
<select id="duv-rating">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5" selected>5</option>
</select>
<label for="duv-userFeedback">Feedback</label>
<textarea id="duv-userFeedback">Is there a JSON-LD distribution available for this dataset?</textarea>
<label for="oa-motivation">Motivation</label>
<textarea id="oa-motivation"></textarea>
</fieldset>
</form>
<!-- <div id="rdf-duv-feedback">
<pre id="rdf-duv-feedback-turtle">
ex:comment
a duv:UserFeedback ;
oa:hasTarget ex:<span id="rdf-feedback-about">timetable-001-csv</span>;
oa:hasBody ex:comment1Content ;
dct:creator ex:author ;
.
ex:comment2Content a cnt:ContentAsText ;
cnt:chars "<span id="rdf-duv-userFeedback">Are tab delimited formats also available?</span>"^^xsd:string .
ex:author
a foaf:Person ;
foaf:Name "<span id="rdf-foaf-name">Alan Law</span>"^^xsd:string ;
.
</pre>
</div>
</section>
</section>
</div> -->
<script>
function fillRDF() {
var form = document.getElementById("duv-feedback");
var rdfFoafName = document.getElementById("rdf-foaf-name");
var rdfDuvUserFeedback = document.getElementById("rdf-duv-userFeedback");
var rdfFeedbackAbout = document.getElementById("rdf-feedback-about");
rdfFoafName.innerHTML = form.elements['foaf-name'].value;
rdfDuvUserFeedback.innerHTML = form.elements['duv-userFeedback'].value;
rdfFeedbackAbout.innerHTML = form.elements['feedback-about'].value;
}
fillRDF();
</script>
</body>
</html>