1

I am working on a project using open refine to search then send users to the relevant link for data that is hard to search. My current URLs to access the records take the form www.mywebsite.com/?recordID=1234 but are much longer. I would like to use HTML or some other method to create a hyperlink functionally equivalent to <a href="www.mywebsite.com/?recordID=1234">1234<\a> in the cell so it occupies less space.

I have been able to edit individual cells in OpenRefine using inspect element to get this to work as a proof of concept but I can edit 100K+ cells.

I have been unable to find advice/example about this. Is open refine capable of doing something like this?

1
  • This is really more a programming question than an open data question, so you probably would have gotten more help on Stack Overflow. The solution is to use the Transform cell dialog to provide an expression that converts the existing strings into the desired target string.
    – Tom Morris
    Commented Aug 9, 2023 at 18:35

1 Answer 1

0

As a starting point, the GREL expression:

'<a href="' + value + '>Click me<\a>'

will give convert your text values into clickable links (which all say "Click me"). This can be extended to fill in the specific numeric values, if desired.

3
  • I like the idea but the result just displays the text as is. Example: <a href="mczbase.mcz.harvard.edu/localities/…"> val </a> displays as is and is not interpreted as a hyperlink by open refine. Commented Aug 24, 2023 at 17:35
  • Oh, you want this to work within OpenRefine itself? I assumed you were exporting to an HTML table or something. OpenRefine doesn't support HTML in cells, so I think you're out of luck.
    – Tom Morris
    Commented Aug 26, 2023 at 0:07
  • Thank you for confirming it will not work. Commented Sep 5, 2023 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.