Skip to main content
SAGE
Search form
  • 00:01

    MARTIN JOHN HADLEY: OK.So let's gather together all of our toolkit into one.Let's take our interactive visualizations builtusing HTML widgets, our Shiny app, and our R Markdownpresentation, and let's publish that all to the webso we have a visual story we can tell to anybody in the worldthrough a web browser.To start, I need you to go into the resources

  • 00:22

    MARTIN JOHN HADLEY [continued]: and to find a publishing R Markdown to R Profile.When you've found it, double click it.That'll open about our RStudio project.OK.So what we have in here is an R Markdown file.I'm going to open that up.And the first thing I'm going to dois knit together the R Markdown document.I don't want look for the code.I just want to see how does our presentation look.

  • 00:46

    MARTIN JOHN HADLEY [continued]: But while this is knitting together,I remember it's got HTML widgets in it.It's got Shiny apps.And so I can't really trust RStudio's web browserto do a good job of rendering it.So I'm going to remember to click Open In Browserso I can see how my presentation would look in a real browserwhen it's deployed to RPubs.

  • 01:07

    MARTIN JOHN HADLEY [continued]: So we can see the title of my presentationis desktop item survey by Martin John Hadley.And I'll tab to the next slide.We can see an overview of my study.And then we can see I've actuallyincluded an i-frame that shows the Google form whichI presented to people and they filled infor me to generate this data that my presentation's about.

  • 01:28

    MARTIN JOHN HADLEY [continued]: Remember you can look into the code in the RMarkdown file to see how I embedded this iPhone.OK.So here we can see I've got an interactive leafletmap as well.I can hover my cursor over one of these points.And it tells me which university I received data from.You'll notice I've got rid of those awkward plus and minus

  • 01:50

    MARTIN JOHN HADLEY [continued]: buttons here that would reset our position in a presentation.But I can zoom in and out using my scroll wheel if I want to.Then I can scroll along.And I've got my HTML widget from the high charter library.And then if I scroll along, we cansee I've got the Shiny app that I deployed a few videos ago.

  • 02:10

    MARTIN JOHN HADLEY [continued]: So we can see that I can change my slider hereand I get new data generated in my histogram.And if I change the plot label to Martin's plot,we can see it updates that but the data isn't changed.And that's because we learned howto use event reactive to control the flowof reactive expressions in a Shiny app.

  • 02:33

    MARTIN JOHN HADLEY [continued]: OK.And then I've got a thank you for listening slide.So that's a nice way to finish our presentation.Great.Now we're ready to publish this to RPubs.How do we do that?Well, it's incredibly simple.It's about as simple as it was to deploy a Shiny app.So I'll close my web browser.I'll return to RStudio.

  • 02:54

    MARTIN JOHN HADLEY [continued]: And what is useful about this browser windowis it has the button Publish.So I select Publish.And we're given two options, RStudio connect, which wedon't want to use, and RPubs.So we're given a reminder that RPubs is a free publishingplatform provided by RStudio.

  • 03:15

    MARTIN JOHN HADLEY [continued]: Everything published there is public.So you don't want to put private government secrets up there.And you don't want to put things that you're nothappy for other people to see.However, you can delete anything that you upload there.So if you're worried about creating an accountand putting test presentations therewhile you're going through this course,you can be confident you can delete those.

  • 03:36

    MARTIN JOHN HADLEY [continued]: So in the future, if somebody goes to your profile,they'll only see the rich, good presentationsthat you're going to build after you've masteredthese tools from this course.OK.So when we click on Publish, we'regoing to be sent to a page to create a new account.I'll click Publish.So let's create an account.

  • 03:58

    MARTIN JOHN HADLEY [continued]: So I'll create an account.My name is Martin John Hadley.My email address for this course issageinteractivevis@gmail.com.Don't try emailing me here, because I nevercheck this mailbox.It's a throwaway email address.

  • 04:20

    MARTIN JOHN HADLEY [continued]: And let's call ourselves sageinteractivevis as well.And then our password.Let's go with a super secret password like this.We'll register.And now we've created our account,

  • 04:41

    MARTIN JOHN HADLEY [continued]: we're asked to create a slug for our presentation.So a slug is a slightly arcane term for a URL.So we can see that our presentation willlive at RPubs.com slash our user name and thenwhatever name we choose for this presentation.Let's call it survey on desktop items.

  • 05:04

    MARTIN JOHN HADLEY [continued]: Lovely.And now let's click Continue.And we're sent to our published version of our presentation.So now I can tap through a slide with the right arrow key.So I can see my embedded Google form.I can see my interactive map with my nice tool tipswhen I hover over each of these icons.

  • 05:26

    MARTIN JOHN HADLEY [continued]: We can see that I have an interactive high charter chart.And I have my interactive Shiny app embedded here as well.And that's that.What's really nice about the RPubsactually is down here you'll see comments.So if you wanted to during your presentation,you can tell people they can write comments here.

  • 05:48

    MARTIN JOHN HADLEY [continued]: And you could come to these commentsas part of the question and answer session in the seminaror conference.So I really hope that you enjoyed this courseand you followed along with me in using the tidyverseto import, clean, and really get to understand data, thenhow to use a couple of different HTML widget libraries

  • 06:09

    MARTIN JOHN HADLEY [continued]: to create a number of different interactive visualizations,from maps to charts to network diagramsand specifically network diagrams in a Game of Thronesuniverse.Then we learned how to create Shiny apps.And we learned how to do somethingquite advanced with Shiny apps to controlthe order in which operations are evaluated,so to use event reactive.

  • 06:30

    MARTIN JOHN HADLEY [continued]: Then we learned about R Markdown,so how we can create documents and presentationsto contain our interactive visualizations and evenour Shiny apps by embedding them as i-frames.I really hope you've enjoyed the courseand that you use this toolkit to create your own visual storiesto communicate your research data.

Video Info

Series Name: Interactive Visualization with R for Social Scientists

Episode: 21

Publisher: SAGE Publications Ltd

Publication Year: 2017

Video Type:Tutorial

Methods: Data visualization, Publishing your research, R statistical package, R packages

Keywords: charts (data visualization); data visualisation; interactivity; internet; programming and scripting languages; publishing ... Show More

Segment Info

Segment Num.: 1

Persons Discussed:

Events Discussed:

Keywords:

Abstract

Martin John Hadley, Data Visualization Specialist at University of Oxford, explains how to take all the interactive visualizations built using HTML widgets, the Shiny app, and the R Markdown presentation and publish them to the web, and provides a course wrap up.

Looks like you do not have access to this content.

Module 4: Publishing

Martin John Hadley, Data Visualization Specialist at University of Oxford, explains how to take all the interactive visualizations built using HTML widgets, the Shiny app, and the R Markdown presentation and publish them to the web, and provides a course wrap up.

Copy and paste the following HTML into your website