Author Publications and Citations by Year with REST
Created: 2016-05-09 08:56:51
Last updated: 2016-05-09 11:32:53
This small workflow demonstrates how to connect to and use Europe PMC (http://europepmc.org/RestfulWebService) to count the number of publications and citations per year for one author. Two REST calls are made. First, we "searchPublications" to retrieve the bibliographic records for all published work of a single author. Then, we "getCitations" to extract the year of all articles citing the work of this author. A conditional XPath is here used to only look up citing articles for cited work, i.e. records with result[citedByCount>0]. The pubYear fields is extracted from the raw Web Service results and fed to an Rshell that produces two histograms as output, one for publications and one for citations, very similar to the "Citation Report" in the Thomson Reuters Web of Science. This is a REST equivalent of the SOAP workflow www.myexperiment.org/workflows/4720.html.
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (1)
Author Publications and Citations by Year with REST |
Descriptions (1)
This small workflow demonstrates how to connect to and use Europe PMC (http://europepmc.org/RestfulWebService) to count the number of publications and citations per year for one author. Two REST calls are made. First, we "searchPublications" to retrieve the bibliographic records for all published work of a single author. Then, we "getCitations" to extract the year of all articles citing the work of this author. A conditional XPath is here used to only look up citing articles for cited work, i.e. records with result[citedByCount>0]. The pubYear fields is extracted from the raw Web Service results and fed to an Rshell that produces two histograms as output, one for publications and one for citations, very similar to the "Citation Report" in the Thomson Reuters Web of Science. This is a REST equivalent of the SOAP workflow www.myexperiment.org/workflows/4720.html. |
Dependencies (0)
Inputs (1)
Name |
Description |
author_name |
The name of an author
|
Processors (13)
Name |
Type |
Description |
extract_id_for_cited_work |
xpath |
Xpath Expression/responseWrapper/resultList/result[citedByCount>0]/id |
build_query |
beanshell |
The build_query BeanShell constructs the Europe PMC search query for a single author, sorting the results by year. ScriptqueryString = "auth:\"" + author_name + "\" sort_date:y"; // generate query string
|
Flatten_List |
localworker |
Scriptflatten(inputs, outputs, depth) {
for (i = inputs.iterator(); i.hasNext();) {
element = i.next();
if (element instanceof Collection && depth > 0) {
flatten(element, outputs, depth - 1);
} else {
outputs.add(element);
}
}
}
outputlist = new ArrayList();
flatten(inputlist, outputlist, 1); |
PubMed_and_MEDLINE |
stringconstant |
ValueMED |
citing_articles_to_retrieve |
stringconstant |
Value100 |
extract_pubYear_for_citing_articles |
xpath |
Xpath Expression/responseWrapper/citationList/citation/pubYear |
articles_to_retrieve |
stringconstant |
Value1000 |
resultType_lite |
stringconstant |
Valuelite |
offSet_zero |
stringconstant |
Value0 |
draw_chart |
rshell |
This Rshell takes as input (flattened) lists of years for the publications and citations of author_name and outputs two histograms, one for the publications and one for the citations, per year. Scriptpng("chart.png", width=1024, height=480);
span<-max(publications, citations)-min(publications);
par(mfrow=c(1,2));
hist(publications, col="red", breaks=span, right=F, main="PubMed Publications", las=1, xlab="Year", ylab="Publications");
hist(citations, col="green", breaks=span, right=F, main="PubMed Citations", las=1, xlab="Year", ylab="Citations");
dev.off();
R Serverlocalhost:6311 |
searchPublications |
rest |
|
extract_pubYear_for_all_work |
xpath |
Xpath Expression/responseWrapper/resultList/result/pubYear |
getCitations |
rest |
|
Beanshells (1)
Name |
Description |
Inputs |
Outputs |
build_query |
The build_query BeanShell constructs the Europe PMC search query for a single author, sorting the results by year. |
author_name
|
queryString
|
Datalinks (15)
Source |
Sink |
searchPublications:responseBody |
extract_id_for_cited_work:xml_text |
author_name |
build_query:author_name |
extract_pubYear_for_citing_articles:nodelist |
Flatten_List:inputlist |
getCitations:responseBody |
extract_pubYear_for_citing_articles:xml_text |
Flatten_List:outputlist |
draw_chart:citations |
extract_pubYear_for_all_work:nodelist |
draw_chart:publications |
build_query:queryString |
searchPublications:queryString |
offSet_zero:value |
searchPublications:offSet |
articles_to_retrieve:value |
searchPublications:pageSize |
resultType_lite:value |
searchPublications:resultType |
searchPublications:responseBody |
extract_pubYear_for_all_work:xml_text |
extract_id_for_cited_work:nodelist |
getCitations:id |
citing_articles_to_retrieve:value |
getCitations:pageSize |
PubMed_and_MEDLINE:value |
getCitations:source |
draw_chart:chart |
chart |
Uploader
License
All versions of this Workflow are
licensed under:
Version 2 (latest)
(of 2)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (2)
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
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (0)
No comments yet
Log in to make a comment