Hints, Tips and Tricks

It’s Friday, so time for another hint/tip/trick from me.
Today I’m going for a very straightforward piece of functionality but one that I use regularly: Using Flags and Stars to keep track of particular rows.

You can “Star” or “Flag” rows in OpenRefine by clicking the star/flag icon in the “All” column. The star and flag don’t have any special meaning - they are just two ways of marking particular rows. Once you have some starred/flagged rows you can use “Facet by star” and “Facet by flag” (in the All column drop down menu) to find all the rows you’ve starred/flagged (or those you haven’t). I often use the ability to flag/star rows manually to handpick a set of rows I want to work with (for example get rid of some extraneous rows like header information I didn’t mean to import in the first place)

But typically I use the “Flag rows” and “Star rows” tools (in the All → Edit rows menu) to mark larger groups of rows I want to work on. I find this especially useful if I’ve identified some patterns of data that need fixing but the fix takes a few steps, and one of those steps breaks the filter I’ve setup. Instead of relying on filtering by a pattern in the data while the data changes (as I fix the problem), I can use the pattern to isolate the rows (e.g. with facets or text filters), use the “All” dropdown menu “Flag rows” to add a flag to all these rows, and then use the Facet by flag option in place of my original filters.

Using flags and stars together can also be a nice way of tracking rows that fulfil two different sets of complex criteria - rather than having to maintain a complex set of potentially overlapping filters/facets you can set up your first set of critera, and star all the matching rows, then clear everything and apply your second set of criteria and flag all the the matching rows. All the rows that matched both sets of criteria are now both flagged and starred and can be found using the flag/star facets together.

Do you use Flags and Stars? If so any particular tasks or ways in which you find them useful?

2 Likes