Created
July 26, 2013 10:42
-
-
Save psychemedia/6087946 to your computer and use it in GitHub Desktop.
OpenRefine script for cleaning IW transparency CSV data http://www.iwight.com/Council/transparency/Our-Finances/Transparency-Our-Finances/Spending-and-Finance2
This file contains hidden or 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/column-rename", | |
| "description": "Rename column Capital or Revenue to CapitalOrRevenue", | |
| "oldColumnName": "Capital or Revenue", | |
| "newColumnName": "CapitalOrRevenue" | |
| }, | |
| { | |
| "op": "core/column-rename", | |
| "description": "Rename column Transaction Number to TransactionNumber", | |
| "oldColumnName": "Transaction Number", | |
| "newColumnName": "TransactionNumber" | |
| }, | |
| { | |
| "op": "core/column-rename", | |
| "description": "Rename column Service Area to ServiceArea", | |
| "oldColumnName": "Service Area", | |
| "newColumnName": "ServiceArea" | |
| }, | |
| { | |
| "op": "core/column-rename", | |
| "description": "Rename column Expenses Type to ExpensesType", | |
| "oldColumnName": "Expenses Type", | |
| "newColumnName": "ExpensesType" | |
| }, | |
| { | |
| "op": "core/column-rename", | |
| "description": "Rename column Supplier Name to SupplierName", | |
| "oldColumnName": "Supplier Name", | |
| "newColumnName": "SupplierName" | |
| }, | |
| { | |
| "op": "core/text-transform", | |
| "description": "Text transform on cells in column Amount using expression grel:value.replace(',','')", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "columnName": "Amount", | |
| "expression": "grel:value.replace(',','')", | |
| "onError": "keep-original", | |
| "repeat": false, | |
| "repeatCount": 10 | |
| }, | |
| { | |
| "op": "core/text-transform", | |
| "description": "Text transform on cells in column Amount using expression value.toNumber()", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "columnName": "Amount", | |
| "expression": "value.toNumber()", | |
| "onError": "keep-original", | |
| "repeat": false, | |
| "repeatCount": 10 | |
| }, | |
| { | |
| "op": "core/text-transform", | |
| "description": "Text transform on cells in column Date using expression grel:value.toDate('dd.mm.yy').toString('yyyy-mm-dd')", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "columnName": "Date", | |
| "expression": "grel:value.toDate('dd.mm.yy').toString('yyyy-mm-dd')", | |
| "onError": "keep-original", | |
| "repeat": false, | |
| "repeatCount": 10 | |
| } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment