basic Q re undo/redo

72 views
Skip to first unread message

Sue Zwicker

unread,
Jan 25, 2018, 5:58:06 PM1/25/18
to OpenRefine
Hi! I'm a newbie.

For undo/redo... let's say I have 6 transformations.
I'm happy with T5 & T6... but want to undo T4.
Do I have to undo T4-6, then redo 5 & 6?

If the answer to the above is no... how do I ONLY undo a 'middle' transformation?

If the answer to the above is yes:
I watched a lovely set of videos from a Carpentry instructor.  She showed how to export a file with all your transformations...and to select which to save and which to ignore.
I guess I could save the transformations omitting the one I want to skip, and then apply this edited version of my transformations to an original version of the data?

Or maybe I'm totally missing something here??

Thanks,
Sue

Thad Guidry

unread,
Jan 25, 2018, 6:06:49 PM1/25/18
to openr...@googlegroups.com
Hi Sue,

If you want you can directly edit the "sequence" of transformations.  You can copy/paste via the Undo/Redo and then use them in a copy of your existing project (so you don't disturb your original OpenRefine project.

"To reuse operations performed in one project in another project, first, extract them out from the first project. In this undo/redo history, click Extract... This brings up a dialog box that lists all operations corresponding to changes that have been done (it does not show undone changes). Select the operations that you want to extract on the left, and they will be encoded as JSON on the right. Copy that JSON off to the clipboard. Then in the second project, in the undo/redo history, click Apply... and paste in that JSON."

This is documented on our Wiki here:  https://github.com/OpenRefine/OpenRefine/wiki/History

We should probably have a video clip of doing "history" operations to make it easier for others to understand and follow.  Maybe Owen or Ettore might be inspired to add one in the future !?!? :)

--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thad Guidry

unread,
Jan 25, 2018, 6:11:31 PM1/25/18
to openr...@googlegroups.com
Oh and one more thing Sue...

We do plan to make the editing within Undo/Redo a whole lot easier in the future !  but yea for now, its a bit of a hassle with copy/paste from the Undo/Redo -> Extract

Yours is directly this need:  https://github.com/OpenRefine/OpenRefine/issues/183
But we have several use cases and enhancement requests around Undo/Redo:  https://github.com/openrefine/openrefine/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue+label%3Aenhancement+undo

Sue Zwicker

unread,
Jan 25, 2018, 8:50:24 PM1/25/18
to openr...@googlegroups.com
Thanks!
I'm giving myself a crash course in this to teach it for Data Carpentries.  It's an AWESOME tool though and I'm hoping to also offer some stand-alone sessions when intern season rolls around. I think folks all over our institution will find it useful, and not just the ecologist/genetics folks.

To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+unsubscribe@googlegroups.com.

Thad Guidry

unread,
Jan 25, 2018, 9:13:30 PM1/25/18
to openr...@googlegroups.com
Thanks Sue !

If there are features that are "really important" or you think could be better for ecologist/genetics folks just let us know on the mailing list.

Keep the questions coming !

To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "OpenRefine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrefine+...@googlegroups.com.

Ettore Rizza

unread,
Jan 26, 2018, 2:56:37 AM1/26/18
to OpenRefine
Hi Sue.

I recommend using the ViB-Bits plugin (which I think should be integrated by default in Open Refine). This extension is best known for its "Add columns from other projects" feature, which makes it easier to join tables, but it also has functions to pivot tables AND to work more easily with the history. These are the "Store redo history" and "Redo operation history" functions. Their documentation is here (3.1.2 section).

Here is a screencast with a simple example : I have two columns containing names and first names in lowercase. I would like to concatenate them in titlecase to get a column with a full name. During the operation, I realize that I forgot a step (put family names in titlecase).  No worries : I can go back, store the redo history, insert the operation, then re-perform the concatenation.

Owen Stephens

unread,
Jan 31, 2018, 5:07:49 AM1/31/18
to OpenRefine
Hi Sue


For undo/redo... let's say I have 6 transformations.
I'm happy with T5 & T6... but want to undo T4.
Do I have to undo T4-6, then redo 5 & 6?
Yes - that's the right process - but unfortunately the interface doesn't support this directly - you have to work around it

If the answer to the above is no... how do I ONLY undo a 'middle' transformation?
You can't only undo a 'middle' transformation because later transformations might work differently once you don't do that middle transform. Therefore it is always a matter of undoing to the point where you are happy, then re-doing only the transforms you want to apply

I watched a lovely set of videos from a Carpentry instructor.  She showed how to export a file with all your transformations...and to select which to save and which to ignore.
I guess I could save the transformations omitting the one I want to skip, and then apply this edited version of my transformations to an original version of the data?
That's exactly the right process - that's what you have to do. In this case I'd:
  • Export transforms T5 and T6 into a text file
  • Undo back to T3
  • Re-apply T5 and T6 from the file
  • This allows you to skip T4
Although as Ettore mentions the VIB-BITS extension offers more flexibility and makes it possible to do more with the undo/redo in the user interface, when I'm teaching Carpentries I tend to avoid asking participants to install extensions.

Owen
Reply all
Reply to author
Forward
0 new messages