To save repeating large numbers of transformations that often need doing, this page contains code which carries out several operations at once. Unlike the Quick Fix Transformations the code below will usually make some assumptions about the existing Refine project - most commonly it will need the correct columns to exist before the code will work.
To use the provided transformations, click the link, then cut and paste the code into Refine. To use this, first switch to the 'Undo / Redo' tab in the left-hand panel in Refine and click 'Apply ...'
Then paste in the appropriate code linked from the table below and click 'Perform Operations'We have created macros for existing GOKb data providers and other common transformations.
To run a macro in an OpenRefine project:
- In any cell, click Edit
- Right-click in the box and select Apply Macro
- In the search box, type the name of your provider to locate the correct macro
- Click Ok to run the macro.
- Note: the macro will run automatically and should only take a few seconds. When the macro functions are complete, you should see fewer Error and Warning messages in the left-hand column.
Transformation | Notes |
---|---|
Rename KBART columns to GOKb columns | This code renames all columns in a KBART file to GOKb equivalents except
|
Rename KBART columns to GOKb columns (ALL CAPS) | This code is the same as the above, except it assumes you are starting with KBART column names in all caps. |
Trim title.identifier.issn and title.identifier.eissn fields and ensure all 'x' characters are in uppercase | The columns title.identifier.issn and title.identifier.eissn must exist before this code is used |
Transform volume, number, and date information originally formatted like "1:1 (1919)." | This code creates three columns: DateFirstPackageIssue, VolumeFirstPackageIssue, and NumberFirstPackageIssue. The code assumes you have all of this information in a single column named "PDF Starts." |
Add new column macros | These code snippets will allow you to create a new column in OpenRefine based on the presence of an existing PublicationTitle column. |
Elsevier Macro: Collapse duplicate titles into single rows | Before applying this macro, confirm:
|
Provider Transformation Macros | Each provider has one or more transformation macros based on the specific needs of its packages. These can be found on the provider management pages. |