{shinylive}: Serverless Shiny Apps | Barret Schloerke | Posit

Ойын-сауық

In the rapidly evolving landscape of web technologies, the integration of R (and Python) with modern web frameworks has become increasingly important for data scientists and developers. This presentation introduces {shinylive}, a new R package that exports Shiny applications to be run within statically hosted websites. We will explore the capabilities of {shinylive} through its use of the innovative R package {webR}, which allows for the execution of R code in the browser (via WebAssembly and service workers) without the need for a centralized server.
The presentation will cover the technical foundation of {shinylive}, including its architecture and the integration process with Quarto documents. We will also discuss the practical aspects and drawbacks of exporting Shiny apps with {shinylive}, highlighting the ease of exporting apps to a folder for local use or hosting them on GitHub pages.
{shinylive} bridges the gap between Shiny and static websites, making it a valuable resource for interactive data analysis and presentation.
Link to app: schloerke.com/presentation-20...
Link to script: github.com/posit-dev/r-shinyl...
Link to use_github_action(): github.com/posit-dev/r-shinyl...
Shinylive website: posit-dev.github.io/r-shinylive/
{webr} docs: docs.r-wasm.org/webr/latest/

Пікірлер: 12

  • @benschneider4830
    @benschneider483020 күн бұрын

    This is such a huge feature for R and open source analysis software. Great work, Posit

  • @hanswurst4728
    @hanswurst472823 күн бұрын

    This is actually huge, much appreciated.

  • @brynhumberstone
    @brynhumberstone22 күн бұрын

    Thanks for making this short overview/demo video - great to see what can be done with shinylive and also how to do it.

  • @marianklose1197
    @marianklose11979 күн бұрын

    This is great!

  • @econmaett
    @econmaett10 күн бұрын

    Thank you for this introductory video 😊

  • @emilyriederer4685
    @emilyriederer46856 күн бұрын

    Great demo! I know last year it was said that Shinylive + Quarto required all app code to be in one cell. For the {shinylive} package can that app directory be arbitrarily complex (e.g. modules in separate subfolders) or does it have to have a specific structure?

  • 22 күн бұрын

    at 8.28 you mention, that Shiny running in the browser can call out to an API with a secret database. But the httr2 package is not supported as I know. Did I miss something?

  • @schloerke

    @schloerke

    22 күн бұрын

    Correct. {httr2} is not supported as {curl} is currently not supported by R-wasm. However, you can make regular URL requests that don't use {curl} (e.g. `readLines()`). While it is not a perfect solution, it does work!

  • @PositPBC

    @PositPBC

    22 күн бұрын

    Correct. You can not use the `{curl}` package in r-wasm and `{httr2}` is based on `{curl}`. However, you can use a `readLines()` approach to access general `GET` urls.

  • @PositPBC

    @PositPBC

    22 күн бұрын

    Example of an app that accesses an external random number generator API: shinylive.io/r/editor/#code=NobwRAdghgtgpmAXGKAHVA6ASmANGAYwHsIAXOMpMAGwEsAjAJykYE8AKAZwAtaJWAlAB0IdJiw71OY4RBEBXWgAIAPAFolqKAHM4AfQBmtatSj1qcdiKVKYLANYATIgHcI7LZ3IAGKxBs2QmAAxMFKWFAQzjBKEPIw9HCMSroQSVCkRIxCIkG41gFBOXJ4BYFgEVFEMXEJSZwpFOnkjkoAbrRQSsDcpKSonIgA9EMuYxjMVTAYWdpDnHAAjvIUBHCcALrsvf2DI2MuE5HRM4xzC8ur68K5YAUCAvn+StK0jkkAkhCo8qR+AUo+D9SB9WgBeJRBSa6PJlJSmRLUJQQoKVXSIWHPGwwPjIpTeJ4AuwADzxAEZvAS4W0oNQVniCOwCUoAEzeWQ2R4FNpJegZWgwAAqcGJpAA8r9gewiJLfqC8VDjtUgrJZCIFowecl1EoDPIIARSLQSOwgb9cEoZf1fgIlCBcs9JtE9PJGEidYw4FBDbQeex7VilE7qnpoXBVBozaQACRhuGeHz-AGQsA7AbDUbjYPTWbzJYrA3rIYAfkxyZTOIgYLyQaVMFDkV0wDJGwtcPKADISdW8LWpg2IE2Wa3IYHO8RqGCyR2DFk7KQwahTHwO4womC0i4ioGOUoAL5qx11vQ06gND1en1+gMA0-njSeqCOAAyfHW7GzLrd7Ae1NpnAKA8HRsK1gVjOsIyDCh3kYAAFRg+D+G8Ak-O8f0A2Q9wdHg+FYABBdB2EUPFFAtDUtTxciklkMA9w2IA

  • 22 күн бұрын

    @@PositPBC Thanks!

  • @nirajjuneja7149
    @nirajjuneja714921 күн бұрын

    can we do this with shinylive python

Келесі