Python Data Science Essentials

Authors: Alberto Boschetti and Luca Massaron published by Packt April 2015.

I am a Data Scientist who usually codes in R. It was a challenge to get comfortable  enough in python code to review the book. Python come in a lot of flavors.  I used Anaconda Launcher to run jupyter notebooks. The code is on the publishers page.

With broad strokes in six chapters it cover the fundamentals of Data Science using python. The pretty blue mosaic tile swirl on the cover catches your eye.

My favorite chapter is chapter five on Social Network Analysis. I like the table on graph types, node and edges. For example Twitter, a directed graph, people are nodes and followers are edges. Very useful table for writing code.

Get the code, run the notebooks, have fun.



Mastering Social Media Mining with R

Mastering Social Media Mining with R

Sharan Kumar Ravindran September 2015 Packt publisher

Useful R book that covers current Social Media and  data science techniques.

My favorite library in this book is from chapter six, SocialMediaMineR.

The function get_facebook from SocialMediaMineR package takes a URL and returns a data frame of shares, likes etc.  The function is easy to use. You do not need OAuth just a link. Works like this:

> library(SocialMediaMineR)
> get_facebook(“”)
trying URL ‘’
Content type ‘¸’
ýþ’ length 256338 bytes (250 Kb)
opened URL
downloaded 250 Kb

url normalized_url
share_count like_count comment_count total_count click_count
1 432 361 155 948 0
comments_fbid commentsbox_count
1 10150745127795008 0

This one function could keep you occupied for a long time.

But there are other useful libraries in this book: ROAuth for OAuth, twitterR for Twitter, Rfacebook for facebook, and rgithub for github.

The book covers exploratory data analysis, EDA. in the chapter on github.

Sentiment Analysis in the chapter on Twitter.

The book briefly covers a lot. There are many other books that cover a single topic in more detail. Read this book to discover what you want to explore.


Building a Recommendation System with R

Written by  Suresh K. Gorakala and Michele Usuelli, published by Packt Press 2015

This is whole book on a topic that is often only a single chapter in a book. It is a book for people who already know R and machine learning .

The book uses Math equations not just code for teaching the concepts.

Covers confusion matrix for classification. Along with sensitivity and specification.  Lots of details about type one and type two errors. This  clearly written section will help you understand why you don’t want either type of error and what they are.

Classification similarity measures include Euclidean Distance, Cosine Distance and Pearson Correlation.

Dimensionality  reduction techniques include Principle Component Analysis.

Data Mining techniques include K-means clustering and Support Vector Machine.

Recommender System includes collaborative filtering and content based filtering.


R package for the book is recommenderlab.

recommenderlab: Lab for Developing and Testing Recommender Algorithms by Michael Hahsler at

Other packages used are lsa, e1071, cluster.


On Meaningful Scientific Laws

On Meaningful Scientific Laws book cover
On Meaningful Scientific Laws

Written by Jean-Claude Falmange and Christopher Doble published by Springer 2015

This is a concise book full of proofs. They define Scientific Law in the Preface. An equation in which the variables represent quantities that are physical or geometrical. Meaningful is described in Chapter 5, Defining meaningfulness.

I read this book to take a break from the tangles data messes I am straightening out. It was a pleasant break.  This is a well written book with concise definitions. Well constructed proofs. I think a patient beginner could understand the book.

Useful ideas that would lead to not tangling data in the first place, like ratio scales in Chapter 2.

Chapter 9 Dimensional Invariance and Dimensional Analysis. You have to read thru the whole book because each section builds on previous to get to this valuable part. It is worth for the knowledge.

Now I am ready to get back to untangling data.

Sample Bias or is this a Classification Problem?

curious white  dog
curious white dog

I am very frustrated with the hiring process. This is going to focus on logic. Given that a diverse workforce is wanted. Take 500 diverse qualified applicants screen to 50 then 5. One screening criteria, phone screens.

Chance is .01 to make it thru the process.
Let us go back to the screening criteria, a cell phone.

A successful phone screen requires a quality cell phone and a quiet place to chat.
Did the diverse workforce even make it to start of the process? Or is the screening process starting earlier making sure that you only get the like you people.

Data Manipulation with R second edition

Jaynal Abedin, Kishor Kumar Das wrote
Data Manipulation with R second edition March 2015 published by Packt Publishing.
I found the first book useful. The second edition continues to be very useful. Chapter 5 covers R and databases. The limits of using R in memory and practical ideas of workarounds to solve the problem. Like ff and filehash packages.

Chapter 4 covers the melt function in the reshape2 package.

A lot of useful information for the hard work of getting data in shape.

Indirect Questioning in Sample Surveys

indirectquestioningIndirect Questioning in Sample Surveys written by Arijit Chaudhuri and Tasos C Christofides. Published by Springer 2013

Some topics are extremely important to have information on, but so sensitive and touchy that it is hard to get people to talk about them.

This is a good book to help with gathering information about sensitive characteristics in surveys.

Lots of math proofs to explain the techniques. Such as Item Count Technique and Three Card Method.

Chapter 4.6.2 is about Crossed Model for the case of two stigmatizing characteristics.

Chapter 7 is is on protection of privacy.

This is a good book. I look forward to digging into it and figuring out how to write computer programs for some of the techniques.

Beginning Data Science with R


Beginning Data Science with R written by Manas A. Pathak, published by Springer Publishing 2014.
ISBN 978-3-319-12065-2

Code examples at

This book is written for coders who already know how to code to learn R for data science.

The book covers how to install and use R, but not an IDE like RStudio.

Chapter 2 includes control structures and functions. That functions in R are treated as first class objects. A fundamental property of functional programming languages.

Chapter 3 is on getting data into R. How do get the data into R is a common question. Years ago I was puzzled about getting data into R. I didn’t want to type it all into an array. You don’t have to type in the data, R will read, pull, connect to all sorts of data sources.

Chapter 4 is a nice over view of data visualization.

The book goes on to cover necessary topics and techniques in Data Science. What I want to point out is Chapter 7.3.1 on nearest neighbors uses a package that I haven’t used before kknn. The package is straight forward to use. The author Pathak has written an easy to grasp explanation of the technique.

This is a good book to get you stated coding in R for data science.

R for Cloud Computing


R for Cloud Computing, An Approach for Data Scientists
A Ohri, published by Springer Science Business Media 2014

This is a useful book on how do cloud computing with R. How to set up your accounts and use OAuth to access services.

Chapter 8.1  page 237 shows how to ensure your R code doesn’t contain your login keys.

The book covers the major services available Amazon AWS, Google Cloud and MicroSoft Azure.

AWS needs a credit card even for the free services.

There are nice data visualization services. Google Vis which has an R package googleVis. And  which has an R library that you install with devtools from git hub, package plotly. Direction are on site under r/getting started.

Some things change between when a book is published and when you go to use it. Be flexible and search for what is similar and works.

Google code is gone. There is now a package on cran to interface to Google Analytics called RGoogleAnalytics. Information on Google developer site.

In addition to being a good overview of what is out there are interviews that are fun to read and a nice table of my first 25 R commands.