Skip to content

Commit

Permalink
Using missingValues instead of nulls in json files
Browse files Browse the repository at this point in the history
This is being added to the datapackage spec. See:
frictionlessdata/datapackage#353
  • Loading branch information
ethanwhite committed Jan 12, 2017
1 parent 8b094d1 commit e78d039
Show file tree
Hide file tree
Showing 23 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion lib/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def add_dialect(table_dict, table):
for (key, val) in table['dialect'].items():
# dialect related key-value pairs
# copied as is
if key == "nulls":
if key == "missingValues":
table_dict[
'cleanup'] = "Cleanup(correct_invalid_value, nulls=" + str(val) + ")"

Expand Down
6 changes: 3 additions & 3 deletions scripts/Adler2007.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -40,7 +40,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
],
"replace_columns": [
Expand Down Expand Up @@ -96,7 +96,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
],
"replace_columns": [
Expand Down
4 changes: 2 additions & 2 deletions scripts/Adult.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dialect": {
"delimiter": ",",
"header_rows": "0",
"nulls": "?"
"missingValues": "?"
},
"name": "data",
"schema": {
Expand Down Expand Up @@ -94,7 +94,7 @@
"dialect": {
"delimiter": ",",
"header_rows": "1",
"nulls": "?"
"missingValues": "?"
},
"name": "test",
"schema": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/AmnioteDB.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{
"dialect": {
"delimiter": ",",
"nulls": [
"missingValues": [
-999
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/AvianBodySize.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
-999
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/CForBioData.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/FishParasiteHosts.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
"na"
],
"replace_columns": [
Expand Down
2 changes: 1 addition & 1 deletion scripts/FrayJorge.json
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
".",
"n/a"
]
Expand Down
2 changes: 1 addition & 1 deletion scripts/HomeRanges.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/MammalDiet.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
{
"dialect": {
"contains_pk": "True",
"nulls": [
"missingValues": [
"NA"
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/MammalMR2010.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
-9999
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/MarineSize.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
"n/a",
"0.0000E+00"
]
Expand Down
8 changes: 4 additions & 4 deletions scripts/Matter2014.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
"n/a"
]
},
Expand All @@ -20,7 +20,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"n/a"
]
},
Expand All @@ -30,7 +30,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"n/a"
]
},
Expand All @@ -40,7 +40,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"n/a"
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/MoM2003.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
-999
],
"header_rows": 0
Expand Down
2 changes: 1 addition & 1 deletion scripts/Palmer2007.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
".",
""
],
Expand Down
12 changes: 6 additions & 6 deletions scripts/PhytoplankonBiovolume.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -20,7 +20,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -30,7 +30,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -40,7 +40,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -50,7 +50,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -60,7 +60,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/PortalMammals.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dialect": {
"contains_pk": "True",
"delimiter": ",",
"nulls": [
"missingValues": [
"",
null
]
Expand Down
2 changes: 1 addition & 1 deletion scripts/Ramesh2010.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand Down
18 changes: 9 additions & 9 deletions scripts/SonoranPerennials.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"resources": [
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -18,7 +18,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -28,7 +28,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -38,7 +38,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -48,7 +48,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -58,7 +58,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -68,7 +68,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand All @@ -78,7 +78,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA",
"nd"
]
Expand All @@ -89,7 +89,7 @@
},
{
"dialect": {
"nulls": [
"missingValues": [
"NA"
]
},
Expand Down
Loading

0 comments on commit e78d039

Please sign in to comment.