jsonstat-validator 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. jsonstat_validator/__init__.py +34 -0
  2. jsonstat_validator/tests/__init__.py +1 -0
  3. jsonstat_validator/tests/conftest.py +10 -0
  4. jsonstat_validator/tests/custom_tests.py +411 -0
  5. jsonstat_validator/tests/samples/areas/canada.json +16 -0
  6. jsonstat_validator/tests/samples/areas/galicia.json +16 -0
  7. jsonstat_validator/tests/samples/areas/index.json +31 -0
  8. jsonstat_validator/tests/samples/areas/oecd.json +16 -0
  9. jsonstat_validator/tests/samples/areas/us.json +26 -0
  10. jsonstat_validator/tests/samples/canada.json +131 -0
  11. jsonstat_validator/tests/samples/datasets/index.json +51 -0
  12. jsonstat_validator/tests/samples/galicia.json +124 -0
  13. jsonstat_validator/tests/samples/hierarchy.json +200 -0
  14. jsonstat_validator/tests/samples/index.json +36 -0
  15. jsonstat_validator/tests/samples/metrics/gdp/gsp.json +16 -0
  16. jsonstat_validator/tests/samples/metrics/gdp/gsppc.json +16 -0
  17. jsonstat_validator/tests/samples/metrics/gdp/gspw.json +16 -0
  18. jsonstat_validator/tests/samples/metrics/gdp/index.json +26 -0
  19. jsonstat_validator/tests/samples/metrics/index.json +26 -0
  20. jsonstat_validator/tests/samples/metrics/lfs/employed.json +16 -0
  21. jsonstat_validator/tests/samples/metrics/lfs/index.json +31 -0
  22. jsonstat_validator/tests/samples/metrics/lfs/lf.json +16 -0
  23. jsonstat_validator/tests/samples/metrics/lfs/unemployed.json +16 -0
  24. jsonstat_validator/tests/samples/metrics/lfs/unr.json +21 -0
  25. jsonstat_validator/tests/samples/metrics/pop/index.json +21 -0
  26. jsonstat_validator/tests/samples/metrics/pop/pop.json +26 -0
  27. jsonstat_validator/tests/samples/metrics/pop/popw.json +16 -0
  28. jsonstat_validator/tests/samples/oecd.json +170 -0
  29. jsonstat_validator/tests/samples/order.json +38 -0
  30. jsonstat_validator/tests/samples/sources/bls.json +21 -0
  31. jsonstat_validator/tests/samples/sources/ige.json +16 -0
  32. jsonstat_validator/tests/samples/sources/index.json +41 -0
  33. jsonstat_validator/tests/samples/sources/jsonstat.json +21 -0
  34. jsonstat_validator/tests/samples/sources/oecd.json +16 -0
  35. jsonstat_validator/tests/samples/sources/statcan.json +16 -0
  36. jsonstat_validator/tests/samples/sources/wikipedia.json +16 -0
  37. jsonstat_validator/tests/samples/topics/accounts.json +16 -0
  38. jsonstat_validator/tests/samples/topics/demos.json +21 -0
  39. jsonstat_validator/tests/samples/topics/index.json +31 -0
  40. jsonstat_validator/tests/samples/topics/labor.json +26 -0
  41. jsonstat_validator/tests/samples/topics/population.json +26 -0
  42. jsonstat_validator/tests/samples/us-gsp.json +230 -0
  43. jsonstat_validator/tests/samples/us-labor.json +6509 -0
  44. jsonstat_validator/tests/samples/us-unr.json +3269 -0
  45. jsonstat_validator/tests/test_official_samples.py +51 -0
  46. jsonstat_validator/validator.py +608 -0
  47. jsonstat_validator-0.1.0.dist-info/LICENSE +21 -0
  48. jsonstat_validator-0.1.0.dist-info/METADATA +196 -0
  49. jsonstat_validator-0.1.0.dist-info/RECORD +51 -0
  50. jsonstat_validator-0.1.0.dist-info/WHEEL +5 -0
  51. jsonstat_validator-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,26 @@
