media analysis example from rails / angular book