ag060793 / google-refine

Automatically exported from code.google.com/p/google-refine
Other
0 stars 0 forks source link

facetCount doesn't work with numeric data #592

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm trying to use Google Refine to find common friends on Twitter.

1. Import data via URL:
http://api.twitter.com/1/friends/ids.json?screen_name=psychemedia
http://api.twitter.com/1/friends/ids.json?screen_name=mhawksey

Select an ID on import, to give a single column of IDs.

Use text facet to look for duplicates - facet counts are correctly indicated (1 
or 2 in this case)

Using Facet by choice counts returns a range of 0..1
Using a custom facetCount() expression (eg facetCount(value, 'value', 'ids') )  
doesn't count terms (returning 0 in each case)

So the count appears to be working in the original facet view, but not when I 
try to call facetCount()?

Project file enclosed.

Original issue reported on code.google.com by tony.hi...@gmail.com on 2 Aug 2012 at 8:49

Attachments:

GoogleCodeExporter commented 8 years ago
The issue appears to be that facetCount isn't converting the cell values to 
strings first, the way the text facet does.  You can work around this by 
transforming the ids to text first.

Original comment by tfmorris on 2 Aug 2012 at 3:53

GoogleCodeExporter commented 8 years ago
@tom thanks - I cast a new column w/ toString and went that way....

Original comment by tony.hi...@gmail.com on 2 Aug 2012 at 6:42