TidyTuesday: Flexdashboard vs Shinydashboard
HTML-код
- Опубликовано: 11 сен 2024
- In this week's TidyTuesday video, I compare two #RShiny packages, #Flexdashboard and #Shinydashboard. I create two simple dashboards using the PalmerPenguins dataset and then I give my thoughts on the use cases for each package.
Q&A Video: forms.gle/Gsi8...
Connect with me on LinkedIn: / andrew-couch
Code for this video: github.com/and...
Flexdashboard: rmarkdown.rstu...
Shinydashboard: rstudio.github...
TidyTuesday: github.com/rfo...
PC Setup (Amazon Affiliates)
Keyboard: amzn.to/3Bbbk3T
Mouse: amzn.to/3BcRGVo
Microphone: amzn.to/3ePo9JS
Audio Interface: amzn.to/3qTAmjz
Webcam: amzn.to/3L9Ql6j
CPU: amzn.to/3qGa6Zu
GPU: amzn.to/3DnhMHL
RAM: amzn.to/3LdTxh7
Great job Andrew, Flexdashboard is great for quick prototyping and also for beginners to start out building dashboards from its early stage. Shiny takes things to another level and contains lots of different functions, modules etc and could be a bit frustrating for a beginner to start out with. I am now learning Shiny and definitely I believe it requires lots of practice to build dashboards on Shiny and then deploying them into production. Anyways, great video and thanks for sharing with the community!
I’ve always skipped flexdashboard for shinydashboards for flexibility but I guess having the flexibility of exploring and testing new plots before quickly converting into a dashboard for sharing sounds like a good intermediate step. Great video!
thanks for succinctly explaining the video
Never used Shiny or Flex before. Thanks for a great introduction!
Thanks Andrew, I just found your channel and love this part of Flexdashboard.
Hope you could do more videos classes with flex that we can include maps, images, etc in order to get better visualizations.
Hey Andrew , Thanks for the explanation I found it very helpful. I’ve definitely subscribed . looking forward for the next one.
Just what I wanted. Thankyou. Could you do one on how to use the Drake and embed package
I'm not familiar with Drake but I'll look into it. I will probably not make a video specifically about the Embed package but I do have a few videos of me briefly going over it ruclips.net/video/tZYrVwmr2d8/видео.html. I also have a video of me using word embeddings in TidyModels ruclips.net/video/ntk_1xLQBwo/видео.html
In my opinion, I think these dashboarding packages are just a baggage that don't add anything of value to the design of a shiny app while severely limiting the flexibility of the UI.
Just learn shiny well and then some HTML and CSS. If you feel a little more fancy, use *shinyjs* to add more interactivity. For the dashboarding itself, I found a package called *bslib* that does miracles while not getting into your way.
Thanks so much for this dude
Hi Andrew, is it possible to add the Shiny's filter to a flexdashboard then convert it into a local off-line HTML file? (So when I open the HTML file, the filter will be there).
I find that if I code the Shiny filter, there is no HTML file produced to share to others, and I will have to publish the dashboard online but I do not want to do that.
You wouldn't be able to use Shiny since it needs to be continually run but you might want to look at the crosstalk package which can work with HTML widgets such as plotly, leaflet, and DT. rstudio.github.io/crosstalk/index.html
@@AndrewCouch Thanks mate, your videos are really great
Great video. Thanks.
Hey Andrew, i'm a big fan of yours...i've been following your videos and i think all your content is awesome! ...You have helped me a lot in my journey with R...I just wonder if there is a chance for teaching us how to deploy a Shiny app into a some sort of cloud service or shiny ios, perhaps... It gonna be so appreciated...And again thank you for the wonderful things you have showed us
I think a video on deploying Shiny apps would be interesting but I'm not sure how I would do that. I can definitely show how to deploy a dashboard using shinyapps.io but I'm not sure how I would make a video on deployment using containers. I am planning on making a series on starting a side-project from scratch and going through all of the phases (data scraping, data cleaning, feature engineering, modeling, dashboard/app development, and deployment) so I will start looking into various ways to deploy Shiny apps.
-Andrew
@@AndrewCouch It sounds great Andrew! Thank you so much for your reply
Thanks for this amazing video Andrew; could you give it a shot with leaflet (lat long data) with flex dashboard ?
I will be releasing a video comparing popular GIS packages (Leaflet, OpenStreetMaps, ggmaps, etc.) soon!
Could you make a video on how to include shiny dashboards on rmarkdown distill websites? Thank you
Did you close console, environment and file tabs?
hey Andrew, great video! May I ask what shortcuts do you type to get the dplyr chain %>% ?
CTRL + SHIFT + M
Great vídeo!!!
Thank you, very interesting. Could you share some code on how to export flexdashboard as an html file which contains all the data so it could be send via email and opened in a typical browser? Thank you!
Hi Andrew!.
Could you help me to undestand in 12:19 the option selectInput you put "v_species" did you filter something from your data to called like that? or what did you do?. Thanks in advance.
Hey Harry, "v_species" is a variable that corresponds to selectInput (the dropdown filter). I then can use that variable to filter my dataset that is used in the graphs. I hardcoded the options with All, Adelie, Chinstrap, and Gentoo because those are the species found in the palmerpenguins dataset. I hard-coded the options which is not good-practice but I wanted to add the All feature and that was the simplest/quickest way to do it.
@@AndrewCouch thanks for the answer. About the dropdown filter is it possible to do in flexdashboard or just in shiny?
@@nept4ne You can have a dropdown filter for both flexdashboard and shiny but for flexdashboard, you need to add runtime: shiny in the first code chunk.
---
title: "Flexdashboard Penguin"
output:
flexdashboard::flex_dashboard:
orientation: columns
vertical_layout: fill
runtime: shiny
---
Hi@@AndrewCouchif I put "runtime: shiny" I cannot export as html right? or is it possible?. Because I would to send my file to someone else
@@nept4ne you would not be able to render it as an HTML file with rutime: shiny. You can use plotly which has some filtering capabilities and render that as an HTML file.
Insane
So I have a R markdown established but my stakeholder now wants me to take my bargarphs and provide the ability to filter down by region, recruiter, etc. (I work as a statistician in HR) is there that capability here?
Yes, that's exactly what Shiny is made for. Just bear in mind that hosting shiny apps is a hassle. The posit team clains to offer a free hosting for small app but that's just a publicity stunt since that option doesn't allow the user to use new packages that are not already installed on that server. So, you'd understand that you can't possibly run any non-toy app without using at least one specialized package.
Is there an auto refresh mode in flex dashboard rather than always refreshing the underlying rmd file?
You could schedule the flex dashboard to produce a document but you couldn’t use R shiny as the back end.
Great video, will try it out today!
Hey Andew, I tried this on one of my datasets and it worked but the next day the Plots would not render. I had to refresh the script multiple times then it would work. Have you experienced this before?
Yes, there could be a lot of potential issues but the first I can think of is that your working directory is not in the correct folder and the files/variables are not being read in. Can you give send me the console errors?
@@AndrewCouch Thanks, I dont think its the folders being read in as I have another tab with just a normal table. I don't get any errors, just some warnings. What happens is the first time I runthe Document it has blank screen for the plots, then if I close and then change the filter entries on the dropdown it works. (Not everytime though)
I tried to search online and could not get a concrete solution yet. Any thoughts from you would be great
@@janar37 Does your dropdown have a default value? It may be filtering the plots with a value that is not in the dataset.
@@AndrewCouch It should not, the filter is essentially the "All" option you had in your video and then a character vector that pulled the unique values in the column that it filters on. I did all of this in a section after loading the libraries.
what means the minus signal before some variables?
I'm deselecting the variables from the data frame.
Awesome video. Thanks