1
+ {
2
+ "version" : "2.0",
3
+ "class" : "collection",
4
+ "href" : "http://json-stat.org/samples/topics/labor.json",
5
+ "label" : "Topic: Labor",
6
+ "updated" : "2016-01-01",
7
+ "link" : {
8
+ "item" : [
9
+ {
10
+ "class" : "dataset",
11
+ "href" : "http://json-stat.org/samples/oecd.json",
12
+ "label" : "Unemployment rate in the OECD countries 2003-2014"
13
+ },
14
+ {
15
+ "class" : "dataset",
16
+ "href" : "http://json-stat.org/samples/us-unr.json",
17
+ "label" : "Unemployment Rates by County, 2012 Annual Averages"
18
+ },
19
+ {
20
+ "class" : "dataset",
21
+ "href" : "http://json-stat.org/samples/us-labor.json",
22
+ "label" : "Labor Force Data by County, 2012 Annual Averages"
23
+ }
24
+ ]
25
+ }
26
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "version" : "2.0",
3
+ "class" : "collection",
4
+ "href" : "http://json-stat.org/samples/topics/population.json",
5
+ "label" : "Topic: Population",
6
+ "updated" : "2016-01-01",
7
+ "link" : {
8
+ "item" : [
9
+ {
10
+ "class" : "dataset",
11
+ "href" : "http://json-stat.org/samples/canada.json",
12
+ "label" : "Population by sex and age group. Canada. 2012"
13
+ },
14
+ {
15
+ "class" : "dataset",
16
+ "href" : "http://json-stat.org/samples/galicia.json",
17
+ "label" : "Population by province of residence, place of birth, age, gender and year in Galicia"
18
+ },
19
+ {
20
+ "class" : "dataset",
21
+ "href" : "http://json-stat.org/samples/us-gsp.json",
22
+ "label" : "US States by GSP and population"
23
+ }
24
+ ]
25
+ }
26
+ }
@@ -0,0 +1,230 @@
1
+ {
2
+ "version" : "2.0",
3
+ "class" : "dataset",
4
+ "href" : "https://json-stat.org/samples/us-gsp.json",
5
+ "label" : "US States by GSP and population",
6
+ "source" : "Wikipedia (usgovernmentrevenue.com)",
7
+ "updated" : "2013-10-03",
8
+ "value" : [
9
+ 174400,1.2,4.8,36333,
10
+ 45600,0.31,0.7,65143,
11
+ 261300,1.8,6.4,40828,
12
+ 105800,0.73,2.9,36483,
13
+ 2080600,13.34,37.3,51914,
14
+ 259700,1.79,5,51940,
15
+ 233400,1.61,3.6,64833,
16
+ 62700,0.43,0.9,69667,
17
+ 104700,0.72,0.6,174500,
18
+ 754000,5.2,18.8,40106,
19
+ 403100,2.79,9.7,41711,
20
+ 68900,0.47,1.4,49214,
21
+ 54800,0.38,1.6,34250,
22
+ 644200,4.44,12.8,50328,
23
+ 267600,1.84,6.5,41169,
24
+ 147200,1.01,3,49067,
25
+ 128500,0.89,2.9,44310,
26
+ 161400,1.11,4.3,37535,
27
+ 213600,1.47,4.5,47467,
28
+ 53200,0.37,1.3,40923,
29
+ 300000,2.07,5.8,51724,
30
+ 377700,2.6,6.5,58108,
31
+ 372400,2.57,9.9,37616,
32
+ 267100,1.84,5.3,50396,
33
+ 98900,0.68,3,32967,
34
+ 246700,1.7,6,41117,
35
+ 37200,0.26,1,37200,
36
+ 89600,0.62,1.8,49778,
37
+ 127500,0.88,2.7,47222,
38
+ 61600,0.42,1.3,47385,
39
+ 497000,3.42,8.8,56477,
40
+ 75500,0.52,2.1,35952,
41
+ 1156500,7.68,19.4,57423,
42
+ 407400,2.81,9.5,42884,
43
+ 33400,0.23,0.7,47714,
44
+ 483400,3.33,11.5,42035,
45
+ 160500,1.11,3.8,42237,
46
+ 168900,1.16,3.8,44447,
47
+ 575600,3.97,12.7,45323,
48
+ 49500,0.34,1.1,45000,
49
+ 164300,1.13,4.6,35717,
50
+ 39900,0.27,0.8,49875,
51
+ 250300,1.72,6.3,39730,
52
+ 1458300,8.92,25.1,58099,
53
+ 116900,0.81,2.8,41750,
54
+ 26400,0.18,0.6,44000,
55
+ 427700,2.95,8,53463,
56
+ 351100,2.42,6.7,52403,
57
+ 66600,0.46,1.9,35053,
58
+ 251400,1.73,5.7,44105,
59
+ 38200,0.26,0.6,63667
60
+ ],
61
+ "id" : ["year", "state", "concept"],
62
+ "size" : [1, 51, 4],
63
+ "role" :{
64
+ "time" : ["year"],
65
+ "geo" : ["state"],
66
+ "metric" : ["concept"]
67
+ },
68
+ "dimension" : {
69
+ "concept" : {
70
+ "label" : "concepts",
71
+ "category" : {
72
+ "index" : {
73
+ "gsp" : 0,
74
+ "perc" : 1,
75
+ "pop": 2,
76
+ "capita": 3
77
+ },
78
+ "label" : {
79
+ "gsp" : "Gross State Product",
80
+ "perc" : "Gross State Product as percentage of national GDP",
81
+ "pop": "population",
82
+ "capita": "Gross State Product per capita"
83
+ },
84
+ "unit" : {
85
+ "gsp" : {
86
+ "symbol" : "$",
87
+ "position" : "start",
88
+ "label": "million",
89
+ "decimals": 0
90
+ },
91
+ "perc" : {
92
+ "symbol" : "%",
93
+ "position" : "end",
94
+ "decimals": 2
95
+ },
96
+ "pop" : {
97
+ "label": "million",
98
+ "decimals": 1
99
+ },
100
+ "capita" : {
101
+ "symbol" : "$",
102
+ "position" : "start",
103
+ "decimals": 0
104
+ }
105
+ }
106
+ }
107
+ },
108
+
109
+ "year" : {
110
+ "label" : "year",
111
+ "category" : {
112
+ "index" : {
113
+ "2013" : 0
114
+ }
115
+ }
116
+ },
117
+
118
+ "state" : {
119
+ "label" : "state",
120
+ "category" : {
121
+ "index" : {
122
+ "01": 0,
123
+ "02": 1,
124
+ "04": 2,
125
+ "05": 3,
126
+ "06": 4,
127
+ "08": 5,
128
+ "09": 6,
129
+ "10": 7,
130
+ "11": 8,
131
+ "12": 9,
132
+ "13": 10,
133
+ "15": 11,
134
+ "16": 12,
135
+ "17": 13,
136
+ "18": 14,
137
+ "19": 15,
138
+ "20": 16,
139
+ "21": 17,
140
+ "22": 18,
141
+ "23": 19,
142
+ "24": 20,
143
+ "25": 21,
144
+ "26": 22,
145
+ "27": 23,
146
+ "28": 24,
147
+ "29": 25,
148
+ "30": 26,
149
+ "31": 27,
150
+ "32": 28,
151
+ "33": 29,
152
+ "34": 30,
153
+ "35": 31,
154
+ "36": 32,
155
+ "37": 33,
156
+ "38": 34,
157
+ "39": 35,
158
+ "40": 36,
159
+ "41": 37,
160
+ "42": 38,
161
+ "44": 39,
162
+ "45": 40,
163
+ "46": 41,
164
+ "47": 42,
165
+ "48": 43,
166
+ "49": 44,
167
+ "50": 45,
168
+ "51": 46,
169
+ "53": 47,
170
+ "54": 48,
171
+ "55": 49,
172
+ "56": 50
173
+ },
174
+ "label" : {
175
+ "01": "Alabama",
176
+ "02": "Alaska",
177
+ "04": "Arizona",
178
+ "05": "Arkansas",
179
+ "06": "California",
180
+ "08": "Colorado",
181
+ "09": "Connecticut",
182
+ "10": "Delaware",
183
+ "11": "District of Columbia",
184
+ "12": "Florida",
185
+ "13": "Georgia",
186
+ "15": "Hawaii",
187
+ "16": "Idaho",
188
+ "17": "Illinois",
189
+ "18": "Indiana",
190
+ "19": "Iowa",
191
+ "20": "Kansas",
192
+ "21": "Kentucky",
193
+ "22": "Louisiana",
194
+ "23": "Maine",
195
+ "24": "Maryland",
196
+ "25": "Massachusetts",
197
+ "26": "Michigan",
198
+ "27": "Minnesota",
199
+ "28": "Mississippi",
200
+ "29": "Missouri",
201
+ "30": "Montana",
202
+ "31": "Nebraska",
203
+ "32": "Nevada",
204
+ "33": "New Hampshire",
205
+ "34": "New Jersey",
206
+ "35": "New Mexico",
207
+ "36": "New York",
208
+ "37": "North Carolina",
209
+ "38": "North Dakota",
210
+ "39": "Ohio",
211
+ "40": "Oklahoma",
212
+ "41": "Oregon",
213
+ "42": "Pennsylvania",
214
+ "44": "Rhode Island",
215
+ "45": "South Carolina",
216
+ "46": "South Dakota",
217
+ "47": "Tennessee",
218
+ "48": "Texas",
219
+ "49": "Utah",
220
+ "50": "Vermont",
221
+ "51": "Virginia",
222
+ "53": "Washington",
223
+ "54": "West Virginia",
224
+ "55": "Wisconsin",
225
+ "56": "Wyoming"
226
+ }
227
+ }
228
+ }
229
+ }
230
+ }