Coder Social home page Coder Social logo

shinytutorials's Introduction

Shiny Tutorials for Statistics Instructors

This repository contains the source code for a MOSAIC Project tutorial. It is intended for statistics instructors who would like to write their own Shiny apps for classroom use.

Overview

Shiny makes it easy for R users to develop responsive, R-powered web applications. As you probably know, either from your own initial forays into Shiny or from the Shiny Tutorial, creating simple apps is no problem, and probably you have some ideas for teaching apps that could be written using just the tools developed in the Tutorial.

But some teaching apps appear to be quite complex. Consider, for example, this app which aims to introduce the student to the Chi-Square Test for Goodness of Fit. The app takes the user through a simulation process, keeping track of the results of simulations as they accumulate, permitting the viewer to consider the results from several points of view, and allowing the viewer to start over, perhaps with new data.

The aim of this tutorial is to take you step-by-step through the construction of a reasonably full-featured simulation app that lets students explore, through simulation, the coverage properties of the classical t-intervals for a population mean. After completing the tutorial you will be able to write your own simulation apps---hopefully having been spared some of the struggle that I went through when I first learned Shiny in the Spring of 2014.

Prerequisites

This tutorial assumes that you have:

  • familiarity with R. We'll assume some basic facility in R programming and that you can at least read and understand R code that creates custom plots in R's base graphics system. For the most part our explanation of R code will be limited to its relationship to app-building.
  • an introductory knowledge of Shiny. All necessary prerequisites in this area can be acquired by watching Garret Grolemund's excellent three-part webinar on How to Start with Shiny. (See R Studio's webinars page.)

How to View the Tutorial

The tutorial is a runtime: shiny R Markdown document. I would like to host it that way, but many students from the Coursera Data Science spcialization visit this site and my shinyapps.io account is capped at 500 hours per month. Therefore, in order to view the tutorial you must run it on your own machine by following one of these two procedures.

Git Users

  • Clone this repo into your computer (or fork onto your GitHub account and then clone).
  • In the cloned repo, open the directory sim_tutorial_Rmd and find the file tutorial_sim.Rmd.
  • Open the file and run it. (It runs as a local shiny app.)
  • Enjoy!

Non-Git Users

If you don't use Git, then:

  • Download this repo as a zipped file using the Download Zip button on the right above.
  • Extract the repo into a directory of your own choosing.
  • Open RStudio, open the directory sim_tutorial_Rmd and find the file tutorial_sim.Rmd.
  • Open the file and run it. (It runs as a local shiny app.)
  • Enjoy!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.