Springer Publishing

Showing posts with label Book Reviews. Show all posts
Showing posts with label Book Reviews. Show all posts

Monday, 7 September 2015

Cucumber + cherry

When eaten together, cherry and cucumber compliment each other. I wouldn't say that they directly enhance each other's flavours, but they seem to produce a slightly unique and positive flavour. That unique flavour, however, is not as strong as the natural cherry flavour still present.

The cherry flavour appears to dominate the combination just slightly and the cucumber flavour is almost overpowered.

Cherry and cucumber are somewhat close in texture because they are both crunchy so this combination is approximately equal to cucumber in texture, but contains the full texture of both cucumber and cherry.

Thursday, 3 September 2015

Using Google Books API and R to illustrate the general impact of a scientific work over time

In order to get a quick idea of how a book has affected scientific research over time, Google Books API provides that data and R provides the visual!

The Book "The Carbohydrates", edited by Ward Pigman, is an example of a book that you might think has had a significant impact on the landscape of chemical science over the years. If another book cites this one, chances are Google Books will have a record. We can use the Google Books API to have a look.



R code:

library(XML)
library(RCurl)
library(RJSONIO)
result<-getURL("https://www.googleapis.com/books/v1/volumes?q=%22the%20carbohydrates%22%20pigman&startIndex=0",ssl.verifyhost=F,ssl.verifypeer=F,followlocation=T)

#This returns a text object in R which consists of 10 results in JSON format.

list<-fromJSON(result)

totalcount<-fromJSON(result)[[2]] ##returns the total results number
fromJSON(result)[[3]] ##returns all the listings for the 10 results
fromJSON(result)[[3]][[1]]$volumeInfo$publishedDate ##returns the date the book was published for result number 1.

lapply(fromJSON(result)[[3]],function(x) x$volumeInfo$publishedDate) ##returns the publishing date for all 10 books in the list.

##Again you will need to loop this with a new startIndex value each time until 440 is reached.
#Finally, categorize the book;s impact over time by grouping the dates according to year (because
#this is most likely the only datum consistently available.
#The following loop will amass all the JSON returned.

totalcount<-fromJSON(result)[[2]] ##returns the total results number
list1<-list()
#Begin for loop
for(i in 0:floor(totalcount/10)){

list1[[i]]<-getURL(paste0("https://www.googleapis.com/books/v1/volumes?q=%22the%20carbohydrates%22%20pigman&startIndex=",(i*10)),ssl.verifyhost=F,ssl.verifypeer=F,followlocation=T)

}

#The following loop will amass only the published date of results. Less data to save and more time between calls (which is a good thing for the servers).

totalcount<-fromJSON(getURL("https://www.googleapis.com/books/v1/volumes?q=%22the%20carbohydrates%22%20pigman&startIndex=0",ssl.verifyhost=F,ssl.verifypeer=F,followlocation=T))[[2]] ##returns the total results number
vec<-c()
#Begin for loop
for(i in 0:floor(totalcount/10)){

vec<-c(vec,unlist(lapply(fromJSON(getURL(paste0("https://www.googleapis.com/books/v1/volumes?q=%22the%20carbohydrates%22%20pigman&startIndex=",(i*10)),ssl.verifyhost=F,ssl.verifypeer=F,followlocation=T))[[3]],function(x) x$volumeInfo$publishedDate)))

}

vec

#If you want to call quicker, use the URL to extract only the totalItems and publishedDate information by appending the following to the URL

#&fields=totalItems,items/volumeInfo/publishedDate

#This will return only the dates.

#Display vec in R as a kind of timeline graph using package igraph

#As a saveable function. Input your API key in double quotations and your query in double 
#quotations (URL-encoded).

GBapi<-function(query,key){
totalcount<-fromJSON(getURL(paste0("https://www.googleapis.com/books/v1/volumes?q=",query,"&startIndex=0&key=",key),ssl.verifyhost=F,ssl.verifypeer=F,followlocation=T))[[2]] ##returns the total results number

list1<-list()
#Begin for loop
for(i in 0:floor(totalcount/10)){

list1[[i+1]]<-fromJSON(getURL(paste0("https://www.googleapis.com/books/v1/volumes?q=",query,"&startIndex=",(i*10),"&key=",key),ssl.verifyhost=F,ssl.verifypeer=F,followlocation=T))

}

list1

}

And lapply() on the resulting list for the data.



And for comparison

#partition the plot space
par(mfrow=c(2,1))
#Plot one book first. xlim parameter makes sure the windows are the same size.

plot(table(unlist(regmatches(unlist(lapply(gbapi,
function(x) lapply(x$items,function(y) y$volumeInfo$publishedDate))),
gregexpr("[0-9]{4}",
unlist(lapply(gbapi,
function(x) lapply(x$items,function(y) y$volumeInfo$publishedDate))))))),
ylab="Number of Books on Google Books",xlim=c(1800,2015))

title(main="Some books published per year
relating to
'Computational Chemical Graph Theory' by Trinajstic")
#plot the other book below
plot(table(unlist(regmatches(vec,gregexpr("[0-9]{4}",vec)))),xlim=c(1800,2015),
ylab="Number of Books on Google Books")
title(main="Some books published per year
relating to

'The Carbohydrates' by Pigman")

Hopefully this kind of metric provides a useful way to approximate the scholarly impact a book has had on other books. In the sciences, textbooks and other books have always had an authoritative quality to them, so this metric may indicate a certain kind of scientific influence which may include teaching, information gathering and reputation all in one. 

Current difficulties are mostly related to the limits imposed on the user by the Google Books API. At a certain point, the number of books returned on a result page diminishes. A workaround for this is in the works.

Wednesday, 2 September 2015

Using PubChem to match CAS numbers to identifiers

Using the PubChem REST API is the most straightforward for new users because it utilizes the URL.
CAS registry numbers are ubiquitous chemical identifiers that have use in many areas of industry. It is important, therefore, to be able to connect other chemical identifiers to CAS RN, improving the visibility of chemicals on the internet.

1. Download data (containing CAS RN)

Domestic Substances List (Canada)
Non-Confidential TSCA Inventory (United States)

2. Search individually through PubChem REST API (leveraging R) and returning as text.

"naphthenic acids"
https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/1338-24-5/synonyms/txt

R code:

library(XML)
library(RCurl)
LIST<-{your vector of CAS RN}
getURL(paste0("http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/",LIST,"/synonyms/txt"))

use xmlTreeParse() for each entry in the vector to transform it into xml for slightly easier handling.

3. Create list object in R of synonyms by dumping synonyms into list objects.

For each xml, get the value of each synonym node and save it as the i-th list entry.

OR

3b. Use REST API to make a call for identifiers

"naphthenic acids"
http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/1338-24-5/property/InChI/TXT

3c. Append another column to the matrix which contains the identifier (InChI, SMILES, etc...)



USEFUL POST:
http://depth-first.com/articles/2007/05/21/simple-cas-number-lookup-with-pubchem/


Monday, 31 August 2015

Cucumber + blueberry

Cucumber and blueberry, when eaten together, produce a combination of taste which is overall positive.
Together, I wouldn't say they enhance each other directly, but they dull each other's stronger flavours. For instance, some of the distinctly cucumber notes are lessened at the same time the bitter tones of blueberry are lessened.

Noticeable is the buttery flavour of blueberries still present. Overall the total flavour is not strong, but smooth.

The texture is dominated by the crunch of the cucumber whereas the blueberry, almost creamy in the presence of cucumber, is barely noticeable from the point of texture.

When cucumber is eaten directly after blueberries, the flavour of the cucumber overpowers the blueberry flavour quickly but not immediately.

When blueberry is eaten after cucumber, the flavour of the blueberry dominated the cucumber flavour in much the same fashion as the cucumber did to the blueberry.

C + B = C + B + 0.5CB

Monday, 24 August 2015

Carrot + nectarine (white flesh)

The acidity of the nectarine, though low compared to other fruits, seems to "kill off" the flavour of the carrot.

Raw carrot comes with its own rooty tang which had a cousin in parsnip and maybe ginger. Yet, when combined with nectarine, the carrot almost seems to have no unique taste of its own and ask I can taste is nectarine with some tasteless crunch.

There's a huge difference in texture between a soft nectarine and a carrot stick. The carrot is hard, crunchy and dry while the nectarine is juicy, fleshy and soft.

Tuesday, 18 August 2015

Canteloupe + raw peanuts = slightly unpleasant

Cantaloupe, when eaten with raw peanuts, produces a distinct mixture of flavours which is on the neutral to slightly unpleasant side.


Peanuts are dry and crunchy with slight chew and canteloupe is wet and slightly firm. In terms of texture, the two do not mix very well.

Raw peanuts clash with cantaloupe aftertaste.

Cantaloupe clashes with raw peanut aftertaste, but to a lesser extent than the reverse.

For me, the collective aftertaste is generally slightly unpleasant.

Monday, 10 August 2015

Canada Substance Groupings Initiative

There are currently nine groupings of substances which pose environmental and health risks to Canadians.

Aromatic Azo and Benzidine-based Substance Grouping
Boron-Containing Substances
Certain Organic Flame Retardants Substance Grouping
Cobalt-Containing Substance Grouping
Internationally Classified Substance Grouping
Methylenediphenyl Diisocyanate and Diamine (MDI/MDA) Substance Grouping
Phthalate Substance Grouping
Selenium-containing Substance Grouping
Substituted Diphenylamines Substance Grouping

A *csv file containing all the substances is shown below. Copy and paste it and save it as *.csv.

Tuesday, 4 August 2015

Recipe title word frequency for describing the food context of a searched keyword

A search for "adobo" using the Yummly API led to just over 6500 recipes containing the word "adobo".

Viewing the recipe titles then grouping the words according to frequency results in a table of the most frequent words associated with my searched keyword "adobo".

The top 30 most frequent words can be described by a pie chart:

Friday, 24 July 2015

Tetra-tert-butylmethane and other chemical compounds that don't exist

I learned two things yesterday:

  1. You can buy tetra-tert-butylmethane from (at least) the following vendors:
    • Angene
    • Triveni
    • Hangzhou Sage Chemical Co., Ltd
    • Kingston Chemicals
    • Atomax Chemical Co., Ltd.
  2. Tetra-tert-butylmethane has never been made and likely cannot be made.

Aside from being a favourite high-school chemistry nomenclature problem, PubChem and ChemSpider both have entries for this compound. It has CAS number: 4103-17-7. And it does not exist.

So, I went searching.

Thursday, 23 July 2015

Total synthesis of yaku'amide (again)

Total synthesis is always fantastic: You think of what you want to make and then you make it...that was a joke.

A few weeks ago, Inoue and group synthesized and "correctly" characterized the compound yaku'amide, a tridecapeptide named after the sample collection site at 屋久新曽根 (Yakushinsone), again.1,2

Friday, 17 July 2015

On The Number of Phthalates

On the Number of Phthalates

Recently, four cover stories of C&EN magazine were dedicated to the class of molecules called phthalates. Phthalate esters of fatty alcohols are generally used in industry as plasticizers, turning PVC into a more malleable form which comprises many toys for young children. There have been studies of the links between exposure to phthalate plasticizers and antiandrogenic effects in humans (do a PubMed search for phthalates). Reports are coming out about its reproductive effects on females. So, the race is on to develop the next "healthier" plasticizer.