

Getting your heart rate using R and Ruby. - benarent
http://blog.airbrake.io/guest-post/exploring-everything/

======
sadga
Apps that do this using your phone:
[https://play.google.com/store/apps/details?id=si.modula.andr...](https://play.google.com/store/apps/details?id=si.modula.android.instantheartrate&hl=en)

Similar:

<http://hackerne.ws/item?id=4062216> " Eulerian Video Magnification for
Revealing Subtle Changes in the World (mit.edu) 555 points by clockwork_189 57
days ago | comments "

------
EzGraphs
Interesting read. I think that the combination of Ruby (for data aggregation
and preparation) and R (for calculation and visualization) is great. For
instance, in the related-but-not-exactly category:

[http://www.r-chart.com/2010/10/max-heart-rate-
calculations-c...](http://www.r-chart.com/2010/10/max-heart-rate-calculations-
compared.html)

It seems like folks who use R tend to be from a scientific community where
Python has greater respectability and acceptance. But I see some similar
"Lispiness" in R and Ruby that make them somewhat natural to use in
conjunction.

~~~
buckwild
I second this. I'm a scientist who also happens to program (as more of us are
finding we need to do). The two languages I use the most are R and Python.
Most of the time, I don't even give Ruby a second thought because it seems to
be primarily geared towards web development. In general, I shy away from web
development, but I know that Python is more than capable if I wanted to try it
out. There really doesn't seem to be any incentive for us to learn Ruby.

~~~
JonnieCache
There is nothing in ruby that is geared towards web development, not any
moreso than python anyway. It just happens to be mostly used for that.

Ruby does however lack a lot of the ecosystem of scientific libraries python
has, there is no real equivalent to NumPy for example.

~~~
a_bonobo
Ruby also has the reputation of being much slower than Python, and speed is
crucial in the scientific community when it comes to handling data-sets in the
range of terabytes.

Edit: Also, when it comes to computer-technology the scientific community
outside of CS generally lags far behind what CS is coming up with - for
example, blastn, the most commonly used algorithm in biology for nucleotide-
comparison, still doesn't have a proper 100% multithreaded solution.

There is also no adaption of NoSQL or any other of the "modern" data-storage
solutions.

~~~
irahul
> Ruby also has the reputation of being much slower than Python, and speed is
> crucial in the scientific community when it comes to handling data-sets in
> the range of terabytes.

If we are talking computation speed, the difference between Ruby and Python is
a floating point error.

> There is also no adaption of NoSQL or any other of the "modern" data-storage
> solutions.

NoSQL solutions are "modern", but that doesn't equate to being better. I am
more than familiar with almost all major NoSQL players(redis, mongo, couchdb,
cassandra etc), and for 99% of the cases, RDBMS is better solution. There is
no adoption in scientific community(or most communities) because there isn't a
clear benefit. I neither try to use RDBMS as a key-value store, nor do I twist
my relational models to fit into a NoSQL offering(mongo makes the translation
easier, but lacks things I need).

------
sausheong
Thanks everyone for the upvotes and the positive comments! I'm the author of
the blog post and the book.

~~~
spsaaibi
I've been reading your book for a week now Sau Sheong Chang, I can't stop!
It's a fascinating read! I'll let you know when I'm done, thanks for writing
this!

------
gautamc
The idea of detecting change in the amount of light is also used by the
PulseSensor -
[http://pulsesensor.myshopify.com/blogs/news/6326816-anatomy-...](http://pulsesensor.myshopify.com/blogs/news/6326816-anatomy-
of-the-diy-heart-rate-monitor)

------
danso
Before anyone jumps in with "Why do all that coding just to do what I can do
with my hand and chest?"...this is a cool hack that shows practical code for
breaking down a video file and measuring changes. The same concept could be
used to, for example, count number of unique faces that pass through a
room/hallway. Or, for a C-SPAN clip, gauge when who speaks when (depending on
whose face is center-frame during a debate). And other less pedantic ideas.

~~~
zheng
Plus computers actually remember things. I think anyone here can see that a
computerized method of gathering data isn't interesting for the method per se
but the ease of keeping and analyzing said data over a period of time.

------
deepGem
This is very cool. A very useful demonstration of what you can do with R, for
those of us who are non-researchers.

------
benarent
Thanks for the up-votes everyone. I have a coupon code for anyone interested
in getting Saus book / e-book.

~~~
diego
I'm interested if you still have it. If it's gone I may still buy the book, it
looks very promising.

~~~
benarent
Send an e-mail to me ben@airbrake.io.

