Exploring Everyday Things with R and Ruby
Discover the world around you through programming
Publisher: O'Reilly Media
Final Release Date: June 2012
Pages: 252

If you’re curious about how things work, this fun and intriguing guide will help you find real answers to everyday problems. By using fundamental math and doing simple programming with the Ruby and R languages, you’ll learn how to model a problem and work toward a solution.

All you need is a basic understanding of programming. After a quick introduction to Ruby and R, you’ll explore a wide range of questions by learning how to assemble, process, simulate, and analyze the available data. You’ll learn to see everyday things in a different perspective through simple programs and common sense logic. Once you finish this book, you can begin your own journey of exploration and discovery.

Here are some of the questions you’ll explore:

  • Determine how many restroom stalls can accommodate an office with 70 employees
  • Mine your email to understand your particular emailing habits
  • Use simple audio and video recording devices to calculate your heart rate
  • Create an artificial society—and analyze its behavioral patterns to learn how specific factors affect our real society
Table of Contents
Product Details
About the Author
Colophon
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyExploring Everyday Things with R and Ruby
 
3.7

(based on 6 reviews)

Ratings Distribution

  • 5 Stars

     

    (2)

  • 4 Stars

     

    (2)

  • 3 Stars

     

    (1)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (1)

67%

of respondents would recommend this to a friend.

Pros

  • Helpful examples (4)
  • Concise (3)
  • Easy to understand (3)
  • Well-written (3)

