Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Following on from the success of Shiny in Production 2022, last week we were delighted to host the conference for the second time. The event took place at the Catalyst in Newcastle and featured two days of workshops and talks spanning all things Shiny!
On day one, we held three interactive workshops:
-
Introduction to Shiny for Python – Our guest speaker, Andrie de Vries from Posit, ran a workshop introducing the Python implementation of Shiny. Andrie covered the basic building blocks of a Shiny application in Python through a nice mix of presentations and hands-on exercises.
-
Building Responsive Shiny Applications – Our JR data scientist and trainer, Keith Newman, ran a workshop looking at how to build responsive shiny applications. Keith covered responsive design principles and best practices as well as som CSS tricks for when built in solutions don’t quite cut it.
-
Shiny Testing – Russ Hyde, another JR data scientists and trainer, ran a workshop on automated testing in production grade shiny. Russ demonstrated how to utilise {shinytest2}, {testServer} and {testthat} to make app development a happier and more predictable experience.
If you’re keen to learn more about Shiny and other web frameworks (or something else entirely!) check out our full list of available training courses.
Do you require help building a Shiny app? Would you like someone to take over the maintenance burden? If so, check out our Shiny and Dash services.
Day two featured a series of talks by prominent Shiny experts from across a range industries:
Keynote: George Stagg (Posit)
Shiny Without a Server: webR and Shinylive
Our opening keynote was given by George Stagg, a senior software enginner at Posit. George began by providing some motivation for webR and Shinylive, which allow users to run R and Shiny code in the web browser without the need for an expensive server. WebR supports graphics, presentation slides with Quarto, and interactive code in the browser. George went on to emphasise three main use-cases for Shinylive:
- Building apps in the browser and sharing with colleagues
- Migrating an existing Shiny app to Shinylive using the {shinylive} package
- Embedding Shiny apps in presentation slides using the Quarto extension to Shinylive
Before finishing, George noted that Shinylive is still experimental and should not be used for hosting apps that contain hardcoded secrets and passwords.
Liam Kalita (Jumping Rivers)
The Road to Easier Shiny App Deployments
Liam spoke about his experiences assisting clients with bringing their apps to production. He outlined some of the most common reasons that an app can fail at deployment, including missing dependencies, incorrect credentials for external databases, and insufficient system resources. He then shared some top tips to be more proactive:
- Add continuous integration / continuous deployment (CI/CD) checks that have to pass before deployment can happen
- Containerise the app using tools like docker to create a portable environment that can be used across different machines
- Use monitoring and alerting to track demand and performance
Liam finished by emphasising the importance of deployment logs and avoiding hardcoded secrets.
Chris Brownlie (Barnett Waddingham)
Anatomy of a Shiny app
Chris took us on a tour of the building blocks of {shiny} to explore what really goes on under the hood of a Shiny app. We learnt about the responsibilities of some of the main components used in Shiny, such as ShinySession
, ReactiveEnvironmen
t & ReactiveVal
and how they fit together. Chris showed us how “de-magic-ifying” shiny can help us to improve our app design and avoid common pitfalls, as well as aid beginners learning shiny. The talk wrapped up with some very relatable comments Chris found whilst digging through the source code, showing that even developers of large tools such as Shiny sometimes have to resort to a “copy/paste job” “:sob:”.
Naomi Bradbury, Clareece Nevill and Janion Nevill (University of Leicester)
Health Data Scientists Developing Production Grade Shiny Apps
Naomi, Clareece and Janion told us the story of how they unexpectedly became developers of a suite of shiny apps for healthcare researchers. They started out with a couple of simple proof of concept apps created as part of a mini project. However, as more researchers realised how useful their apps were, they started getting emails with queries, issues and even feature requests. That’s when they realised they had inadvertently become software developers and maintainers. We heard about the lessons they learnt along the journey, including how valuable it is to include software engineer expertise early on when developing apps, and that prototypes can always become production.
Colin Gillespie (Jumping Rivers)
Securing Shiny Dashboards
Colin started with covering common pitfalls in terms of security with Shiny apps like SQL injection attacks and hard coded secrets included in a repository where he comically pointed out some of things you can actually find on github. He introduced our Shiny Health Check service where we will access your app and help improve aspects like security, code structure and version control workflows. Colin finished his talk with various policies that can be implemented to improve general web security.
Tan Ho (Zelus Analytics)
Effective Logging for Shiny
Tan spoke about his troubles with logs being difficult to find and not necessarily useful, and his subsequent journey to find a better solution. He went into the philosophy of logging and why humans and machines will need different kinds of logs. Breaking it down to the lowest level of “What are we trying to find out from the logs?”. Tan also covered all the options for logging at package level vs logging in production Shiny apps.
Anna Skrzydło (Appsilon)
3 reasons why nobody uses your app
Anna Skrzydło gave a relatable story of “Three reasons why users don’t use your app”. Spoiler alert: the main reasons are:
- They don’t think they need your app
- They can’t use the app
- They don’t trust the app
When users don’t think they need your app, it’s possible you haven’t solved their problem. Anna suggested using user interviews, pro-typing and user personas to identify the core of the problem. If the user is struggling to use the app correctly, you can use usability heuristics to improve the user experience, rather than just offering training. Finally, if the user doesn’t trust your app, fix bugs quickly and communicate clearly when changes are coming, giving users time to prepare.
Keynote: Cara Thompson (Freelance Data Consultant)
Dynamic annotations: tips and tricks to make text shine without stealing the show
Our closing keynote was from data visualisation expert Cara Thompson. Cara gave us a whirlwind tour of detailed plot styling and taught us how to decrease reliance on text by a worked example on the Great British Bake Off data set. We had plenty of “Aha” moments watching the plot evolve from a plain {ggplot2} graphic to something that told a real story. Key takeaways were to write the text in the order you speak it, and use text hierarchy to present your story in an organised way. You can read all of Cara’s top tips in her slides.
What happens next?
We want to say thank you to the sponsors of the event for your support in making it possible!
Thanks also to our speakers for their incredibly insightful presentations and workshops, and of course to all our attendees who travelled from near and far to make Shiny in Production such a memorable event! The talk recordings will be released on our YouTube channel in the coming weeks, so keep your eyes peeled for that!
We had such a great time running the Shiny in Production conference, that we’re planning on doing it all again next year! Shiny in Production 2024 will be taking place on 9th & 10th October 2024 – Super Early Bird tickets are available now – Look out for more details coming soon!
Can’t wait that long? We’ll be hosting SatRdays London 2024 on April 27th, in collaboration with CUSP London. More details will be announced in an upcoming blog!
Gold sponsor
Silver sponsor with drinks reception
Silver Sponsors
For updates and revisions to this article, see the original post
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.