rdf-tabular 1.0.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/spec/data/countries-minimal.json +38 -0
  4. data/spec/data/countries-minimal.ttl +36 -0
  5. data/spec/data/countries-standard.json +86 -0
  6. data/spec/data/countries-standard.ttl +75 -0
  7. data/spec/data/countries.csv +4 -0
  8. data/spec/data/countries.csv-minimal.json +16 -0
  9. data/spec/data/countries.csv-minimal.ttl +19 -0
  10. data/spec/data/countries.csv-standard.json +33 -0
  11. data/spec/data/countries.csv-standard.ttl +44 -0
  12. data/spec/data/countries.html +88 -0
  13. data/spec/data/countries.json +53 -0
  14. data/spec/data/countries_embed-minimal.json +38 -0
  15. data/spec/data/countries_embed-minimal.ttl +36 -0
  16. data/spec/data/countries_embed-standard.json +86 -0
  17. data/spec/data/countries_embed-standard.ttl +75 -0
  18. data/spec/data/countries_embed.html +88 -0
  19. data/spec/data/countries_html-minimal.json +38 -0
  20. data/spec/data/countries_html-minimal.ttl +36 -0
  21. data/spec/data/countries_html-standard.json +86 -0
  22. data/spec/data/countries_html-standard.ttl +75 -0
  23. data/spec/data/country-codes-and-names-minimal.json +19 -0
  24. data/spec/data/country-codes-and-names-minimal.ttl +22 -0
  25. data/spec/data/country-codes-and-names-standard.json +47 -0
  26. data/spec/data/country-codes-and-names-standard.ttl +45 -0
  27. data/spec/data/country-codes-and-names.csv +5 -0
  28. data/spec/data/country_slice.csv +4 -0
  29. data/spec/data/junior-roles.csv +3 -0
  30. data/spec/data/junior-roles.json +54 -0
  31. data/spec/data/roles-minimal.json +32 -0
  32. data/spec/data/roles-minimal.ttl +36 -0
  33. data/spec/data/roles-standard.json +56 -0
  34. data/spec/data/roles-standard.ttl +66 -0
  35. data/spec/data/roles.json +23 -0
  36. data/spec/data/senior-roles.csv +3 -0
  37. data/spec/data/senior-roles.json +52 -0
  38. data/spec/data/test232-metadata.json +10 -0
  39. data/spec/data/test232.csv +3 -0
  40. data/spec/data/tree-ops-atd.json +1 -0
  41. data/spec/data/tree-ops-ext-minimal.json +42 -0
  42. data/spec/data/tree-ops-ext-minimal.ttl +34 -0
  43. data/spec/data/tree-ops-ext-standard.json +93 -0
  44. data/spec/data/tree-ops-ext-standard.ttl +82 -0
  45. data/spec/data/tree-ops-ext.csv +4 -0
  46. data/spec/data/tree-ops-ext.json +81 -0
  47. data/spec/data/tree-ops-minimal.json +18 -0
  48. data/spec/data/tree-ops-minimal.ttl +14 -0
  49. data/spec/data/tree-ops-standard.json +44 -0
  50. data/spec/data/tree-ops-standard.ttl +44 -0
  51. data/spec/data/tree-ops-virtual-minimal.json +32 -0
  52. data/spec/data/tree-ops-virtual-minimal.ttl +25 -0
  53. data/spec/data/tree-ops-virtual-standard.json +49 -0
  54. data/spec/data/tree-ops-virtual-standard.ttl +49 -0
  55. data/spec/data/tree-ops-virtual.json +48 -0
  56. data/spec/data/tree-ops.csv +3 -0
  57. data/spec/data/tree-ops.csv-metadata.json +43 -0
  58. data/spec/data/tree-ops.html +54 -0
  59. data/spec/data/tree-ops.tsv +3 -0
  60. data/spec/format_spec.rb +1 -1
  61. metadata +116 -4
  62. data/spec/w3c-csvw +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5fd3ba26034d83ae78387e86545e7020a2299141
4
- data.tar.gz: 79494794a8a96f1799c0ecf7e28891f230a97f70
3
+ metadata.gz: 5c8908987cdec6803adf6044277e556a190ccf7e
4
+ data.tar.gz: a99ab777655bd8cc29ccae92858fa9ea3bfdc75a
5
5
  SHA512:
6
- metadata.gz: def477f7bc65c716906f2e5bf75afde8e79a8abb5304cffc4cb5624f9dc412ae936a5ef4308e3555c865e1b0562d7b398b4706927df632ef47f1b706ea8fc66b
7
- data.tar.gz: c61c6772c207e44062e6a92726e64e07a28ab18149f18b564403fd15e6f85badb96f0eb5e39fe253547f9c6837c4538b9a5db52881011d521f51217a2682bcf6
6
+ metadata.gz: d06e420fc8a02b9ed2a2fbdcc85a7971247888ef84c1a5755e1564d94ce20d784edca183e4d321521fa52a94963a87247cadc5d6543ccfe4e09c131df1fdf36a
7
+ data.tar.gz: c387511fbcf647858c818ccbe8d3edf4249a09556a991b883bcdbe8438e67892d2cba1ae85dc0f7c8c1a4dad0599850370c1b9c7cfad8211832487af7f1241d7
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 2.2.0
@@ -0,0 +1,38 @@
1
+ [
2
+ {
3
+ "@id": "http://example.org/countries.csv#AD",
4
+ "http://www.geonames.org/ontology#countryCode": "AD",
5
+ "schema:latitude": 42.546245,
6
+ "schema:longitude": 1.601554,
7
+ "schema:name": "Andorra"
8
+ },
9
+ {
10
+ "@id": "http://example.org/countries.csv#AE",
11
+ "http://www.geonames.org/ontology#countryCode": "AE",
12
+ "schema:latitude": 23.424076,
13
+ "schema:longitude": 53.847818,
14
+ "schema:name": "United Arab Emirates"
15
+ },
16
+ {
17
+ "@id": "http://example.org/countries.csv#AF",
18
+ "http://www.geonames.org/ontology#countryCode": "AF",
19
+ "schema:latitude": 33.93911,
20
+ "schema:longitude": 67.709953,
21
+ "schema:name": "Afghanistan"
22
+ },
23
+ {
24
+ "countryRef": "http://example.org/countries.csv#AF",
25
+ "year": "1960",
26
+ "population": 9616353
27
+ },
28
+ {
29
+ "countryRef": "http://example.org/countries.csv#AF",
30
+ "year": "1961",
31
+ "population": 9799379
32
+ },
33
+ {
34
+ "countryRef": "http://example.org/countries.csv#AF",
35
+ "year": "1962",
36
+ "population": 9989846
37
+ }
38
+ ]
@@ -0,0 +1,36 @@
1
+ @prefix geo: <http://www.geonames.org/ontology#> .
2
+ @prefix schema: <http://schema.org/> .
3
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
4
+
5
+ <http://example.org/countries.csv#AD> schema:latitude "42.546245"^^xsd:double;
6
+ schema:longitude "1.601554"^^xsd:double;
7
+ schema:name "Andorra";
8
+ geo:countryCode "AD" .
9
+
10
+ <http://example.org/countries.csv#AE> schema:latitude "23.424076"^^xsd:double;
11
+ schema:longitude "53.847818"^^xsd:double;
12
+ schema:name "United Arab Emirates";
13
+ geo:countryCode "AE" .
14
+
15
+ <http://example.org/countries.csv#AF> schema:latitude "33.93911"^^xsd:double;
16
+ schema:longitude "67.709953"^^xsd:double;
17
+ schema:name "Afghanistan";
18
+ geo:countryCode "AF" .
19
+
20
+ [
21
+ <http://example.org/country_slice.csv#countryRef> <http://example.org/countries.csv#AF>;
22
+ <http://example.org/country_slice.csv#population> 9616353;
23
+ <http://example.org/country_slice.csv#year> "1960"^^xsd:gYear
24
+ ] .
25
+
26
+ [
27
+ <http://example.org/country_slice.csv#countryRef> <http://example.org/countries.csv#AF>;
28
+ <http://example.org/country_slice.csv#population> 9799379;
29
+ <http://example.org/country_slice.csv#year> "1961"^^xsd:gYear
30
+ ] .
31
+
32
+ [
33
+ <http://example.org/country_slice.csv#countryRef> <http://example.org/countries.csv#AF>;
34
+ <http://example.org/country_slice.csv#population> 9989846;
35
+ <http://example.org/country_slice.csv#year> "1962"^^xsd:gYear
36
+ ] .
@@ -0,0 +1,86 @@
1
+ {
2
+ "tables": [
3
+ {
4
+ "url": "http://example.org/countries.csv",
5
+ "row": [
6
+ {
7
+ "url": "http://example.org/countries.csv#row=2",
8
+ "rownum": 1,
9
+ "describes": [
10
+ {
11
+ "@id": "http://example.org/countries.csv#AD",
12
+ "http://www.geonames.org/ontology#countryCode": "AD",
13
+ "schema:latitude": 42.546245,
14
+ "schema:longitude": 1.601554,
15
+ "schema:name": "Andorra"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "url": "http://example.org/countries.csv#row=3",
21
+ "rownum": 2,
22
+ "describes": [
23
+ {
24
+ "@id": "http://example.org/countries.csv#AE",
25
+ "http://www.geonames.org/ontology#countryCode": "AE",
26
+ "schema:latitude": 23.424076,
27
+ "schema:longitude": 53.847818,
28
+ "schema:name": "United Arab Emirates"
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "url": "http://example.org/countries.csv#row=4",
34
+ "rownum": 3,
35
+ "describes": [
36
+ {
37
+ "@id": "http://example.org/countries.csv#AF",
38
+ "http://www.geonames.org/ontology#countryCode": "AF",
39
+ "schema:latitude": 33.93911,
40
+ "schema:longitude": 67.709953,
41
+ "schema:name": "Afghanistan"
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "url": "http://example.org/country_slice.csv",
49
+ "row": [
50
+ {
51
+ "url": "http://example.org/country_slice.csv#row=2",
52
+ "rownum": 1,
53
+ "describes": [
54
+ {
55
+ "countryRef": "http://example.org/countries.csv#AF",
56
+ "year": "1960",
57
+ "population": 9616353
58
+ }
59
+ ]
60
+ },
61
+ {
62
+ "url": "http://example.org/country_slice.csv#row=3",
63
+ "rownum": 2,
64
+ "describes": [
65
+ {
66
+ "countryRef": "http://example.org/countries.csv#AF",
67
+ "year": "1961",
68
+ "population": 9799379
69
+ }
70
+ ]
71
+ },
72
+ {
73
+ "url": "http://example.org/country_slice.csv#row=4",
74
+ "rownum": 3,
75
+ "describes": [
76
+ {
77
+ "countryRef": "http://example.org/countries.csv#AF",
78
+ "year": "1962",
79
+ "population": 9989846
80
+ }
81
+ ]
82
+ }
83
+ ]
84
+ }
85
+ ]
86
+ }
@@ -0,0 +1,75 @@
1
+ @prefix csvw: <http://www.w3.org/ns/csvw#> .
2
+ @prefix geo: <http://www.geonames.org/ontology#> .
3
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
4
+ @prefix schema: <http://schema.org/> .
5
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
6
+
7
+ <http://example.org/countries.csv#AD> schema:latitude "42.546245"^^xsd:double;
8
+ schema:longitude "1.601554"^^xsd:double;
9
+ schema:name "Andorra";
10
+ geo:countryCode "AD" .
11
+
12
+ <http://example.org/countries.csv#AE> schema:latitude "23.424076"^^xsd:double;
13
+ schema:longitude "53.847818"^^xsd:double;
14
+ schema:name "United Arab Emirates";
15
+ geo:countryCode "AE" .
16
+
17
+ <http://example.org/countries.csv#AF> schema:latitude "33.93911"^^xsd:double;
18
+ schema:longitude "67.709953"^^xsd:double;
19
+ schema:name "Afghanistan";
20
+ geo:countryCode "AF" .
21
+
22
+ [
23
+ a csvw:TableGroup;
24
+ csvw:table [
25
+ a csvw:Table;
26
+ csvw:row [
27
+ a csvw:Row;
28
+ csvw:describes <http://example.org/countries.csv#AD>;
29
+ csvw:rownum 1;
30
+ csvw:url <http://example.org/countries.csv#row=2>
31
+ ], [
32
+ a csvw:Row;
33
+ csvw:describes <http://example.org/countries.csv#AE>;
34
+ csvw:rownum 2;
35
+ csvw:url <http://example.org/countries.csv#row=3>
36
+ ], [
37
+ a csvw:Row;
38
+ csvw:describes <http://example.org/countries.csv#AF>;
39
+ csvw:rownum 3;
40
+ csvw:url <http://example.org/countries.csv#row=4>
41
+ ];
42
+ csvw:url <http://example.org/countries.csv>
43
+ ], [
44
+ a csvw:Table;
45
+ csvw:row [
46
+ a csvw:Row;
47
+ csvw:describes [
48
+ <http://example.org/country_slice.csv#countryRef> <http://example.org/countries.csv#AF>;
49
+ <http://example.org/country_slice.csv#population> 9616353;
50
+ <http://example.org/country_slice.csv#year> "1960"^^xsd:gYear
51
+ ];
52
+ csvw:rownum 1;
53
+ csvw:url <http://example.org/country_slice.csv#row=2>
54
+ ], [
55
+ a csvw:Row;
56
+ csvw:describes [
57
+ <http://example.org/country_slice.csv#countryRef> <http://example.org/countries.csv#AF>;
58
+ <http://example.org/country_slice.csv#population> 9799379;
59
+ <http://example.org/country_slice.csv#year> "1961"^^xsd:gYear
60
+ ];
61
+ csvw:rownum 2;
62
+ csvw:url <http://example.org/country_slice.csv#row=3>
63
+ ], [
64
+ a csvw:Row;
65
+ csvw:describes [
66
+ <http://example.org/country_slice.csv#countryRef> <http://example.org/countries.csv#AF>;
67
+ <http://example.org/country_slice.csv#population> 9989846;
68
+ <http://example.org/country_slice.csv#year> "1962"^^xsd:gYear
69
+ ];
70
+ csvw:rownum 3;
71
+ csvw:url <http://example.org/country_slice.csv#row=4>
72
+ ];
73
+ csvw:url <http://example.org/country_slice.csv>
74
+ ]
75
+ ] .
@@ -0,0 +1,4 @@
1
+ countryCode,latitude,longitude,name
2
+ AD,42.546245,1.601554,Andorra
3
+ AE,23.424076,53.847818,"United Arab Emirates"
4
+ AF,33.93911,67.709953,Afghanistan
@@ -0,0 +1,16 @@
1
+ [{
2
+ "countryCode": "AD",
3
+ "latitude": "42.546245",
4
+ "longitude": "1.601554",
5
+ "name": "Andorra"
6
+ }, {
7
+ "countryCode": "AE",
8
+ "latitude": "23.424076",
9
+ "longitude": "53.847818",
10
+ "name": "United Arab Emirates"
11
+ }, {
12
+ "countryCode": "AF",
13
+ "latitude": "33.93911",
14
+ "longitude": "67.709953",
15
+ "name": "Afghanistan"
16
+ }]
@@ -0,0 +1,19 @@
1
+ @base <http://example.org/countries.csv> .
2
+
3
+ _:8228a149-8efe-448d-b15f-8abf92e7bd17
4
+ <#countryCode> "AD" ;
5
+ <#latitude> "42.546245" ;
6
+ <#longitude> "1.601554" ;
7
+ <#name> "Andorra" .
8
+
9
+ _:ec59dcfc-872a-4144-822b-9ad5e2c6149c
10
+ <#countryCode> "AE" ;
11
+ <#latitude> "23.424076" ;
12
+ <#longitude> "53.847818" ;
13
+ <#name> "United Arab Emirates" .
14
+
15
+ _:e8f2e8e9-3d02-4bf5-b4f1-4794ba5b52c9
16
+ <#countryCode> "AF" ;
17
+ <#latitude> "33.93911" ;
18
+ <#longitude> "67.709953" ;
19
+ <#name> "Afghanistan" .
@@ -0,0 +1,33 @@
1
+ {
2
+ "tables": [{
3
+ "url": "http://example.org/countries.csv",
4
+ "row": [{
5
+ "url": "http://example.org/countries.csv#row=2",
6
+ "rownum": 1,
7
+ "describes": [{
8
+ "countryCode": "AD",
9
+ "latitude": "42.546245",
10
+ "longitude": "1.601554",
11
+ "name": "Andorra"
12
+ }]
13
+ }, {
14
+ "url": "http://example.org/countries.csv#row=3",
15
+ "rownum": 2,
16
+ "describes": [{
17
+ "countryCode": "AE",
18
+ "latitude": "23.424076",
19
+ "longitude": "53.847818",
20
+ "name": "United Arab Emirates"
21
+ }]
22
+ }, {
23
+ "url": "http://example.org/countries.csv#row=4",
24
+ "rownum": 3,
25
+ "describes": [{
26
+ "countryCode": "AF",
27
+ "latitude": "33.93911",
28
+ "longitude": "67.709953",
29
+ "name": "Afghanistan"
30
+ }]
31
+ }]
32
+ }]
33
+ }
@@ -0,0 +1,44 @@
1
+ @base <http://example.org/countries.csv> .
2
+ @prefix csvw: <http://www.w3.org/ns/csvw#> .
3
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
4
+
5
+ [
6
+ a csvw:TableGroup;
7
+ csvw:table [ a csvw:Table ;
8
+ csvw:url <http://example.org/countries.csv> ;
9
+ csvw:row [
10
+ a csvw:Row;
11
+ csvw:rownum "1"^^xsd:integer ;
12
+ csvw:url <#row=2> ;
13
+ csvw:describes _:8228a149-8efe-448d-b15f-8abf92e7bd17
14
+ ], [
15
+ a csvw:Row;
16
+ csvw:rownum "2"^^xsd:integer ;
17
+ csvw:url <#row=3> ;
18
+ csvw:describes _:ec59dcfc-872a-4144-822b-9ad5e2c6149c
19
+ ], [
20
+ a csvw:Row;
21
+ csvw:rownum "3"^^xsd:integer ;
22
+ csvw:url <#row=4> ;
23
+ csvw:describes _:e8f2e8e9-3d02-4bf5-b4f1-4794ba5b52c9
24
+ ]
25
+ ]
26
+ ] .
27
+
28
+ _:8228a149-8efe-448d-b15f-8abf92e7bd17
29
+ <#countryCode> "AD" ;
30
+ <#latitude> "42.546245" ;
31
+ <#longitude> "1.601554" ;
32
+ <#name> "Andorra" .
33
+
34
+ _:ec59dcfc-872a-4144-822b-9ad5e2c6149c
35
+ <#countryCode> "AE" ;
36
+ <#latitude> "23.424076" ;
37
+ <#longitude> "53.847818" ;
38
+ <#name> "United Arab Emirates" .
39
+
40
+ _:e8f2e8e9-3d02-4bf5-b4f1-4794ba5b52c9
41
+ <#countryCode> "AF" ;
42
+ <#latitude> "33.93911" ;
43
+ <#longitude> "67.709953" ;
44
+ <#name> "Afghanistan" .
@@ -0,0 +1,88 @@
1
+ <html>
2
+ <head>
3
+ <title>Example of CSVW metadata in HTML referencing external CSV</title>
4
+ <style type="text/css">
5
+ /* Style Turtle script blocks to be visable */
6
+ pre.example script {
7
+ display:block;
8
+ }
9
+ </style>
10
+ </head>
11
+ <body>
12
+ <p>This shows an example of embeddeding CSV metadata within an HTML document referencing an <a rel="describes" href="countries.csv">external CSV</a> which contains the following:</p>
13
+ <table id="countries">
14
+ <caption>Countries</caption>
15
+ <tr><th>countryCode</th><th>latitude</th><th>longitude</th><th>name</th></tr>
16
+ <tr><td>AD</td><td>42.5</td><td>1.6</td><td>Andorra</td></tr>
17
+ <tr><td>AE</td><td>23.4</td><td>53.8</td><td>United Arab Emirates</td></tr>
18
+ <tr><td>AF</td><td>33.9</td><td>67.7</td><td>Afghanistan</td></tr>
19
+ </table>
20
+ <table id="country_slice">
21
+ <caption>Country Slice</caption>
22
+ <tr><th>countryRef</th><th>year</th><th>population</th></tr>
23
+ <tr><td>AF</td><td>1960</td><td>9616353</td></tr>
24
+ <tr><td>AF</td><td>1961</td><td>9799379</td></tr>
25
+ <tr><td>AF</td><td>1962</td><td>9989846</td></tr>
26
+ </table>
27
+ <p>The metadata is describe here in a script element:</p>
28
+ <pre class="example">
29
+ <script type="application/csvm+json">
30
+ {
31
+ "@context": "http://www.w3.org/ns/csvw",
32
+ "tables": [{
33
+ "url": "countries.csv",
34
+ "tableSchema": {
35
+ "columns": [{
36
+ "name": "countryCode",
37
+ "titles": "countryCode",
38
+ "datatype": "string",
39
+ "propertyUrl": "http://www.geonames.org/ontology{#_name}"
40
+ }, {
41
+ "name": "latitude",
42
+ "titles": "latitude",
43
+ "datatype": "number"
44
+ }, {
45
+ "name": "longitude",
46
+ "titles": "longitude",
47
+ "datatype": "number"
48
+ }, {
49
+ "name": "name",
50
+ "titles": "name",
51
+ "datatype": "string"
52
+ }],
53
+ "aboutUrl": "countries.csv{#countryCode}",
54
+ "propertyUrl": "http://schema.org/{_name}",
55
+ "primaryKey": "countryCode"
56
+ }
57
+ }, {
58
+ "url": "country_slice.csv",
59
+ "tableSchema": {
60
+ "columns": [{
61
+ "name": "countryRef",
62
+ "titles": "countryRef",
63
+ "valueUrl": "countries.csv{#countryRef}"
64
+ }, {
65
+ "name": "year",
66
+ "titles": "year",
67
+ "datatype": "gYear"
68
+ }, {
69
+ "name": "population",
70
+ "titles": "population",
71
+ "datatype": "integer"
72
+ }],
73
+ "foreignKeys": [{
74
+ "columnReference": "countryRef",
75
+ "reference": {
76
+ "resource": "countries.csv",
77
+ "columnReference": "countryCode"
78
+ }
79
+ }]
80
+ }
81
+ }]
82
+ }
83
+ </script>
84
+ <p>Processing this file should create results similar to those described in <cite><a href="http://w3c.github.io/csvw/csv2json/#example-countries">The CSV2JSON Simple Example</a></cite> in [[!csv2json]].</p>
85
+ </pre>
86
+ <p>The metadata is also <a rel="describedby" href="countries.json">described in JSON</a>.</p>
87
+ </body>
88
+ </html>