Created
July 14, 2016 08:37
-
-
Save ocorcho/46b606716333aa29d579e0583d8715e8 to your computer and use it in GitHub Desktop.
Transformaciones de fichero composición pleno Aragón
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-removal", | |
| "description": "Remove column Column", | |
| "columnName": "Column" | |
| }, | |
| { | |
| "op": "core/mass-edit", | |
| "description": "Mass edit cells in column CARGO", | |
| "engineConfig": { | |
| "facets": [ | |
| { | |
| "invert": false, | |
| "expression": "value", | |
| "selectError": false, | |
| "omitError": false, | |
| "selectBlank": false, | |
| "name": "CARGO", | |
| "omitBlank": false, | |
| "columnName": "CARGO", | |
| "type": "list", | |
| "selection": [ | |
| { | |
| "v": { | |
| "v": "COM. GESTORA", | |
| "l": "COM. GESTORA" | |
| } | |
| } | |
| ] | |
| } | |
| ], | |
| "mode": "row-based" | |
| }, | |
| "columnName": "CARGO", | |
| "expression": "value", | |
| "edits": [ | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "COM. GESTORA" | |
| ], | |
| "to": "C. GESTORA" | |
| } | |
| ] | |
| }, | |
| { | |
| "op": "core/mass-edit", | |
| "description": "Mass edit cells in column PARTIDO", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "columnName": "PARTIDO", | |
| "expression": "value", | |
| "edits": [ | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "C's", | |
| "C,s", | |
| "C'S", | |
| "CS" | |
| ], | |
| "to": "C's" | |
| }, | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "PSOE-INDEP.", | |
| "PSOE-INDEP", | |
| "PSOE--INDEP." | |
| ], | |
| "to": "PSOE-INDEP" | |
| }, | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "P.P.", | |
| "PP", | |
| "P.P" | |
| ], | |
| "to": "PP" | |
| }, | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "I.U.-ZGZ", | |
| "IU-ZGZ" | |
| ], | |
| "to": "IU-ZGZ" | |
| }, | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "FIA", | |
| "F.I.A." | |
| ], | |
| "to": "FIA" | |
| }, | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "PSOE", | |
| " PSOE" | |
| ], | |
| "to": "PSOE" | |
| }, | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "I.U.-GANAR", | |
| "IU-GANAR" | |
| ], | |
| "to": "IU-GANAR" | |
| }, | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "IU", | |
| "I.U." | |
| ], | |
| "to": "IU" | |
| }, | |
| { | |
| "fromBlank": false, | |
| "fromError": false, | |
| "from": [ | |
| "PAR-INDEP.", | |
| "PAR-INDEP" | |
| ], | |
| "to": "PAR-INDEP" | |
| } | |
| ] | |
| }, | |
| { | |
| "op": "core/column-addition", | |
| "description": "Create column Municipio_minúscula at index 5 based on column DENOMINACION using expression grel:value.toLowercase()", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "newColumnName": "Municipio_minúscula", | |
| "columnInsertIndex": 5, | |
| "baseColumnName": "DENOMINACION", | |
| "expression": "grel:value.toLowercase()", | |
| "onError": "set-to-blank" | |
| }, | |
| { | |
| "op": "core/text-transform", | |
| "description": "Text transform on cells in column Municipio_minúscula using expression value.trim()", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "columnName": "Municipio_minúscula", | |
| "expression": "value.trim()", | |
| "onError": "keep-original", | |
| "repeat": false, | |
| "repeatCount": 10 | |
| }, | |
| { | |
| "op": "core/text-transform", | |
| "description": "Text transform on cells in column PARTIDO using expression value.trim()", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "columnName": "PARTIDO", | |
| "expression": "value.trim()", | |
| "onError": "keep-original", | |
| "repeat": false, | |
| "repeatCount": 10 | |
| }, | |
| { | |
| "op": "core/column-removal", | |
| "description": "Remove column Municipio_minúscula", | |
| "columnName": "Municipio_minúscula" | |
| }, | |
| { | |
| "op": "core/column-addition", | |
| "description": "Create column municipios at index 5 based on column DENOMINACION using expression grel:value.toTitlecase()", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "newColumnName": "municipios", | |
| "columnInsertIndex": 5, | |
| "baseColumnName": "DENOMINACION", | |
| "expression": "grel:value.toTitlecase()", | |
| "onError": "set-to-blank" | |
| }, | |
| { | |
| "op": "core/column-addition", | |
| "description": "Create column Municipio-URI at index 6 based on column municipios using expression grel:\"http://opendata.aragon.es/recurso/territorio/Municipio/\"+value.replace(\" \",\"_\").replace(\",\",\"\")", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "newColumnName": "Municipio-URI", | |
| "columnInsertIndex": 6, | |
| "baseColumnName": "municipios", | |
| "expression": "grel:\"http://opendata.aragon.es/recurso/territorio/Municipio/\"+value.replace(\" \",\"_\").replace(\",\",\"\")", | |
| "onError": "set-to-blank" | |
| }, | |
| { | |
| "op": "core/column-addition-by-fetching-urls", | |
| "description": "Create column URI at index 7 by fetching URLs based on column Municipio-URI using expression grel:value+\".json?api_key=e103dc13eb276ad734e680f5855f20c6\"", | |
| "engineConfig": { | |
| "facets": [ | |
| { | |
| "invert": false, | |
| "expression": "value", | |
| "selectError": false, | |
| "omitError": false, | |
| "selectBlank": false, | |
| "name": "PARTIDO", | |
| "omitBlank": false, | |
| "columnName": "PARTIDO", | |
| "type": "list", | |
| "selection": [ | |
| { | |
| "v": { | |
| "v": "ARAGONSIPUEDE", | |
| "l": "ARAGONSIPUEDE" | |
| } | |
| } | |
| ] | |
| } | |
| ], | |
| "mode": "row-based" | |
| }, | |
| "newColumnName": "URI", | |
| "columnInsertIndex": 7, | |
| "baseColumnName": "Municipio-URI", | |
| "urlExpression": "grel:value+\".json?api_key=e103dc13eb276ad734e680f5855f20c6\"", | |
| "onError": "set-to-blank", | |
| "delay": 0 | |
| }, | |
| { | |
| "op": "rdf-extension/save-rdf-schema", | |
| "description": "Save RDF schema skeleton", | |
| "schema": { | |
| "baseUri": "http://localhost:3333/", | |
| "prefixes": [ | |
| { | |
| "name": "rdfs", | |
| "uri": "http://www.w3.org/2000/01/rdf-schema#" | |
| }, | |
| { | |
| "name": "foaf", | |
| "uri": "http://xmlns.com/foaf/0.1/" | |
| }, | |
| { | |
| "name": "xsd", | |
| "uri": "http://www.w3.org/2001/XMLSchema#" | |
| }, | |
| { | |
| "name": "owl", | |
| "uri": "http://www.w3.org/2002/07/owl#" | |
| }, | |
| { | |
| "name": "rdf", | |
| "uri": "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| } | |
| ], | |
| "rootNodes": [ | |
| { | |
| "nodeType": "cell-as-resource", | |
| "expression": "value", | |
| "isRowNumberCell": false, | |
| "columnName": "Municipio-URI", | |
| "rdfTypes": [], | |
| "links": [ | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#mayor", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#mayor", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "if(cells[\"CARGO\"].value==\"A\",value,null)", | |
| "isRowNumberCell": false, | |
| "columnName": "NOMBRE" | |
| } | |
| }, | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#partidoGobierno", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#partidoGobierno", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "if(cells[\"CARGO\"].value==\"A\",value,null)", | |
| "isRowNumberCell": false, | |
| "columnName": "PARTIDO" | |
| } | |
| }, | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#codigoINE", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#codigoINE", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "value", | |
| "isRowNumberCell": false, | |
| "columnName": "CODIGO_MUN" | |
| } | |
| }, | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#concejal", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#concejal", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "if(cells[\"CARGO\"].value==\"C\",value,null)", | |
| "isRowNumberCell": false, | |
| "columnName": "NOMBRE" | |
| } | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "op": "core/column-addition", | |
| "description": "Create column NombrePersonaURI at index 1 based on column NOMBRE using expression grel:value.toLowercase().replace(\" \",\"-\")", | |
| "engineConfig": { | |
| "facets": [], | |
| "mode": "row-based" | |
| }, | |
| "newColumnName": "NombrePersonaURI", | |
| "columnInsertIndex": 1, | |
| "baseColumnName": "NOMBRE", | |
| "expression": "grel:value.toLowercase().replace(\" \",\"-\")", | |
| "onError": "set-to-blank" | |
| }, | |
| { | |
| "op": "rdf-extension/save-rdf-schema", | |
| "description": "Save RDF schema skeleton", | |
| "schema": { | |
| "baseUri": "http://localhost:3333/", | |
| "prefixes": [ | |
| { | |
| "name": "rdfs", | |
| "uri": "http://www.w3.org/2000/01/rdf-schema#" | |
| }, | |
| { | |
| "name": "foaf", | |
| "uri": "http://xmlns.com/foaf/0.1/" | |
| }, | |
| { | |
| "name": "xsd", | |
| "uri": "http://www.w3.org/2001/XMLSchema#" | |
| }, | |
| { | |
| "name": "owl", | |
| "uri": "http://www.w3.org/2002/07/owl#" | |
| }, | |
| { | |
| "name": "rdf", | |
| "uri": "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| } | |
| ], | |
| "rootNodes": [ | |
| { | |
| "nodeType": "cell-as-resource", | |
| "expression": "value", | |
| "isRowNumberCell": false, | |
| "columnName": "Municipio-URI", | |
| "rdfTypes": [], | |
| "links": [ | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#mayor", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#mayor", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "if(cells[\"CARGO\"].value==\"A\",value,null)", | |
| "isRowNumberCell": false, | |
| "columnName": "NOMBRE" | |
| } | |
| }, | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#partidoGobierno", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#partidoGobierno", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "if(cells[\"CARGO\"].value==\"A\",value,null)", | |
| "isRowNumberCell": false, | |
| "columnName": "PARTIDO" | |
| } | |
| }, | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#codigoINE", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#codigoINE", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "value", | |
| "isRowNumberCell": false, | |
| "columnName": "CODIGO_MUN" | |
| } | |
| }, | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#concejal", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#concejal", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "if(cells[\"CARGO\"].value==\"C\",value,null)", | |
| "isRowNumberCell": false, | |
| "columnName": "NOMBRE" | |
| } | |
| }, | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#miembroCorporacion", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#miembroCorporacion", | |
| "target": { | |
| "nodeType": "cell-as-resource", | |
| "expression": "\"http://opendata.aragon.es/recurso/sector-publico/persona-corporacion/\"+value", | |
| "isRowNumberCell": false, | |
| "columnName": "NombrePersonaURI", | |
| "rdfTypes": [], | |
| "links": [ | |
| { | |
| "uri": "http://www.w3.org/2000/01/rdf-schema#label", | |
| "curie": "rdfs:label", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "value", | |
| "isRowNumberCell": false, | |
| "columnName": "NOMBRE" | |
| } | |
| }, | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#partido", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#partido", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "value", | |
| "isRowNumberCell": false, | |
| "columnName": "PARTIDO" | |
| } | |
| }, | |
| { | |
| "uri": "http://opendata.aragon.es/def/Aragopedia#cargoMunicipal", | |
| "curie": "http://opendata.aragon.es/def/Aragopedia#cargoMunicipal", | |
| "target": { | |
| "nodeType": "cell-as-literal", | |
| "expression": "value", | |
| "isRowNumberCell": false, | |
| "columnName": "CARGO" | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| } | |
| ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment