Google+

Exploring Everyday Things With R and Ruby - a Book Review

by: Victor Goff

I got the opportunity to review Exploring Everyday Things with R and Ruby by Sau Sheong Chang and published by O’Reilly Media.1  

This book, as expected, talks about R and Ruby.  The first chapters cover Ruby at an introductory level.

In the first chapter, after showing how you can install Ruby and an introduction to the basics of Ruby, he also provides a quick introduction to Shoes, a simple but powerful UI toolkit for Ruby2, with installation suggestions and sample code.

His introduction to Ruby covers the basics and is just a little bit more than enough to understand the code in the rest of his book.  I think he did a really good job of that.  The second part of the first chapter, covering Shoes, explains Shoes in a nutshell rather well, I think.  You will get to use Shoes in later chapters.

He then goes on to introduce R, which I had not used before.  He covers in a way that was fairly straightforward to install and get running.  Within a few moments, I had R installed and the ‘normal’ graphical tools up and running and was able to run some sample code, and even had graphs floating around my screen based on data that I created from the samples.

Shortly after that, I had R code being created in my favorite text editor, and executing code right from there.

His introduction to the language is fairly quick, but again, just a bit more than enough to get you going.

He also covers some statistical transformation examples to change the statistical data into plottable information.  That is a good thing, because throughout the book, you will be needing to recognize this in the examples, and will have fun producing your own graphical representations of data you get.

And all that is enough to get you started creating models to solve real world problems.

For example, do you need to convince your boss that you need more restrooms available for the people in your office?  You can provide some simulations and reports and graphs (the boss likes graphs, right?) to support your argument, or will it support his assertion that what you have is just the right amount?

This gets to the fun part.  Have you ever wondered how to mine data from your own e-mail?  To find trends of when you send mail, or who you communicate with most?   Finding the most frequently used words and the trending themes in your communications?   You are in luck.  He will take you through the Enron Saga to lightly touch on analyzing that e-mail data 3, but easily apply it to your own IMAP e-mail accounts.

How about biometrics, recording your own heartbeat through a home made electronic stethoscope?  Yes, you will be able to do this, and take measurements, and analyze them graphically.  Combine that with pulse oximetry with your webcam and you might have just enough evidence to convince your boss that your cubicle is suffocating you.

That sounds fun enough, but it will involve analyzing sound files and video files to get the readings and measurements that you want to produce in a graphical chart.   That makes it fun to the nth power, right?

Well, what can be more fun than Boid’s… and boid is the woid in this next chapter.   Using Ruby Shoes you will explore the flocking of birds, you will write a simulation and are encouraged to continue playing on.

What follows is an extension of the Boids and introduces the mortality and procreation of the boids, which were prior to this immortals in a veritable utopia.  Life simulated and analyzed.

Overall, I really enjoyed this book, it was easy to read, had some math in it, of course, but nothing that requires advanced math.  And the topics were fun to work through.  And there is plenty of room to experiment and explore after finishing the chapters.

Note; This review cross posted at RubyLearnings Blog with permission.

The conversation starts here, and continues on Google Plus!