Population histogram in R (with Ask Box!)
Created: 2011-09-21 02:52:40
Last updated: 2011-09-21 03:23:11
This workflow fetches the details of the countries in the world and then uses R to produce a histogram of the log of their population. Prompts the user to enter a title for the histogram.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Population histogram in R |
Descriptions (1)
This workflow fetches the details of the countries in the world and then uses R to produce a histogram of the log of their population |
Dependencies (0)
Processors (14)
Name |
Type |
Description |
getCountries |
wsdl |
Get countries Wsdlhttp://www.abundanttech.com/WebServices/Population/population.asmx?WSDLWsdl OperationgetCountries |
getCountries_output |
xmlsplitter |
|
getPopulation |
wsdl |
Get populations from countries Wsdlhttp://www.abundanttech.com/WebServices/Population/population.asmx?WSDLWsdl OperationgetPopulation |
getPopulation_input |
xmlsplitter |
|
getPopulation_output |
xmlsplitter |
|
getPopulation_getPopulationResult |
xmlsplitter |
|
Split_string_into_string_list_by_regular_expression |
localworker |
Splitting list into a string list by regular expression ScriptList split = new ArrayList();
if (!string.equals("")) {
String regexString = ",";
if (regex != void) {
regexString = regex;
}
String[] result = string.split(regexString);
for (int i = 0; i < result.length; i++) {
split.add(result[i]);
}
}
|
regex_value |
stringconstant |
Value, |
Merge_String_List_to_a_String |
localworker |
Merges the string list into a string of values. ScriptString seperatorString = "\n";
if (seperator != void) {
seperatorString = seperator;
}
StringBuffer sb = new StringBuffer();
for (Iterator i = stringlist.iterator(); i.hasNext();) {
String item = (String) i.next();
sb.append(item);
if (i.hasNext()) {
sb.append(seperatorString);
}
}
concatenated = sb.toString();
try {
Integer.parseInt(concatenated);
}
catch (NumberFormatException e) {
concatenated = "1";
}
|
seperator_value |
stringconstant |
Value |
Rshell |
rshell |
Gathers the title and the population data and plots the data. Scriptpng(filename=popplot, height=400,width=400,bg="green");
hist(log10(Filter(function(x) x> 10, populations)), main=title, xlab="Amount of Countries", ylab="Populations");
dev.off();
R Serverlocalhost:6311 |
Ask |
localworker |
Prompts the user to enter a title for the histogram. Scriptimport javax.swing.JOptionPane;
main = JOptionPane.showInputDialog(null, (message == void ? null : message), (title == void ? null : title), JOptionPane.QUESTION_MESSAGE);
|
message_value |
stringconstant |
The message prompt. Currently "I can haz title?" in reference to LoLCats (http://knowyourmeme.com/memes/lolcats). ValueI can haz title? |
title_value |
stringconstant |
The title of the prompt box. ValueHistogram Title |
Datalinks (14)
Source |
Sink |
getCountries:parameters |
getCountries_output:input |
getPopulation_input:output |
getPopulation:parameters |
getCountries_output:getCountriesResult |
getPopulation_input:strCountry |
getPopulation:parameters |
getPopulation_output:input |
getPopulation_output:getPopulationResult |
getPopulation_getPopulationResult:input |
regex_value:value |
Split_string_into_string_list_by_regular_expression:regex |
getPopulation_getPopulationResult:Pop |
Split_string_into_string_list_by_regular_expression:string |
seperator_value:value |
Merge_String_List_to_a_String:seperator |
Split_string_into_string_list_by_regular_expression:split |
Merge_String_List_to_a_String:stringlist |
Merge_String_List_to_a_String:concatenated |
Rshell:populations |
Ask:main |
Rshell:main |
message_value:value |
Ask:message |
title_value:value |
Ask:title |
Rshell:popplot |
plot |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (2)
(People/Groups)
Attributions (1)
(Workflows/Files)
Shared with Groups (1)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(4)
Only the first 2 workflows that use similar services are shown. View all workflows that use these services.
Population histogram in R
(1)
This workflow fetches the details of the countries in the world and then uses R to produce a histogram of the log of their population
Created: 2011-09-21
| Last updated: 2011-09-21
Credits:
Wdsnellg
New Population Histogram
(1)
This workflow fetches the details of the countries in the world and then uses R to produce a histogram of the log of their population
Based on Population histogram in R by
Alan R Williams
Created: 2011-09-21
| Last updated: 2011-09-21
Credits:
Mutanthumb
Comments (0)
No comments yet
Log in to make a comment