shinyTutorials

July 29, 2023 ยท View on GitHub

the shiny app tutorials project

Update README

shinyTutorials

This repo contains the code for the examples and demonstrations presented on my site: davidruvolo51.github.io/shinytutorials/.

Contents

Motivation

In my early days of learning shiny, I kept a document of tips and tricks. It worked nicely, but it quickly became too cluttered and scattered. I decided to create this project to organize the material in to a series of practical examples and to make it available for the wider R community.

I am interested in web accessibility, data visualization and the communication of results, and good design practices. Many of the examples that I developed rely heavily on HTML, CSS, and JavaScript methods. I will try to keep things simple and provide links for further reading.

Suggestions for improvement are always welcome!

Tutorials

I plan on developing a new Shiny app every now and then. Checkout the issues label Tutorial Ideas for examples that I'm currently developing or planning. New ideas are also welcome!

There are two types of examples: available and archived. Available examples are regularly maintained and updated. The archived examples still work, but the methods are outdated or the example was replaced by a newer one.

Cloning Tutorials

You can clone the entire repository, but be aware that you will also clone the entire git history. You can either download the files or folders that you want or use git sparse-checkout. In the terminal, run the following commands.

git clone --filter=blob:none --sparse https://github.com/davidruvolo51/shinyAppTutorials
cd shinyAppTutorials
git sparse-checkout init --cone
git sparse-checkout set drag-and-drop

Replace drag-and-drop for the subdirectory that you wish to checkout locally. For more information, take a look at this GitHub blog post: Bring your monorepo down to size with sparse-checkout.

Available Tutorials

namedescriptionversionlink
data-editorA shiny app for editing dataset in shiny1.0.0tutorial
drag-and-dropcreate a drag and drop component1.0.1tutorial
get-window-dimssending data from javascript1.1.0tutorial
js-handlersgetting started with custom handlers1.1.1tutorial
leaflet-loading-screenscreating a loading screen for leaflet1.0.0tutorial
login-screenAdding basic user authentication to shiny apps1.1.0tutorial
progress-bars-examplecreating a shiny progressbar using R6 classes1.1.0tutorial
responsive-datatablescreate responsive datatables in R1.1.0tutorial
rmarkdown-appusing Rmarkdown as Shiny UI1.1.0tutorial
sass-in-shinyintegrating SASS into your Shiny development workflow1.1.0tutorial
setting-html-attributesset document attributes1.0.1tutorial
shiny-accordionA component for collapsing HTML elements1.0.0tutorial
shiny-landing-pagecreate a landing page1.1.0tutorial
shiny-linksa component for within app navigation1.1.0tutorial
shiny-listboxcreate listbox components in shiny1.1.0tutorial
time-inputcreating a custom time input for use in shiny1.1.0tutorial

Archived Tutorials

The examples listed in the following table are achived. They still work, but they are either outdated or were replaced by a newer example. (I'm a bit hesitant to remove these examples in case some follows a link to a page that doesn't exist.)

namedescriptionversionlink
internal-linksCreate a link from a leaflet popup to a shiny page1.1.0tutorial
internal-links-basic-exCreate links from one shiny page to another1.1.0tutorial
internal-links-demoNavigate to a specific tab on another page1.1.0tutorial
select-input-stylingStyle a select input element using CSS1.1.0tutorial

The internal links examples are outdated. Instead, use the shinyLink component described in the Shiny Link subdirectory (02 August 2020).

Resources

Many of the tutorials rely heavily on HTML, CSS and JavaScript to create specific layouts and interactivity. These are good skills to have, and they will come in handy when building custom applications. Throughout the examples, I've tried to keep things simple and provide links to outside sources where applicable. If something isn't clear or you have suggestions for improvement, feel free to open a new issue.

If you would like to learn more, here are some links that you may find useful.

Communities

Courses

Web Accessibility

Web Development

Contributing to this project

If you would like to add your own tutorial, that would be wonderful! Get in touch with me by opening a new issue and checkout the Contributing Guidelines.