Can I change values of multiple facets in a single operation?

206 views
Skip to first unread message

Yogesh

unread,
Jul 29, 2017, 12:06:23 AM7/29/17
to OpenRefine

Can I multi-select facets and change the value together? In my data set quite a few values are incorrect. Is there a way to change all these facets to a single value like "Unknown"? 

Thank you in advance.
 






Thad Guidry

unread,
Jul 29, 2017, 12:26:36 AM7/29/17
to OpenRefine
Using that single facet, you can include all of the ones you want by clicking the blue include link next to the little blue edit link.
After including all that you want...and the grid shows only those rows with those facet values you included....
Perform an Edit transform operation using GREL such as

"unknown"

then click OK on the Expression Dialog window.

-Thad

--
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.

Yogesh

unread,
Jul 29, 2017, 10:49:02 PM7/29/17
to OpenRefine
Hello Thad,

I am able to make the changes as suggested. However, I have more than 1000 facets with less than 5 records (and I have 250k records). Is that another option to include multiple facets? 

Yogesh

Ettore Rizza

unread,
Jul 30, 2017, 1:35:15 AM7/30/17
to OpenRefine
Hi Yogesh, 

Text facet is a convenient way to manually select values. If you want to batch select them based on a pattern, there are other methods. It all depends on what you are looking for. 

For example, if it's string lengths too short or too long, use Text Length Facet or Text Length log. If these are cells that contain certain words or special characters, Text Filter (and possibly a regex) will allow you to select them all at once.

I guess that you are trying to select the values for which there are fewer than five occurrences. In this case, you can add a column based on your column MAILINGCOUNTRY and use these Grel formula :

facetCount(value, "value", "MAILINGCOUNTRY")

You can then apply a "Numeric Facet" on this column to select all rows less than five.

Ettore Rizza

unread,
Jul 30, 2017, 1:48:07 AM7/30/17
to OpenRefine
Here is a visual example :

Yogesh

unread,
Jul 30, 2017, 11:08:37 AM7/30/17
to OpenRefine
Hello Rizza,

Thank you!  This is very helpful.

Regards,
Yogesh
Reply all
Reply to author
Forward
0 new messages