Created
May 12, 2012 11:23
-
-
Save josefslerka/2665941 to your computer and use it in GitHub Desktop.
Formule pro Google Refine na ziskani detailu o Twitter followers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Toto je jen demonstrace moznosti, ktere Google Refine nabizi. Drive ci pozdeji narazite na limit. | |
1. Otverit Google Refine, zvolit vytvorit projekt z Web Addresses (URLs) a zadat | |
https://api.twitter.com/1/followers/ids.xml?screen_name=josefslerka | |
po té vybrat import ID po radku. | |
2. Aplikovat nasledujici formu v sekci UNDO/REDO, tlačítko Apply. | |
[ | |
{ | |
"op": "core/column-addition-by-fetching-urls", | |
"description": "Create column Stunome at index 1 by fetching URLs based on column id using expression grel:\"https://twitter.com/users/show/\" + value + \".json\"", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "Stunome", | |
"columnInsertIndex": 1, | |
"baseColumnName": "id", | |
"urlExpression": "grel:\"https://twitter.com/users/show/\" + value + \".json\"", | |
"onError": "set-to-blank", | |
"delay": 500 | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column Location at index 2 based on column Stunome using expression grel:value.parseJson()[\"location\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "Location", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"location\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column location at index 2 based on column Stunome using expression grel:value.parseJson()[\"location\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "location", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"location\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-removal", | |
"description": "Remove column location", | |
"columnName": "location" | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column statuses_count at index 2 based on column Stunome using expression grel:value.parseJson()[\"statuses_count\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "statuses_count", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"statuses_count\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column name at index 2 based on column Stunome using expression grel:value.parseJson()[\"name\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "name", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"name\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column friends_count at index 2 based on column Stunome using expression grel:value.parseJson()[\"friends_count\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "friends_count", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"friends_count\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column followers_count at index 2 based on column Stunome using expression grel:value.parseJson()[\"followers_count\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "followers_count", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"followers_count\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column screen_name at index 2 based on column Stunome using expression grel:value.parseJson()[\"screen_name\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "screen_name", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"screen_name\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column created_at at index 2 based on column Stunome using expression grel:value.parseJson()[\"created_at\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "created_at", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"created_at\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column time_zone at index 2 based on column Stunome using expression grel:value.parseJson()[\"time_zone\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "time_zone", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"time_zone\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column url at index 2 based on column Stunome using expression grel:value.parseJson()[\"url\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "url", | |
"columnInsertIndex": 2, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"url\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column Stunome to position 10", | |
"columnName": "Stunome", | |
"index": 10 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column screen_name to position 3", | |
"columnName": "screen_name", | |
"index": 3 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column screen_name to position 2", | |
"columnName": "screen_name", | |
"index": 2 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column screen_name to position 1", | |
"columnName": "screen_name", | |
"index": 1 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column name to position 0", | |
"columnName": "name", | |
"index": 0 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column name to position 1", | |
"columnName": "name", | |
"index": 1 | |
}, | |
{ | |
"op": "core/column-addition", | |
"description": "Create column description at index 11 based on column Stunome using expression grel:value.parseJson()[\"description\"]", | |
"engineConfig": { | |
"facets": [], | |
"mode": "row-based" | |
}, | |
"newColumnName": "description", | |
"columnInsertIndex": 11, | |
"baseColumnName": "Stunome", | |
"expression": "grel:value.parseJson()[\"description\"]", | |
"onError": "set-to-blank" | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column description to position 10", | |
"columnName": "description", | |
"index": 10 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column description to position 0", | |
"columnName": "description", | |
"index": 0 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column description to position 1", | |
"columnName": "description", | |
"index": 1 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column description to position 2", | |
"columnName": "description", | |
"index": 2 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column description to position 3", | |
"columnName": "description", | |
"index": 3 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column Location to position 0", | |
"columnName": "Location", | |
"index": 0 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column Location to position 1", | |
"columnName": "Location", | |
"index": 1 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column Location to position 2", | |
"columnName": "Location", | |
"index": 2 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column Location to position 3", | |
"columnName": "Location", | |
"index": 3 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column Location to position 4", | |
"columnName": "Location", | |
"index": 4 | |
}, | |
{ | |
"op": "core/column-move", | |
"description": "Move column Location to position 5", | |
"columnName": "Location", | |
"index": 5 | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment