|
101 | 101 | "maxColumns": 0, |
102 | 102 | "description": "Split column placeWikidata by separator" |
103 | 103 | }, |
| 104 | + { |
| 105 | + "op": "core/column-addition", |
| 106 | + "engineConfig": { |
| 107 | + "facets": [], |
| 108 | + "mode": "row-based" |
| 109 | + }, |
| 110 | + "baseColumnName": "scriptNotes", |
| 111 | + "expression": "grel:cell.cross(\"scripts ds aat wikidata csv\",\"script_note_as_recorded\").cells[\"wikidata_qid\"].value[0]", |
| 112 | + "onError": "set-to-blank", |
| 113 | + "newColumnName": "scriptWikidata", |
| 114 | + "columnInsertIndex": 14, |
| 115 | + "description": "Create column scriptWikidata at index 14 based on column scriptNotes using expression grel:cell.cross(\"scripts ds aat wikidata csv\",\"script_note_as_recorded\").cells[\"wikidata_qid\"].value[0]" |
| 116 | + }, |
| 117 | + { |
| 118 | + "op": "core/column-split", |
| 119 | + "engineConfig": { |
| 120 | + "facets": [], |
| 121 | + "mode": "row-based" |
| 122 | + }, |
| 123 | + "columnName": "scriptWikidata", |
| 124 | + "guessCellType": true, |
| 125 | + "removeOriginalColumn": true, |
| 126 | + "mode": "separator", |
| 127 | + "separator": "|", |
| 128 | + "regex": false, |
| 129 | + "maxColumns": 0, |
| 130 | + "description": "Split column scriptWikidata by separator" |
| 131 | + }, |
104 | 132 | { |
105 | 133 | "op": "core/multivalued-cell-split", |
106 | 134 | "columnName": "centuryDS", |
|
269 | 297 | "description": "Remove column 2millennium" |
270 | 298 | }, |
271 | 299 | { |
272 | | - "op": "core/column-addition", |
| 300 | + "op": "core/multivalued-cell-split", |
| 301 | + "columnName": "centuryWikidata", |
| 302 | + "keyColumnName": "signature", |
| 303 | + "mode": "separator", |
| 304 | + "separator": "|", |
| 305 | + "regex": false, |
| 306 | + "description": "Split multi-valued cells in column centuryWikidata" |
| 307 | + }, |
| 308 | + { |
| 309 | + "op": "core/recon-use-values-as-identifiers", |
273 | 310 | "engineConfig": { |
274 | 311 | "facets": [], |
275 | 312 | "mode": "row-based" |
276 | 313 | }, |
277 | | - "baseColumnName": "scriptNotes", |
278 | | - "expression": "grel:cell.cross(\"scripts ds aat wikidata csv\",\"script_note_as_recorded\").cells[\"wikidata_qid\"].value[0]", |
279 | | - "onError": "set-to-blank", |
280 | | - "newColumnName": "scriptWikidata", |
281 | | - "columnInsertIndex": 14, |
282 | | - "description": "Create column scriptWikidata at index 14 based on column scriptNotes using expression grel:cell.cross(\"scripts ds aat wikidata csv\",\"script_note_as_recorded\").cells[\"wikidata_qid\"].value[0]" |
| 314 | + "columnName": "centuryWikidata", |
| 315 | + "service": "https://wikidata.reconci.link/en/api", |
| 316 | + "identifierSpace": "http://www.wikidata.org/entity/", |
| 317 | + "schemaSpace": "http://www.wikidata.org/prop/direct/", |
| 318 | + "description": "Use values as reconciliation identifiers in column centuryWikidata" |
283 | 319 | }, |
284 | 320 | { |
285 | | - "op": "core/column-split", |
| 321 | + "op": "core/extend-reconciled-data", |
286 | 322 | "engineConfig": { |
287 | 323 | "facets": [], |
288 | 324 | "mode": "row-based" |
289 | 325 | }, |
290 | | - "columnName": "scriptWikidata", |
291 | | - "guessCellType": true, |
292 | | - "removeOriginalColumn": true, |
293 | | - "mode": "separator", |
| 326 | + "baseColumnName": "centuryWikidata", |
| 327 | + "endpoint": "https://wikidata.reconci.link/en/api", |
| 328 | + "identifierSpace": "http://www.wikidata.org/entity/", |
| 329 | + "schemaSpace": "http://www.wikidata.org/prop/direct/", |
| 330 | + "extension": { |
| 331 | + "properties": [ |
| 332 | + { |
| 333 | + "id": "Len", |
| 334 | + "name": "SPARQL: Len" |
| 335 | + } |
| 336 | + ] |
| 337 | + }, |
| 338 | + "columnInsertIndex": 8, |
| 339 | + "description": "Extend data at index 8 based on column centuryWikidata" |
| 340 | + }, |
| 341 | + { |
| 342 | + "op": "core/text-transform", |
| 343 | + "engineConfig": { |
| 344 | + "facets": [], |
| 345 | + "mode": "row-based" |
| 346 | + }, |
| 347 | + "columnName": "Len", |
| 348 | + "expression": "grel:value.replace(\"th \",\"\").replace(\"st \",\"\").replace(\"nd \",\"\")", |
| 349 | + "onError": "keep-original", |
| 350 | + "repeat": false, |
| 351 | + "repeatCount": 10, |
| 352 | + "description": "Text transform on cells in column Len using expression grel:value.replace(\"th \",\"\").replace(\"st \",\"\").replace(\"nd \",\"\")" |
| 353 | + }, |
| 354 | + { |
| 355 | + "op": "core/text-transform", |
| 356 | + "engineConfig": { |
| 357 | + "facets": [], |
| 358 | + "mode": "row-based" |
| 359 | + }, |
| 360 | + "columnName": "Len", |
| 361 | + "expression": "grel:value.replace(\"century\",\"00C\").replace(\"millennium\",\"000M\")", |
| 362 | + "onError": "keep-original", |
| 363 | + "repeat": false, |
| 364 | + "repeatCount": 10, |
| 365 | + "description": "Text transform on cells in column Len using expression grel:value.replace(\"century\",\"00C\").replace(\"millennium\",\"000M\")" |
| 366 | + }, |
| 367 | + { |
| 368 | + "op": "core/column-rename", |
| 369 | + "oldColumnName": "Len", |
| 370 | + "newColumnName": "century", |
| 371 | + "description": "Rename column Len to century" |
| 372 | + }, |
| 373 | + { |
| 374 | + "op": "core/multivalued-cell-join", |
| 375 | + "columnName": "centuryWikidata", |
| 376 | + "keyColumnName": "signature", |
294 | 377 | "separator": "|", |
295 | | - "regex": false, |
296 | | - "maxColumns": 0, |
297 | | - "description": "Split column scriptWikidata by separator" |
| 378 | + "description": "Join multi-valued cells in column centuryWikidata" |
| 379 | + }, |
| 380 | + { |
| 381 | + "op": "core/multivalued-cell-join", |
| 382 | + "columnName": "century", |
| 383 | + "keyColumnName": "signature", |
| 384 | + "separator": "|", |
| 385 | + "description": "Join multi-valued cells in column century" |
| 386 | + }, |
| 387 | + { |
| 388 | + "op": "core/column-removal", |
| 389 | + "columnName": "centuryWikidata", |
| 390 | + "description": "Remove column centuryWikidata" |
298 | 391 | } |
299 | 392 | ] |
0 commit comments