Created
April 5, 2015 21:34
-
-
Save cquest/46cb8d38f6f3be0567e4 to your computer and use it in GitHub Desktop.
Script openrefine de nettoyage du fichier SUP_SUPPORT.txt de l'ANFR
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/text-transform", | |
"description": "Text transform on cells in column SUP_ID using expression value.toNumber()", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "SUP_ID", | |
"expression": "value.toNumber()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column NAT_ID using expression value.toNumber()", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "NAT_ID", | |
"expression": "value.toNumber()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column COR_NB_DG_LAT using expression value.toNumber()", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "COR_NB_DG_LAT", | |
"expression": "value.toNumber()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column COR_NB_MN_LAT using expression value.toNumber()", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "COR_NB_MN_LAT", | |
"expression": "value.toNumber()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column COR_NB_SC_LAT using expression value.toNumber()", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "COR_NB_SC_LAT", | |
"expression": "value.toNumber()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column LATITUDE at index 4 based on column COR_NB_DG_LAT using expression grel:value+(cells[\"COR_NB_MN_LAT\"].value/60)+(cells[\"COR_NB_SC_LAT\"].value/3600)", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "LATITUDE", | |
"columnInsertIndex": 4, | |
"baseColumnName": "COR_NB_DG_LAT", | |
"expression": "grel:value+(cells[\"COR_NB_MN_LAT\"].value/60)+(cells[\"COR_NB_SC_LAT\"].value/3600)", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column COR_NB_DG_LAT", | |
"columnName": "COR_NB_DG_LAT" | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column COR_NB_MN_LAT", | |
"columnName": "COR_NB_MN_LAT" | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column COR_NB_SC_LAT", | |
"columnName": "COR_NB_SC_LAT" | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column COR_NB_DG_LON using expression value.toNumber()", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "COR_NB_DG_LON", | |
"expression": "value.toNumber()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column COR_NB_MN_LON using expression value.toNumber()", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "COR_NB_MN_LON", | |
"expression": "value.toNumber()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column COR_NB_SC_LON using expression value.toNumber()", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "COR_NB_SC_LON", | |
"expression": "value.toNumber()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column LONGITUDE at index 6 based on column COR_NB_DG_LON using expression grel:value+(cells[\"COR_NB_MN_LON\"].value/60)+(cells[\"COR_NB_SC_LON\"].value/3600)", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "LONGITUDE", | |
"columnInsertIndex": 6, | |
"baseColumnName": "COR_NB_DG_LON", | |
"expression": "grel:value+(cells[\"COR_NB_MN_LON\"].value/60)+(cells[\"COR_NB_SC_LON\"].value/3600)", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column COR_NB_DG_LON", | |
"columnName": "COR_NB_DG_LON" | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column COR_NB_MN_LON", | |
"columnName": "COR_NB_MN_LON" | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column COR_NB_SC_LON", | |
"columnName": "COR_NB_SC_LON" | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column SUP_NM_HAUT using expression grel:replace(value,\",\",\".\")", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "SUP_NM_HAUT", | |
"expression": "grel:replace(value,\",\",\".\")", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column SUP_NM_HAUT using expression value.toNumber()", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "SUP_NM_HAUT", | |
"expression": "value.toNumber()", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column Column 20", | |
"columnName": "Column 20" | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column LATITUDE using expression grel:if(cells[\"COR_CD_NS_LAT\"].value==\"N\",value,value*(-1))", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "LATITUDE", | |
"expression": "grel:if(cells[\"COR_CD_NS_LAT\"].value==\"N\",value,value*(-1))", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/text-transform", | |
"description": "Text transform on cells in column LONGITUDE using expression grel:if(cells[\"COR_CD_EW_LON\"].value==\"E\",value,value*(-1))", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"columnName": "LONGITUDE", | |
"expression": "grel:if(cells[\"COR_CD_EW_LON\"].value==\"E\",value,value*(-1))", | |
"onError": "keep-original", | |
"repeat": false, | |
"repeatCount": 10 | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column COR_CD_NS_LAT", | |
"columnName": "COR_CD_NS_LAT" | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column COR_CD_EW_LON", | |
"columnName": "COR_CD_EW_LON" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment