Created
October 18, 2012 23:04
-
-
Save migurski/3915267 to your computer and use it in GitHub Desktop.
OSM Route Relation Refiner, see also data at http://teczno.com/s/c4c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' Extract route relations from osm2pgsql-generated database to CSV. | |
''' | |
from sys import argv | |
from csv import writer | |
from psycopg2 import connect | |
if __name__ == '__main__': | |
db = connect(database='raster_osm', user='osm').cursor() | |
db.execute('''SELECT id, tags | |
FROM planet_osm_rels | |
WHERE 'route' = ANY(tags) | |
-- LIMIT 10''') | |
keys = 'id network ref modifier osm_user'.split() | |
out = writer(open('extracted-routes.csv', 'w')) | |
out.writerow(keys) | |
for (id, tags) in db.fetchall(): | |
tags = dict(zip(tags[0::2], tags[1::2])) | |
if tags.get('type', '') == 'route': | |
network, ref, modifier, osm_user = [tags.get(key, '') for key in keys[1:]] | |
out.writerow((id, network, ref, modifier, osm_user)) | |
print id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression value.toString()", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "value.toString()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/^(\\w+)\\s+(\\d\\w*)$/, '$2 $1')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\b(Business|Spur|Alternate|Truck|Loop)\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\d", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/^(\\w+)\\s+(\\d\\w*)$/, '$2 $1')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/^FM /, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\b(Business|Spur|Alternate|Truck|Loop)\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\d", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/^FM /, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:cells['ref'].value.replace(/^.+\\b(\\w+)$/, '$1')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\b(Business|Spur|Alternate|Truck|Loop)\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:cells['ref'].value.replace(/^.+\\b(\\w+)$/, '$1')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/\\s\\w+$/, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\b(Business|Spur|Alternate|Truck|Loop)\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/\\s\\w+$/, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:cells['ref'].value.replace(/^.+\\b(\\w+)$/, '$1') + ' ' + value", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\b(Business|Spur|Alternate|Truck|Loop)\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:cells['ref'].value.replace(/^.+\\b(\\w+)$/, '$1') + ' ' + value", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/\\s\\w+$/, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\b(Business|Spur|Alternate|Truck|Loop)\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/\\s\\w+$/, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:value.replace(/\\d+ Spur \\(\\w+\\) \\d+ Spur \\(\\w+\\)/, 'Spur')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\b(Business|Spur|Alternate|Truck|Loop)\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:value.replace(/\\d+ Spur \\(\\w+\\) \\d+ Spur \\(\\w+\\)/, 'Spur')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/^(\\d+) .+$/, '$1')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\b(Business|Spur|Alternate|Truck|Loop)\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/^(\\d+) .+$/, '$1')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace(/^(us:\\w\\w):([^:]+)$/i, '$1:CR:$2')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "^CR\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace(/^(us:\\w\\w):([^:]+)$/i, '$1:CR:$2')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace(/:(CR|county)$/i, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "^CR\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "value", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:NY:CR:CR", | |
"l": "US:NY:CR:CR" | |
} | |
}, | |
{ | |
"v": { | |
"v": "US:IA:CR:county", | |
"l": "US:IA:CR:county" | |
} | |
}, | |
{ | |
"v": { | |
"v": "US:MN:CR:county", | |
"l": "US:MN:CR:county" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace(/:(CR|county)$/i, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace('lake of the Woods', 'Lake of the Woods')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "^CR\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "value", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:MN:CR:lake of the Woods", | |
"l": "US:MN:CR:lake of the Woods" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace('lake of the Woods', 'Lake of the Woods')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/^CR /, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "^CR\\b", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/^CR /, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/^\\w+ /, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^(\\w+) .+/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "VT", | |
"l": "VT" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ME", | |
"l": "ME" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ID", | |
"l": "ID" | |
} | |
}, | |
{ | |
"v": { | |
"v": "IL", | |
"l": "IL" | |
} | |
}, | |
{ | |
"v": { | |
"v": "MN", | |
"l": "MN" | |
} | |
}, | |
{ | |
"v": { | |
"v": "MO", | |
"l": "MO" | |
} | |
}, | |
{ | |
"v": { | |
"v": "TX", | |
"l": "TX" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ND", | |
"l": "ND" | |
} | |
}, | |
{ | |
"v": { | |
"v": "NY", | |
"l": "NY" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA", | |
"l": "CA" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM", | |
"l": "FM" | |
} | |
}, | |
{ | |
"v": { | |
"v": "SR", | |
"l": "SR" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/^\\w+ /, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:cells['ref'].value.replace(/^(\\w+) .+$/, '$1')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^(\\w+) .+/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Historic", | |
"l": "Historic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Toll", | |
"l": "Toll" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:cells['ref'].value.replace(/^(\\w+) .+$/, '$1')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/^\\w+ /, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^(\\w+) .+/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Historic", | |
"l": "Historic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Toll", | |
"l": "Toll" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/^\\w+ /, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace(/:county$/, ':CR')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^(\\w+) .+/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "CH", | |
"l": "CH" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace(/:county$/, ':CR')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/^CH /, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^(\\w+) .+/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "CH", | |
"l": "CH" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/^CH /, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:cells['ref'].value.replace(/^.+ (\\w+)$/, '$1')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^.+ (\\w+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ALT", | |
"l": "ALT" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:cells['ref'].value.replace(/^.+ (\\w+)$/, '$1')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:'Alternate'", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^.+ (\\w+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "ALT", | |
"l": "ALT" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
} | |
] | |
}, | |
{ | |
"query": "ALT", | |
"name": "modifier", | |
"caseSensitive": false, | |
"columnName": "modifier", | |
"type": "text", | |
"mode": "text" | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:'Alternate'", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/ \\w+$/, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^.+ (\\w+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ALT", | |
"l": "ALT" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/ \\w+$/, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:'Old'", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^(\\w+) .+/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Old", | |
"l": "Old" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:'Old'", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/Old /, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"query": "\\S+\\s+\\S+", | |
"name": "ref", | |
"caseSensitive": false, | |
"columnName": "ref", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^(\\w+) .+/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Old", | |
"l": "Old" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/Old /, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace('US:WI:Winnebago;US:WI:Calumet', 'US:WI:CR:Winnebago;US:WI:CR:Calumet')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Winnebago;US:WI:Calumet", | |
"l": "Winnebago;US:WI:Calumet" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Saratoga", | |
"l": "Saratoga" | |
} | |
}, | |
{ | |
"v": { | |
"v": "McHenry", | |
"l": "McHenry" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Middlesex", | |
"l": "Middlesex" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Union", | |
"l": "Union" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Schenectady", | |
"l": "Schenectady" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Morris", | |
"l": "Morris" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Wilkin", | |
"l": "Wilkin" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Rockland", | |
"l": "Rockland" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bergen", | |
"l": "Bergen" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Gloucester", | |
"l": "Gloucester" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Burlington", | |
"l": "Burlington" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Macon", | |
"l": "Macon" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Monmouth", | |
"l": "Monmouth" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Madison", | |
"l": "Madison" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Charlotte", | |
"l": "Charlotte" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Cumberland", | |
"l": "Cumberland" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Rensselaer", | |
"l": "Rensselaer" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Atlantic", | |
"l": "Atlantic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Essex", | |
"l": "Essex" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Cape_May", | |
"l": "Cape_May" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Passaic", | |
"l": "Passaic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Sussex", | |
"l": "Sussex" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Hudson", | |
"l": "Hudson" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Cook", | |
"l": "Cook" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Mercer", | |
"l": "Mercer" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Berkeley", | |
"l": "Berkeley" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Somerset", | |
"l": "Somerset" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Douglas", | |
"l": "Douglas" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Cape May", | |
"l": "Cape May" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Lake", | |
"l": "Lake" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Warren", | |
"l": "Warren" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Columbia", | |
"l": "Columbia" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Orange", | |
"l": "Orange" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Clay", | |
"l": "Clay" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Ocean", | |
"l": "Ocean" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Dupage", | |
"l": "Dupage" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Camden", | |
"l": "Camden" | |
} | |
} | |
] | |
}, | |
{ | |
"expression": "value", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:WI:Winnebago;US:WI:Calumet", | |
"l": "US:WI:Winnebago;US:WI:Calumet" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace('US:WI:Winnebago;US:WI:Calumet', 'US:WI:CR:Winnebago;US:WI:CR:Calumet')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace(/^(us:\\w\\w):([^:]+)$/i, '$1:CR:$2')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Saratoga", | |
"l": "Saratoga" | |
} | |
}, | |
{ | |
"v": { | |
"v": "McHenry", | |
"l": "McHenry" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Middlesex", | |
"l": "Middlesex" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Union", | |
"l": "Union" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Schenectady", | |
"l": "Schenectady" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Morris", | |
"l": "Morris" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Wilkin", | |
"l": "Wilkin" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Rockland", | |
"l": "Rockland" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bergen", | |
"l": "Bergen" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Gloucester", | |
"l": "Gloucester" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Burlington", | |
"l": "Burlington" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Macon", | |
"l": "Macon" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Monmouth", | |
"l": "Monmouth" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Madison", | |
"l": "Madison" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Charlotte", | |
"l": "Charlotte" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Cumberland", | |
"l": "Cumberland" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Rensselaer", | |
"l": "Rensselaer" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Atlantic", | |
"l": "Atlantic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Essex", | |
"l": "Essex" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Cape_May", | |
"l": "Cape_May" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Passaic", | |
"l": "Passaic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Sussex", | |
"l": "Sussex" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Hudson", | |
"l": "Hudson" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Cook", | |
"l": "Cook" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Mercer", | |
"l": "Mercer" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Berkeley", | |
"l": "Berkeley" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Somerset", | |
"l": "Somerset" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Douglas", | |
"l": "Douglas" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Cape May", | |
"l": "Cape May" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Lake", | |
"l": "Lake" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Warren", | |
"l": "Warren" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Columbia", | |
"l": "Columbia" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Orange", | |
"l": "Orange" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Clay", | |
"l": "Clay" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Ocean", | |
"l": "Ocean" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Dupage", | |
"l": "Dupage" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Camden", | |
"l": "Camden" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Winnebago;US:WI:Calumet", | |
"l": "Winnebago;US:WI:Calumet" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace(/^(us:\\w\\w):([^:]+)$/i, '$1:CR:$2')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:cells['network'].value.replace(/^.+:(\\w+)$/, '$1')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Parkway", | |
"l": "Parkway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic Byway", | |
"l": "Scenic Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "WAY", | |
"l": "WAY" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Beltway", | |
"l": "Beltway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Alternate", | |
"l": "Alternate" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Byway", | |
"l": "Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Truck", | |
"l": "Truck" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Turnpike", | |
"l": "Turnpike" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:Spur", | |
"l": "FM:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Belt", | |
"l": "Belt" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Toll", | |
"l": "Toll" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Loop", | |
"l": "Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Spur", | |
"l": "Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business", | |
"l": "Business" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Loop", | |
"l": "Business:Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:SPUR", | |
"l": "FM:SPUR" | |
} | |
}, | |
{ | |
"v": { | |
"v": "emergency", | |
"l": "emergency" | |
} | |
}, | |
{ | |
"v": { | |
"v": "BUSINESS", | |
"l": "BUSINESS" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Spur", | |
"l": "Business:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
} | |
] | |
}, | |
{ | |
"expression": "value", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "modifier", | |
"selectBlank": true, | |
"columnName": "modifier", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:cells['network'].value.replace(/^.+:(\\w+)$/, '$1')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:cells['network'].value.replace(/^\\w+:\\w+:(\\w+):(\\w+)$/, '$1 $2')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Business:Loop", | |
"l": "Business:Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Spur", | |
"l": "Business:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Parkway", | |
"l": "Parkway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic Byway", | |
"l": "Scenic Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "emergency", | |
"l": "emergency" | |
} | |
}, | |
{ | |
"v": { | |
"v": "WAY", | |
"l": "WAY" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Beltway", | |
"l": "Beltway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Alternate", | |
"l": "Alternate" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Byway", | |
"l": "Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Truck", | |
"l": "Truck" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Turnpike", | |
"l": "Turnpike" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:Spur", | |
"l": "FM:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Belt", | |
"l": "Belt" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Toll", | |
"l": "Toll" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Loop", | |
"l": "Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Spur", | |
"l": "Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "BUSINESS", | |
"l": "BUSINESS" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business", | |
"l": "Business" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:SPUR", | |
"l": "FM:SPUR" | |
} | |
} | |
] | |
}, | |
{ | |
"expression": "value", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:I:Business:Spur", | |
"l": "US:I:Business:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "US:I:Business:Loop", | |
"l": "US:I:Business:Loop" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:cells['network'].value.replace(/^\\w+:\\w+:(\\w+):(\\w+)$/, '$1 $2')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace(/^US:I:Business:(Loop|Spur)/, 'US:I')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Business:Loop", | |
"l": "Business:Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Spur", | |
"l": "Business:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Parkway", | |
"l": "Parkway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic Byway", | |
"l": "Scenic Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "emergency", | |
"l": "emergency" | |
} | |
}, | |
{ | |
"v": { | |
"v": "WAY", | |
"l": "WAY" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Beltway", | |
"l": "Beltway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Alternate", | |
"l": "Alternate" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Byway", | |
"l": "Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Truck", | |
"l": "Truck" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Turnpike", | |
"l": "Turnpike" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:Spur", | |
"l": "FM:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Belt", | |
"l": "Belt" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Toll", | |
"l": "Toll" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Loop", | |
"l": "Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Spur", | |
"l": "Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "BUSINESS", | |
"l": "BUSINESS" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business", | |
"l": "Business" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:SPUR", | |
"l": "FM:SPUR" | |
} | |
} | |
] | |
}, | |
{ | |
"expression": "value", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:I:Business:Spur", | |
"l": "US:I:Business:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "US:I:Business:Loop", | |
"l": "US:I:Business:Loop" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace(/^US:I:Business:(Loop|Spur)/, 'US:I')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:value.replace('US:IA:Scenic Byway', 'Scenic Byway')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Scenic Byway", | |
"l": "Scenic Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Truck", | |
"l": "Truck" | |
} | |
}, | |
{ | |
"v": { | |
"v": "emergency", | |
"l": "emergency" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business", | |
"l": "Business" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Alternate", | |
"l": "Alternate" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Spur", | |
"l": "Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Toll", | |
"l": "Toll" | |
} | |
}, | |
{ | |
"v": { | |
"v": "BUSINESS", | |
"l": "BUSINESS" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Parkway", | |
"l": "Parkway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "WAY", | |
"l": "WAY" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Beltway", | |
"l": "Beltway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Byway", | |
"l": "Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Turnpike", | |
"l": "Turnpike" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:Spur", | |
"l": "FM:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Belt", | |
"l": "Belt" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Loop", | |
"l": "Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:SPUR", | |
"l": "FM:SPUR" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Loop", | |
"l": "Business:Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Spur", | |
"l": "Business:Spur" | |
} | |
} | |
] | |
}, | |
{ | |
"expression": "value", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:IA:Scenic Byway", | |
"l": "US:IA:Scenic Byway" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:value.replace('US:IA:Scenic Byway', 'Scenic Byway')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:''", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "WAY", | |
"l": "WAY" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Turnpike", | |
"l": "Turnpike" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Truck", | |
"l": "Truck" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Byway", | |
"l": "Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Alternate", | |
"l": "Alternate" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business", | |
"l": "Business" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Parkway", | |
"l": "Parkway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic Byway", | |
"l": "Scenic Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "emergency", | |
"l": "emergency" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Spur", | |
"l": "Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Toll", | |
"l": "Toll" | |
} | |
}, | |
{ | |
"v": { | |
"v": "BUSINESS", | |
"l": "BUSINESS" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Beltway", | |
"l": "Beltway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:Spur", | |
"l": "FM:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Belt", | |
"l": "Belt" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Loop", | |
"l": "Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:SPUR", | |
"l": "FM:SPUR" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Loop", | |
"l": "Business:Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Spur", | |
"l": "Business:Spur" | |
} | |
} | |
] | |
}, | |
{ | |
"expression": "value", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:OH:WAY", | |
"l": "US:OH:WAY" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:''", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column modifier using expression grel:'Spur'", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "FM:SPUR", | |
"l": "FM:SPUR" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:Spur", | |
"l": "FM:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business", | |
"l": "Business" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Beltway", | |
"l": "Beltway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Belt", | |
"l": "Belt" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Turnpike", | |
"l": "Turnpike" | |
} | |
}, | |
{ | |
"v": { | |
"v": "WAY", | |
"l": "WAY" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Truck", | |
"l": "Truck" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Byway", | |
"l": "Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Alternate", | |
"l": "Alternate" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Parkway", | |
"l": "Parkway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic Byway", | |
"l": "Scenic Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "emergency", | |
"l": "emergency" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Spur", | |
"l": "Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Toll", | |
"l": "Toll" | |
} | |
}, | |
{ | |
"v": { | |
"v": "BUSINESS", | |
"l": "BUSINESS" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Loop", | |
"l": "Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Loop", | |
"l": "Business:Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Spur", | |
"l": "Business:Spur" | |
} | |
} | |
] | |
}, | |
{ | |
"expression": "value", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:TX:FM:Spur", | |
"l": "US:TX:FM:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "US:TX:FM:SPUR", | |
"l": "US:TX:FM:SPUR" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "modifier", | |
"expression": "grel:'Spur'", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace(/:[^:]+$/, '')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Parkway", | |
"l": "Parkway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic Byway", | |
"l": "Scenic Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "emergency", | |
"l": "emergency" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Scenic", | |
"l": "Scenic" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Beltway", | |
"l": "Beltway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Connector", | |
"l": "Connector" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Alternate", | |
"l": "Alternate" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Byway", | |
"l": "Byway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Truck", | |
"l": "Truck" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Turnpike", | |
"l": "Turnpike" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:Spur", | |
"l": "FM:Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Belt", | |
"l": "Belt" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Bypass", | |
"l": "Bypass" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Toll", | |
"l": "Toll" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Loop", | |
"l": "Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Spur", | |
"l": "Spur" | |
} | |
}, | |
{ | |
"v": { | |
"v": "BUSINESS", | |
"l": "BUSINESS" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business", | |
"l": "Business" | |
} | |
}, | |
{ | |
"v": { | |
"v": "FM:SPUR", | |
"l": "FM:SPUR" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Loop", | |
"l": "Business:Loop" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Business:Spur", | |
"l": "Business:Spur" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace(/:[^:]+$/, '')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace(/:county$/i, ':CR')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "county", | |
"l": "county" | |
} | |
}, | |
{ | |
"v": { | |
"v": "County", | |
"l": "County" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace(/:county$/i, ':CR')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:'US:Auto Trail'", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:auto_trail", | |
"l": "US:auto_trail" | |
} | |
}, | |
{ | |
"v": { | |
"v": "US:Auto_Trail", | |
"l": "US:Auto_Trail" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:'US:Auto Trail'", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:'US:NHS High Priority Corridors'", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "US:NHS_High_Priority_Corridors", | |
"l": "US:NHS_High_Priority_Corridors" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:'US:NHS High Priority Corridors'", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace('US:NC:Strategic_Highway_Corridors', 'US:NC:Strategic Highway Corridors')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"query": "^US:", | |
"name": "network", | |
"caseSensitive": false, | |
"columnName": "network", | |
"type": "text", | |
"mode": "regex" | |
}, | |
{ | |
"expression": "grel:value.replace(/^\\w+:\\w+:(.+)$/, '$1')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Strategic_Highway_Corridors", | |
"l": "Strategic_Highway_Corridors" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace('US:NC:Strategic_Highway_Corridors', 'US:NC:Strategic Highway Corridors')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/row-removal", | |
"description": "Remove rows", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"expression": "grel:value.length()", | |
"invert": false, | |
"selectError": true, | |
"omitError": false, | |
"name": "ref", | |
"selectBlank": false, | |
"columnName": "ref", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [] | |
} | |
], | |
"mode": "row-based" | |
} | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace(/...(\\w\\w):([^:]+)$/, 'US:$1:CR:$2')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"expression": "grel:value.replace(/^US:.+/, '---')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "USLNJ:Warren", | |
"l": "USLNJ:Warren" | |
} | |
}, | |
{ | |
"v": { | |
"v": "UW:MN:Lake", | |
"l": "UW:MN:Lake" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace(/...(\\w\\w):([^:]+)$/, 'US:$1:CR:$2')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace('OH:US:CAR', 'US:OH:CAR')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"expression": "grel:value.replace(/^US:.+/, '---')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "OH:US:CAR", | |
"l": "OH:US:CAR" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace('OH:US:CAR', 'US:OH:CAR')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:value.replace('IS:IA:county', 'US:IA:CR')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"expression": "grel:value.replace(/^US:.+/, '---')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "IS:IA:county", | |
"l": "IS:IA:county" | |
} | |
}, | |
{ | |
"v": { | |
"v": "USLNJ:Warren", | |
"l": "USLNJ:Warren" | |
} | |
}, | |
{ | |
"v": { | |
"v": "UW:MN:Lake", | |
"l": "UW:MN:Lake" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:value.replace('IS:IA:county', 'US:IA:CR')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/row-removal", | |
"description": "Remove rows", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"expression": "grel:value.replace(/^US:.+/, '---')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "ca_on_county", | |
"l": "ca_on_county" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_on_trailblazer", | |
"l": "ca_on_trailblazer" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA:MB:TCH", | |
"l": "CA:MB:TCH" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_qc_primary", | |
"l": "ca_qc_primary" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA:MB", | |
"l": "CA:MB" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_bc_primary", | |
"l": "ca_bc_primary" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA:NS", | |
"l": "CA:NS" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA:ON", | |
"l": "CA:ON" | |
} | |
}, | |
{ | |
"v": { | |
"v": "Société de Transport du Saguenay", | |
"l": "Société de Transport du Saguenay" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_on_secondary", | |
"l": "ca_on_secondary" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_on", | |
"l": "ca_on" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_ab_primary", | |
"l": "ca_ab_primary" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA:NB", | |
"l": "CA:NB" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA:QC", | |
"l": "CA:QC" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_qc", | |
"l": "ca_qc" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_on_municipal_expressway", | |
"l": "ca_on_municipal_expressway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "MX:MX", | |
"l": "MX:MX" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_on_primary_etr", | |
"l": "ca_on_primary_etr" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA:AB", | |
"l": "CA:AB" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_transcanada", | |
"l": "ca_transcanada" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA", | |
"l": "CA" | |
} | |
}, | |
{ | |
"v": { | |
"v": "CA:SK", | |
"l": "CA:SK" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_on_primary", | |
"l": "ca_on_primary" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ca_on_primary_former", | |
"l": "ca_on_primary_former" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
} | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column network using expression grel:'US:VT'", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"expression": "grel:value.replace(/^US:.+/, '---')", | |
"invert": false, | |
"selectError": false, | |
"omitError": false, | |
"name": "network", | |
"selectBlank": false, | |
"columnName": "network", | |
"omitBlank": false, | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "VT", | |
"l": "VT" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "network", | |
"expression": "grel:'US:VT'", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/row-removal", | |
"description": "Remove rows", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"invert": false, | |
"expression": "value", | |
"selectError": false, | |
"omitError": false, | |
"selectBlank": false, | |
"name": "route", | |
"omitBlank": false, | |
"columnName": "route", | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "shared", | |
"l": "shared" | |
} | |
}, | |
{ | |
"v": { | |
"v": "ski", | |
"l": "ski" | |
} | |
}, | |
{ | |
"v": { | |
"v": "cycle", | |
"l": "cycle" | |
} | |
}, | |
{ | |
"v": { | |
"v": "bus", | |
"l": "bus" | |
} | |
}, | |
{ | |
"v": { | |
"v": "foot; aerialway; tram", | |
"l": "foot; aerialway; tram" | |
} | |
}, | |
{ | |
"v": { | |
"v": "foot", | |
"l": "foot" | |
} | |
}, | |
{ | |
"v": { | |
"v": "aerialway", | |
"l": "aerialway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "tram", | |
"l": "tram" | |
} | |
}, | |
{ | |
"v": { | |
"v": "trolleybus", | |
"l": "trolleybus" | |
} | |
}, | |
{ | |
"v": { | |
"v": "light_rail", | |
"l": "light_rail" | |
} | |
}, | |
{ | |
"v": { | |
"v": "hiking", | |
"l": "hiking" | |
} | |
}, | |
{ | |
"v": { | |
"v": "bicycle", | |
"l": "bicycle" | |
} | |
}, | |
{ | |
"v": { | |
"v": "lcn", | |
"l": "lcn" | |
} | |
}, | |
{ | |
"v": { | |
"v": "subway", | |
"l": "subway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "railway", | |
"l": "railway" | |
} | |
}, | |
{ | |
"v": { | |
"v": "mtb", | |
"l": "mtb" | |
} | |
}, | |
{ | |
"v": { | |
"v": "train", | |
"l": "train" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
} | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column ref using expression grel:value.replace(/^(\\d+) .+$/, '$1')", | |
"engineConfig": { | |
"facets": [ | |
{ | |
"invert": false, | |
"expression": "value", | |
"selectError": false, | |
"omitError": false, | |
"selectBlank": false, | |
"name": "modifier", | |
"omitBlank": false, | |
"columnName": "modifier", | |
"type": "list", | |
"selection": [ | |
{ | |
"v": { | |
"v": "Historic", | |
"l": "Historic" | |
} | |
} | |
] | |
} | |
], | |
"mode": "row-based" | |
}, | |
"columnName": "ref", | |
"expression": "grel:value.replace(/^(\\d+) .+$/, '$1')", | |
"onError": "set-to-blank", | |
"repeat": false, | |
"repeatCount": 10 | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment