-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathdataresource.json
More file actions
3183 lines (3183 loc) · 141 KB
/
dataresource.json
File metadata and controls
3183 lines (3183 loc) · 141 KB
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
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Data Resource",
"description": "Data Resource.",
"type": "object",
"oneOf": [
{
"required": [
"name",
"data"
]
},
{
"required": [
"name",
"path"
]
}
],
"properties": {
"$schema": {
"default": "https://datapackage.org/profiles/1.0/dataresource.json",
"propertyOrder": 10,
"title": "Profile",
"description": "The profile of this descriptor.",
"type": "string"
},
"name": {
"propertyOrder": 20,
"title": "Name",
"description": "An identifier string.",
"type": "string",
"context": "This is ideally a url-usable and human-readable name. Name `SHOULD` be invariant, meaning it `SHOULD NOT` change when its parent descriptor is updated.",
"examples": [
"{\n \"name\": \"my-nice-name\"\n}\n"
]
},
"path": {
"propertyOrder": 30,
"title": "Path",
"description": "A reference to the data for this resource, as either a path as a string, or an array of paths as strings. of valid URIs.",
"oneOf": [
{
"title": "Path",
"description": "A fully qualified URL, or a POSIX file path.",
"type": "string",
"pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$",
"examples": [
"{\n \"path\": \"file.csv\"\n}\n",
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
],
"context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
},
{
"type": "array",
"minItems": 1,
"items": {
"title": "Path",
"description": "A fully qualified URL, or a POSIX file path.",
"type": "string",
"pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$",
"examples": [
"{\n \"path\": \"file.csv\"\n}\n",
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
],
"context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
},
"examples": [
"[ \"file.csv\" ]\n",
"[ \"http://example.com/file.csv\" ]\n"
]
}
],
"context": "The dereferenced value of each referenced data source in `path` `MUST` be commensurate with a native, dereferenced representation of the data the resource describes. For example, in a *Tabular* Data Resource, this means that the dereferenced value of `path` `MUST` be an array.",
"examples": [
"{\n \"path\": [\n \"file.csv\",\n \"file2.csv\"\n ]\n}\n",
"{\n \"path\": [\n \"http://example.com/file.csv\",\n \"http://example.com/file2.csv\"\n ]\n}\n",
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
]
},
"data": {
"propertyOrder": 230,
"title": "Data",
"description": "Inline data for this resource."
},
"type": {
"propertyOrder": 235,
"type": "string",
"enum": [
"table",
"json"
]
},
"title": {
"propertyOrder": 50,
"title": "Title",
"description": "A human-readable title.",
"type": "string",
"examples": [
"{\n \"title\": \"My Package Title\"\n}\n"
]
},
"description": {
"propertyOrder": 60,
"format": "textarea",
"title": "Description",
"description": "A text description. Markdown is encouraged.",
"type": "string",
"examples": [
"{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
]
},
"homepage": {
"propertyOrder": 70,
"title": "Home Page",
"description": "The home on the web that is related to this descriptor.",
"type": "string",
"format": "uri",
"examples": [
"{\n \"homepage\": \"http://example.com/\"\n}\n"
]
},
"sources": {
"propertyOrder": 140,
"options": {
"hidden": true
},
"title": "Sources",
"description": "The raw sources for this resource.",
"type": "array",
"minItems": 0,
"items": {
"title": "Source",
"description": "A source file.",
"type": "object",
"minProperties": 1,
"properties": {
"title": {
"title": "Title",
"description": "A human-readable title.",
"type": "string",
"examples": [
"{\n \"title\": \"My Package Title\"\n}\n"
]
},
"path": {
"title": "Path",
"description": "A fully qualified URL, or a POSIX file path.",
"type": "string",
"pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$",
"examples": [
"{\n \"path\": \"file.csv\"\n}\n",
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
],
"context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
},
"email": {
"title": "Email",
"description": "An email address.",
"type": "string",
"format": "email",
"examples": [
"{\n \"email\": \"example@example.com\"\n}\n"
]
},
"version": {
"type": "string"
}
}
},
"examples": [
"{\n \"sources\": [\n {\n \"title\": \"World Bank and OECD\",\n \"path\": \"http://data.worldbank.org/indicator/NY.GDP.MKTP.CD\"\n }\n ]\n}\n"
]
},
"licenses": {
"description": "The license(s) under which the resource is published.",
"propertyOrder": 150,
"options": {
"hidden": true
},
"title": "Licenses",
"type": "array",
"minItems": 1,
"items": {
"title": "License",
"description": "A license for this descriptor.",
"type": "object",
"anyOf": [
{
"required": [
"name"
]
},
{
"required": [
"path"
]
}
],
"properties": {
"name": {
"title": "Open Definition license identifier",
"description": "MUST be an Open Definition license identifier, see http://licenses.opendefinition.org/",
"type": "string",
"pattern": "^([-a-zA-Z0-9._])+$"
},
"path": {
"title": "Path",
"description": "A fully qualified URL, or a POSIX file path.",
"type": "string",
"pattern": "^((?=[^./~])(?!file:)((?!\\/\\.\\.\\/)(?!\\\\)(?!:\\/\\/).)*|(http|ftp)s?:\\/\\/.*)$",
"examples": [
"{\n \"path\": \"file.csv\"\n}\n",
"{\n \"path\": \"http://example.com/file.csv\"\n}\n"
],
"context": "Implementations need to negotiate the type of path provided, and dereference the data accordingly."
},
"title": {
"title": "Title",
"description": "A human-readable title.",
"type": "string",
"examples": [
"{\n \"title\": \"My Package Title\"\n}\n"
]
}
},
"context": "Use of this property does not imply that the person was the original creator of, or a contributor to, the data in the descriptor, but refers to the composition of the descriptor itself."
},
"context": "This property is not legally binding and does not guarantee that the package is licensed under the terms defined herein.",
"examples": [
"{\n \"licenses\": [\n {\n \"name\": \"odc-pddl-1.0\",\n \"path\": \"http://opendatacommons.org/licenses/pddl/\",\n \"title\": \"Open Data Commons Public Domain Dedication and License v1.0\"\n }\n ]\n}\n"
]
},
"format": {
"propertyOrder": 80,
"title": "Format",
"description": "The file format of this resource.",
"context": "`csv`, `xls`, `json` are examples of common formats.",
"type": "string",
"examples": [
"{\n \"format\": \"xls\"\n}\n"
]
},
"mediatype": {
"propertyOrder": 90,
"title": "Media Type",
"description": "The media type of this resource. Can be any valid media type listed with [IANA](https://www.iana.org/assignments/media-types/media-types.xhtml).",
"type": "string",
"pattern": "^(.+)/(.+)$",
"examples": [
"{\n \"mediatype\": \"text/csv\"\n}\n"
]
},
"encoding": {
"propertyOrder": 100,
"title": "Encoding",
"description": "The file encoding of this resource.",
"type": "string",
"default": "utf-8",
"examples": [
"{\n \"encoding\": \"utf-8\"\n}\n"
]
},
"bytes": {
"propertyOrder": 110,
"options": {
"hidden": true
},
"title": "Bytes",
"description": "The size of this resource in bytes.",
"type": "integer",
"examples": [
"{\n \"bytes\": 2082\n}\n"
]
},
"hash": {
"propertyOrder": 120,
"options": {
"hidden": true
},
"title": "Hash",
"type": "string",
"description": "The MD5 hash of this resource. Indicate other hashing algorithms with the {algorithm}:{hash} format.",
"pattern": "^([^:]+:[a-fA-F0-9]+|[a-fA-F0-9]{32}|)$",
"examples": [
"{\n \"hash\": \"d25c9c77f588f5dc32059d2da1136c02\"\n}\n",
"{\n \"hash\": \"SHA256:5262f12512590031bbcc9a430452bfd75c2791ad6771320bb4b5728bfb78c4d0\"\n}\n"
]
},
"dialect": {
"propertyOrder": 130,
"title": "Table Dialect",
"description": "The Table dialect descriptor.",
"type": "object",
"properties": {
"$schema": {
"default": "https://datapackage.org/profiles/1.0/tabledialect.json",
"propertyOrder": 10,
"title": "Profile",
"description": "The profile of this descriptor.",
"type": "string"
},
"header": {
"title": "Header",
"description": "Specifies if the file includes a header row, always as the first row in the file.",
"type": "boolean",
"default": true,
"examples": [
"{\n \"header\": true\n}\n"
]
},
"headerRows": {
"type": "array",
"default": [
1
],
"items": {
"type": "integer",
"minimum": 1
}
},
"headerJoin": {
"type": "string",
"default": " "
},
"commentRows": {
"type": "array",
"default": [
1
],
"items": {
"type": "integer",
"minimum": 1
}
},
"commentChar": {
"title": "Comment Character",
"description": "Specifies that any row beginning with this one-character string, without preceeding whitespace, causes the entire line to be ignored.",
"type": "string",
"examples": [
"{\n \"commentChar\": \"#\"\n}\n"
]
},
"delimiter": {
"title": "Delimiter",
"description": "A character sequence to use as the field separator.",
"type": "string",
"default": ",",
"examples": [
"{\n \"delimiter\": \",\"\n}\n",
"{\n \"delimiter\": \";\"\n}\n"
]
},
"lineTerminator": {
"title": "Line Terminator",
"description": "Specifies the character sequence that must be used to terminate rows.",
"type": "string",
"default": "\r\n",
"examples": [
"{\n \"lineTerminator\": \"\\r\\n\"\n}\n",
"{\n \"lineTerminator\": \"\\n\"\n}\n"
]
},
"quoteChar": {
"title": "Quote Character",
"description": "Specifies a one-character string to use as the quoting character.",
"type": "string",
"default": "\"",
"examples": [
"{\n \"quoteChar\": \"'\"\n}\n"
]
},
"doubleQuote": {
"title": "Double Quote",
"description": "Specifies the handling of quotes inside fields.",
"context": "If Double Quote is set to true, two consecutive quotes must be interpreted as one.",
"type": "boolean",
"default": true,
"examples": [
"{\n \"doubleQuote\": true\n}\n"
]
},
"escapeChar": {
"title": "Escape Character",
"description": "Specifies a one-character string to use as the escape character.",
"type": "string",
"examples": [
"{\n \"escapeChar\": \"\\\\\"\n}\n"
]
},
"nullSequence": {
"title": "Null Sequence",
"description": "Specifies the null sequence, for example, `\\N`.",
"type": "string",
"examples": [
"{\n \"nullSequence\": \"\\N\"\n}\n"
]
},
"skipInitialSpace": {
"title": "Skip Initial Space",
"description": "Specifies the interpretation of whitespace immediately following a delimiter. If false, whitespace immediately after a delimiter should be treated as part of the subsequent field.",
"type": "boolean",
"default": false,
"examples": [
"{\n \"skipInitialSpace\": true\n}\n"
]
},
"property": {
"type": "string"
},
"itemType": {
"type": "string",
"enum": [
"array",
"object"
]
},
"itemKeys": {
"type": "array",
"items": {
"type": "string"
}
},
"sheetNumber": {
"type": "integer",
"minimum": 1
},
"sheetName": {
"type": "string"
},
"table": {
"type": "string"
}
}
},
"schema": {
"propertyOrder": 140,
"title": "Table Schema",
"description": "A Table Schema for this resource, compliant with the [Table Schema](/tableschema/) specification.",
"type": [
"string",
"object"
],
"required": [
"fields"
],
"properties": {
"$schema": {
"default": "https://datapackage.org/profiles/1.0/tableschema.json",
"propertyOrder": 10,
"title": "Profile",
"description": "The profile of this descriptor.",
"type": "string"
},
"fields": {
"type": "array",
"minItems": 1,
"items": {
"title": "Table Schema Field",
"type": "object",
"oneOf": [
{
"type": "object",
"title": "String Field",
"description": "The field contains strings, that is, sequences of characters.",
"required": [
"name"
],
"properties": {
"name": {
"title": "Name",
"description": "A name for this field.",
"type": "string"
},
"title": {
"title": "Title",
"description": "A human-readable title.",
"type": "string",
"examples": [
"{\n \"title\": \"My Package Title\"\n}\n"
]
},
"description": {
"title": "Description",
"description": "A text description. Markdown is encouraged.",
"type": "string",
"examples": [
"{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
]
},
"example": {
"title": "Example",
"description": "An example value for the field.",
"type": "string",
"examples": [
"{\n \"example\": \"Put here an example value for your field\"\n}\n"
]
},
"missingValues": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}
],
"default": [
""
],
"description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.",
"context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).",
"examples": [
"{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n",
"{\n \"missingValues\": []\n}\n"
]
},
"categories": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}
]
},
"categoriesOrdered": {
"type": "boolean"
},
"type": {
"description": "The type keyword, which `MUST` be a value of `string`.",
"enum": [
"string"
]
},
"format": {
"description": "The format keyword options for `string` are `default`, `email`, `uri`, `binary`, and `uuid`.",
"context": "The following `format` options are supported:\n * **default**: any valid string.\n * **email**: A valid email address.\n * **uri**: A valid URI.\n * **binary**: A base64 encoded string representing binary data.\n * **uuid**: A string that is a uuid.",
"enum": [
"default",
"email",
"uri",
"binary",
"uuid"
],
"default": "default"
},
"constraints": {
"title": "Constraints",
"description": "The following constraints are supported for `string` fields.",
"type": "object",
"properties": {
"required": {
"type": "boolean",
"description": "Indicates whether a property must have a value for each instance.",
"context": "An empty string is considered to be a missing value."
},
"unique": {
"type": "boolean",
"description": "When `true`, each value for the property `MUST` be unique."
},
"pattern": {
"type": "string",
"description": "A regular expression pattern to test each value of the property against, where a truthy response indicates validity.",
"context": "Regular expressions `SHOULD` conform to the [XML Schema regular expression syntax](http://www.w3.org/TR/xmlschema-2/#regexs)."
},
"enum": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string"
}
},
"minLength": {
"type": "integer",
"description": "An integer that specifies the minimum length of a value."
},
"maxLength": {
"type": "integer",
"description": "An integer that specifies the maximum length of a value."
}
}
},
"rdfType": {
"type": "string",
"description": "The RDF type for this field."
}
},
"examples": [
"{\n \"name\": \"name\",\n \"type\": \"string\"\n}\n",
"{\n \"name\": \"name\",\n \"type\": \"string\",\n \"format\": \"email\"\n}\n",
"{\n \"name\": \"name\",\n \"type\": \"string\",\n \"constraints\": {\n \"minLength\": 3,\n \"maxLength\": 35\n }\n}\n"
]
},
{
"type": "object",
"title": "Number Field",
"description": "The field contains numbers of any kind including decimals.",
"context": "The lexical formatting follows that of decimal in [XMLSchema](https://www.w3.org/TR/xmlschema-2/#decimal): a non-empty finite-length sequence of decimal digits separated by a period as a decimal indicator. An optional leading sign is allowed. If the sign is omitted, '+' is assumed. Leading and trailing zeroes are optional. If the fractional part is zero, the period and following zero(es) can be omitted. For example: '-1.23', '12678967.543233', '+100000.00', '210'.\n\nThe following special string values are permitted (case does not need to be respected):\n - NaN: not a number\n - INF: positive infinity\n - -INF: negative infinity\n\nA number `MAY` also have a trailing:\n - exponent: this `MUST` consist of an E followed by an optional + or - sign followed by one or more decimal digits (0-9)\n - percentage: the percentage sign: `%`. In conversion percentages should be divided by 100.\n\nIf both exponent and percentages are present the percentage `MUST` follow the exponent e.g. '53E10%' (equals 5.3).",
"required": [
"name",
"type"
],
"properties": {
"name": {
"title": "Name",
"description": "A name for this field.",
"type": "string"
},
"title": {
"title": "Title",
"description": "A human-readable title.",
"type": "string",
"examples": [
"{\n \"title\": \"My Package Title\"\n}\n"
]
},
"description": {
"title": "Description",
"description": "A text description. Markdown is encouraged.",
"type": "string",
"examples": [
"{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
]
},
"example": {
"title": "Example",
"description": "An example value for the field.",
"type": "string",
"examples": [
"{\n \"example\": \"Put here an example value for your field\"\n}\n"
]
},
"missingValues": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}
],
"default": [
""
],
"description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.",
"context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).",
"examples": [
"{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n",
"{\n \"missingValues\": []\n}\n"
]
},
"type": {
"description": "The type keyword, which `MUST` be a value of `number`.",
"enum": [
"number"
]
},
"format": {
"description": "There are no format keyword options for `number`: only `default` is allowed.",
"enum": [
"default"
],
"default": "default"
},
"bareNumber": {
"type": "boolean",
"title": "bareNumber",
"description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.",
"default": true
},
"groupChar": {
"type": "string",
"title": "groupChar",
"description": "A string whose value is used to group digits within the number. This property does not have a default value. A common value is `,` e.g. '100,000'."
},
"decimalChar": {
"type": "string",
"description": "A string whose value is used to represent a decimal point within the number. The default value is `.`."
},
"constraints": {
"title": "Constraints",
"description": "The following constraints are supported for `number` fields.",
"type": "object",
"properties": {
"required": {
"type": "boolean",
"description": "Indicates whether a property must have a value for each instance.",
"context": "An empty string is considered to be a missing value."
},
"unique": {
"type": "boolean",
"description": "When `true`, each value for the property `MUST` be unique."
},
"enum": {
"oneOf": [
{
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string"
}
},
{
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "number"
}
}
]
},
"minimum": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"maximum": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"exclusiveMinimum": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"exclusiveMaximum": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
}
]
}
}
},
"rdfType": {
"type": "string",
"description": "The RDF type for this field."
}
},
"examples": [
"{\n \"name\": \"field-name\",\n \"type\": \"number\"\n}\n",
"{\n \"name\": \"field-name\",\n \"type\": \"number\",\n \"constraints\": {\n \"enum\": [ \"1.00\", \"1.50\", \"2.00\" ]\n }\n}\n"
]
},
{
"type": "object",
"title": "Integer Field",
"description": "The field contains integers - that is whole numbers.",
"context": "Integer values are indicated in the standard way for any valid integer.",
"required": [
"name",
"type"
],
"properties": {
"name": {
"title": "Name",
"description": "A name for this field.",
"type": "string"
},
"title": {
"title": "Title",
"description": "A human-readable title.",
"type": "string",
"examples": [
"{\n \"title\": \"My Package Title\"\n}\n"
]
},
"description": {
"title": "Description",
"description": "A text description. Markdown is encouraged.",
"type": "string",
"examples": [
"{\n \"description\": \"# My Package description\\nAll about my package.\"\n}\n"
]
},
"example": {
"title": "Example",
"description": "An example value for the field.",
"type": "string",
"examples": [
"{\n \"example\": \"Put here an example value for your field\"\n}\n"
]
},
"missingValues": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "array",
"items": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
}
}
}
}
],
"default": [
""
],
"description": "Values that when encountered in the source, should be considered as `null`, 'not present', or 'blank' values.",
"context": "Many datasets arrive with missing data values, either because a value was not collected or it never existed.\nMissing values may be indicated simply by the value being empty in other cases a special value may have been used e.g. `-`, `NaN`, `0`, `-9999` etc.\nThe `missingValues` property provides a way to indicate that these values should be interpreted as equivalent to null.\n\n`missingValues` are strings rather than being the data type of the particular field. This allows for comparison prior to casting and for fields to have missing value which are not of their type, for example a `number` field to have missing values indicated by `-`.\n\nThe default value of `missingValue` for a non-string type field is the empty string `''`. For string type fields there is no default for `missingValue` (for string fields the empty string `''` is a valid value and need not indicate null).",
"examples": [
"{\n \"missingValues\": [\n \"-\",\n \"NaN\",\n \"\"\n ]\n}\n",
"{\n \"missingValues\": []\n}\n"
]
},
"categories": {
"anyOf": [
{
"type": "array",
"items": {
"type": "integer"
}
},
{
"type": "array",
"items": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "integer"
},
"label": {
"type": "string"
}
}
}
}
]
},
"categoriesOrdered": {
"type": "boolean"
},
"type": {
"description": "The type keyword, which `MUST` be a value of `integer`.",
"enum": [
"integer"
]
},
"format": {
"description": "There are no format keyword options for `integer`: only `default` is allowed.",
"enum": [
"default"
],
"default": "default"
},
"bareNumber": {
"type": "boolean",
"title": "bareNumber",
"description": "a boolean field with a default of `true`. If `true` the physical contents of this field must follow the formatting constraints already set out. If `false` the contents of this field may contain leading and/or trailing non-numeric characters (which implementors MUST therefore strip). The purpose of `bareNumber` is to allow publishers to publish numeric data that contains trailing characters such as percentages e.g. `95%` or leading characters such as currencies e.g. `€95` or `EUR 95`. Note that it is entirely up to implementors what, if anything, they do with stripped text.",
"default": true
},
"groupChar": {
"type": "string",
"title": "groupChar",
"description": "A string whose value is used to group digits within the number. This property does not have a default value. A common value is `,` e.g. '100,000'."
},
"constraints": {
"title": "Constraints",
"description": "The following constraints are supported for `integer` fields.",
"type": "object",
"properties": {
"required": {
"type": "boolean",
"description": "Indicates whether a property must have a value for each instance.",
"context": "An empty string is considered to be a missing value."
},
"unique": {
"type": "boolean",
"description": "When `true`, each value for the property `MUST` be unique."
},
"enum": {
"oneOf": [
{
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string"
}
},
{
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "integer"
}
}
]
},
"minimum": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"maximum": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}