Cons

    Best Uses

    • Novice (3)
      • Reviewer Profile:
      • Developer (5)

    Reviewed by 6 customers

    Sort by

    Displaying reviews 1-6

    Back to top

    (3 of 3 customers found this review helpful)

     
    3.0

    Pretty good

    By jt

    from Oakland, CA

    About Me Developer

    Pros

    • Concise
    • Easy to understand

    Cons

    • Not comprehensive enough
    • Too basic
    • Too many errors

    Best Uses

    • Novice

    Comments about oreilly Exploring Everyday Things with R and Ruby:

    Interesting light reading if you've never used R before and want some fun examples of how to make use of it.

    I enjoyed the first hundred pages, but lost interest after that. I would have liked more explanation with the R examples. I would have liked more depth in general.

    Also, I found myself spending a lot of time on the errata page of the web site. I notice that no one submitted errata after page 100 (there was plenty for the first 100 pages). Does the book have fewer errors at the end or did no one read that far?

     
    5.0

    My favorite read so far

    By Dan

    from Honolulu, HI

    About Me Developer

    Verified Reviewer

    Pros

    • Accurate
    • Concise
    • Easy to understand
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Intermediate
      • Novice
      • Student

      Comments about oreilly Exploring Everyday Things with R and Ruby:

      This book is perfect for readers that want to see statistics used in real world scenarios. It prepares the readers with the required toolset by giving a nice introduction to both the Ruby and R languages.

      Each chapter goes through a real world scenario. Ruby is used to simulate or prepare the data. R is then used to apply statistical methods to the data and interpret the output through graphs and numbers.

      I highly recommend this book for those that are learning statistics and want to see it in action.

      (3 of 10 customers found this review helpful)

       
      1.0

      Does the code work?

      By ajcook

      from UK

      About Me Developer

      Pros

        Cons

        • Too many errors

        Best Uses

          Comments about oreilly Exploring Everyday Things with R and Ruby:

          I'm reluctant to write a bad review, but I can't find any other way of addressing the problems of this book.

          The first couple of background chapters are fine, but on proceeding to chapter 3, the provided code on github just doesn't work.

          Line 1: example3-4.rb:1:9: unexpected string constant - 1: require 'csv'

          It doesn't understand 'csv'. There's no library for R I can find called csv - and I'm stuck.

          Two hours later and I still can't get it to work.

          It may be it works fine for an R expert - but I'm not an R expert and I haven't a clue what's wrong.

          (2 of 2 customers found this review helpful)

           
          4.0

          Great intro book with inspiration

          By zsoldosp

          from Germany

          About Me Developer

          Verified Reviewer

          Pros

          • Easy to understand
          • Helpful examples

          Cons

            Best Uses

            • Novice
            • Student

            Comments about oreilly Exploring Everyday Things with R and Ruby:

            Disclaimer: I received a free (electronic) copy of this ebook from O'Reilly as part of the O'Reilly Blogger Review Program, which also requires me to write a review about it.

            About me and why I read the book

            I have been programming professionally for about 8 years, mainly business applications and reporting, so I already have quite some love for data. While I haven't used math much in my day jobs, I liked (and was good at) it in high school, including taking extra classes - so I have learned basic statistics. Refreshing and advancing my data analytics skills is one of my goals this year, and reading this book was part of that plan - I have heard that R is one of the most powerful languages for statistical analysis currently available.

            About the book

            The book is written assuming basic understanding of programming and sets two goals:
            to awaken the curiosity in the reader to go out and explore things and search for explanation, models, and experiments to validate understanding;
            to show you some basic, but practical R and Ruby.
            While the author intended each chapter to be more or less self sufficient, I have found it to be better read sequentially, especially the simulation chapters.

            Ruby

            I had no trouble with the code examples, even though I have only programmed about half an hour total in my life in Ruby. Beware that the only knowledge you gain about Ruby is the bare minimum required, so you'll have to put aside your thirst for complete understanding of the language and its ecosystem. If you need to have a proper understanding to work in a language (which I don't think is necessary), you are better off either reading a Ruby book first or using your favorite language to obtain the data - the code is easy to port.

            Making me curious

            I have had a lot of wow/a-ha moments, both about the topics chosen for discussion as well as the math/algorithmic ideas. You may find that you disagree with some of the conclusion the author draws, and it is emphasized during the introduction that the goal of the book is not to convince you about these conclusions, but to demonstrate the journey from question to conclusion in order to equip you with tools to enable you doing the same. This is mostly achieved.

            I award extra bonus points for mentioning the limitations of the used analytical tools - I don't think I would trust any book/article/blog post which presents something without its downsides!

            Not all examples are exactly everyday (e.g.: an analysis of going to work by car vs. public transportation would have been more everyday than how to simulate the flocking of birds), but they cover a wide breath of topics. The processing and analysis of the data is always challenging enough, plus your general knowledge is expanded.

            One thing I was missing is a description of a really important part - being a layman, how do I go about finding which algorithms to use? While it isn't a book about Research 101, a description of the search process would have been great. You can of course always google, but when entering a new topic I find guided search helpful - which are some of the trick keywords, which sites to prefer/avoid, etc. On the other hand, enough methods are described that just properly learning and understanding them would make me a much better statistician already. Once done with that I could just fall back reading through the R packages and methods, hoping that if I have seen a word before it would emerge from my passive knowledge when I'm faced with a matching problem.

            The R language

            The book does a solid job to help you get started. It demonstrates enough language features to enable to you experiment with it for work projects (e.g.: use MySql as a datasource, create packages, etc.); points out the R component/library hubs to look for community packages; and recommends further learning resources.

            The code examples are like most programming book snippets - procedural, (mostly) everything is located in a single method/script. Not a tangled-spaghetti mess that makes one despise it in legacy code, only it makes for a lower signal/noise ratio and requires more effort from the reader. Guess its a genre problem, so if you have read other programming books, you shouldn't have any problems with this one.

            The exposed APIs suggest that R is a bit too ceremonial for my taste, but that could be abstracted away for the project that warrants R's use. I have also used a number of visually great .NET UI third party components that were a pain to work with from a programmer's perspective, yet helped us create a great product. Plus things that feel alien first become second nature after enough practice, so it isn't a big deal. I plan to take a look at NumPy as well, and defer the decision whether to dive deeper into R (possibly via using F# 3.0 type providers for R).

            Overall

            The book hasn't left me in awe, but it didn't feel like a chore to read as some other books. I got the taste of R that I wanted when I picked up my copy to read. On top of that, I have learned about fun things, and it also added books to my reading (wish)list (e.g.: The Grammar of Graphics by Leland Wilkinson, Armchair Economist by Stephen E. Landsburg, and more). This is no definitive guide on R, but to wet your appetite and get you started, it is a good one I can recommend without reservations.

            (2 of 2 customers found this review helpful)

             
            5.0

            A new O'Reilly classic

            By Roy

            from Cary, NC

            Verified Reviewer

            Pros

            • Concise
            • Helpful examples
            • Well-written

            Cons

              Best Uses

                Comments about oreilly Exploring Everyday Things with R and Ruby:

                Note: I received this book through the O'Reilly Blogger Review Program

                As many high school or college students could tell you, books about statistics can be rather dry. "Exploring Everyday Things with R and Ruby" turns this preconception on its head, with author Sau Sheong Chang providing a sequence of fun exercises that introduces the reader to the basics of programming and data analysis.

                The book's format is simple enough: Each chapter presents a different real-world scenario or question that could benefit from some sort of quantitative analysis. The first few chapters offer quick tutorials on the two primary tools used in the book: Ruby for data collection/formatting and R for the statistical analysis and graphs. While the pace of these tutorials can seem a bit hurried in places or perhaps be a little overwhelming for those without any programming experience, Chang really does do a good job of choosing what parts of R and Ruby are relevant to the task at hand and providing succinct documentation about they work.

                Of course, the breadth of examples are what make Chang's book stand out. Each scenario uses a different discipline as its home base: sociology, data mining, cardiology, economics, and ethology all brought to bear in one form or another. Chang also uses the scenarios to introduce the reader to a bunch of useful Ruby libraries and toolsets, even showing how to play around with .wav files in a hex editor! Each scenario is simplified enough to make the underlying code accessible, but also contains enough complexity to show the reader that these quantitative techniques really can lead to useful insights.

                While many technical books focus on the intricacies of the particular programming language at hand, Exploring Everyday Things reminds us that these tools are ultimately used for some real-world purpose. By combining a concise but solid foundation in statistical analysis with fun applications across a wide variety of professional arenas, this book should have no problem getting the reader excited about exploring the world around them. In fact, given how well-rounded the book is, I wouldn't be surprised if it started showing up as required reading for liberal arts or interdisciplinary curricula that have a computer science component. Bringing open source tools to bear on everyday problems is proving to be an immensely useful skill, and one that college students should be exposed to whenever possible. Here's hoping that O'Reilly has more books like this in the pipeline.

                (4 of 4 customers found this review helpful)

                 
                4.0

                Fun introduction to Ruby and R

                By Aaron Sumner

                from Lawrence KS

                About Me Developer

                Verified Reviewer

                Pros

                • Helpful examples
                • Well-written

                Cons

                  Best Uses

                  • Intermediate

                  Comments about oreilly Exploring Everyday Things with R and Ruby:

                  The field of analytics is garnering a lot of buzz right now. Whether you're collecting data for scientific purposes or to determine whether to pivot your lean startup, you need to know how to collect, aggregate, and make meaning of the trail of digital information we leave behind every day.

                  In Exploring Everyday Things with R and Ruby, Sau Sheong Chang takes a fun approach to teaching readers the fundamentals of analytics and of two increasingly popular languages: Ruby for harvesting data, and R for analyzing that data with interesting results. The sample projects are among the better ones I've seen in any programming book, ranging from using data modeling to determine the appropriate number of restrooms in an office building to monitoring your health to harvesting connections and meaning from your email. It's easy to spend a few hours with each exercise exploring data and experimenting with different ways to interpret data.

                  You won't become an expert in Ruby or R after reading this book, but you should have a good foundation for future study. One note of advice: You'll probably not get a whole lot out of this book if you don't have any programming experience. While the first few chapters do a good job orienting the reader to the language, they're targeted to an intermediate-to-advanced level.

                  Note: I wrote this review for O'Reilly's Blogger Review Program.

                  Displaying reviews 1-6

                  Back to top

                   
                  Buy 2 Get 1 Free Free Shipping Guarantee
                  Buying Options
                  Immediate Access - Go Digital what's this?
                  Ebook: $25.99
                  Formats:  DAISY, ePub, Mobi, PDF
                  Print & Ebook: $32.99
                  Print: $29.99