8.9.11

countif in google refine with facetCount

Countif is an expression in Excel that count every time a value appears in a determine zone of your spreadsheet. Google refine support the same function to count every time a value appears in a column.




Attention! facetCount is a one shot expression. If you edit your data (remove rows or merge some facet) the facetCount results WILL NOT update! 


In our example we want to count every time a company name (Column3) appears in our dataset. Google refine have the Grel expression facetcount to do this with the following format:
facetCount(value, "value", "Column3")

click to enlarge


This expression means: count (facetCount) every time the value of my new column (first argument) match the value (second argument) of the Column3 (third argument).

Extra tips
Cluster your column before to harmonized your data ;-)