Embedding Videos in Displayr Documents

Embedding Videos in Displayr Documents

Videos can be embedded into Displayr documents with a few lines of code. This is particular useful for showing videos of advertisements and vox pops. These can then be either published as online reports, or re-embedded elsewhere.

The YouTube video below has been created as follows:

  1. Get a link to wherever the video is hosted. For example, if using YouTube, as in the video below go to the video, click Share and then copy the embed code.
  2. In Displayr: Insert > R Output.
  3. Paste in the code below, updating the src in line 8 with the address of your video.

Then you are done. You can publish it or embed it as you need.

About Tim Bock

Tim Bock is the founder of Displayr. Tim is a data scientist, who has consulted, published academic papers, and won awards, for problems/techniques as diverse as neural networks, mixture models, data fusion, market segmentation, IPO pricing, small sample research, and data visualization. He has conducted data science projects for numerous companies, including Pfizer, Coca Cola, ACNielsen, KFC, Weight Watchers, Unilever, and Nestle. He is also the founder of Q www.qresearchsoftware.com, a data science product designed for survey research, which is used by all the world’s seven largest market research consultancies. He studied econometrics, maths, and marketing, and has a University Medal and PhD from the University of New South Wales (Australia’s leading research university), where he was an adjunct member of staff for 15 years.