-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathindex.Rmd
78 lines (52 loc) · 2.88 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
title: "Introduction to Shiny"
output:
html_document:
toc: TRUE
toc_float: TRUE
theme: simple
highlight: monochrome
---
Scripts and slides for presentations on Shiny. The presentation and material have been adapted for many different uses-- hopefully yours is below!
---
## Slide decks
* June 2022 - NMFS R UG - [Using Shiny for better science communication](presentations/shiny-slides-nmfsrug.html)
* December 2020: [Live translation in Shiny, and using `{learnr}` to supercharge your code teaching](presentations/extraslides.html)
## Tutorials
The shinyoverview [repo](https://github.com/mcsiple/shinyoverview) contains tutorials for `{shiny}` applications. If there are exercises with solutions, they are in a subfolder called `sol/`. You can either clone the whole repo, or download the folder for a specific tutorial.
* [Basics of Shiny](https://github.com/mcsiple/shinyoverview/tree/main/01_basics)
* [How to get data in and out of `{shiny}`](https://github.com/mcsiple/shinyoverview/tree/main/02_dataindataout)
* [Live translation with `{shiny.i18n}`](https://github.com/mcsiple/shinyoverview/tree/main/03_translation)
* [Maps with Shiny and `{leaflet}`](https://github.com/mcsiple/shinyoverview/tree/main/0n_maps)
* [Intro to `{learnr}`](https://github.com/mcsiple/shinyoverview/tree/main/04_learnr)
* [Interactive plots in `{shiny}` with `{ggplotly}`](https://github.com/mcsiple/shinyoverview/tree/main/05_ggplotly)
---
## Setup
If you want to try out the app examples, install the following packages:
```{r eval=FALSE}
# Basics
library(tidyverse)
library(kableExtra) # nice tables
# Shiny
library(shiny)
library(shinythemes) # bootstrap themes
# Interactive plots
library(plotly)
# Making tutorials
library(learnr) # interactive tutorials
# remotes::install_github("rstudio-education/gradethis")
library(gradethis)
# Visualizing reactivity
library(reactlog)
```
This talk will introduce Shiny and its glorious abilities, with the assumption that you have heard of Shiny but haven't necessarily used it yet. Because there are tons of great examples online, I have highlighted tools that I have found useful and fun. The talk structure will be, more or less:
1. The building blocks: basic `shiny` functionality
2. Getting data into and out of `shiny`
3. Lessons I learned during the app development process
These latter two sections are optional but materials are included for you to explore on your own:
4. Translating `shiny` apps using `{shiny.18n}`
5. Shiny as a teaching tool using `{learnr}`
## Example apps
* [Novel-gazing](https://msiple.shinyapps.io/NovelGazingApp/) (for Goodreads users)
* [Adopt Don't Shop](https://nsilbiger.shinyapps.io/AdoptDontShop/) (collaboration with Nyssa Silbiger)
* [Marine Mammal Bycatch Impacts Exploration Tool](https://msiple.shinyapps.io/mmrefpoints/) (Collaboration with The Ocean Modeling Forum's Marine Mammal Bycatch Working Group)