https://github.com/jnolis/ggirl-examples
Examples of the components of ggirl
https://github.com/jnolis/ggirl-examples
Last synced: 5 months ago
JSON representation
Examples of the components of ggirl
- Host: GitHub
- URL: https://github.com/jnolis/ggirl-examples
- Owner: jnolis
- Created: 2021-04-18T16:14:10.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-09T05:56:07.000Z (over 2 years ago)
- Last Synced: 2024-08-13T07:11:14.155Z (8 months ago)
- Language: R
- Size: 16.6 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - jnolis/ggirl-examples - Examples of the components of ggirl (R)
README
# ggirl-examples
This repo gives small working examples of the systems that power [{ggirl}](https://github.com/jnolis/ggirl). Note that these are just the examples
of code--for a more holistic overview check out my 45-minute [NY R Hackers talk](https://www.youtube.com/watch?v=tTgRhJ6lb4w) that goes into lots of detail
on ggirl.Examples:
* __stripe-order__ - a Shiny app that lets the user make an order through Stripe.
* __stripe-fulfillment__ - a Shiny app that listens for the Stripe webhook to fulfill a paid order. Note that this should probably be a plumber API but it's done via Shiny in ggirl.
You could change to to plumber by making it a POST endpoint. For a general overview of
running background processes in Shiny check out my [blog post](https://jnolis.com/blog/shiny_background_processes/).
* __shiny-upload__ - the ability to have an R function push data to a separate Shiny app. This provides three separate solutions. Note that it's often better to do this as a plumber API, but
somtimes you might want to use Shiny anyway. The methods are:
* Add a HTTP request handler to Shiny (first shown by [Garrick Aden-Buie](https://gist.github.com/gadenbuie/c19cf997467930729ec9acaf98a150fb)).
* Add the POST handling to the UI function of Shiny (first shown by [Joe Cheng](https://gist.github.com/jcheng5/2aaff19e67079840350d08361fe7fb20)).
* Use the [{brochure}](https://github.com/ColinFay/brochure) package by Colin Fay.### Setup
To use the Stripe examples you will need to have a Stripe account. Once you do fill out the `stripe_creds_template.json` file with the test API keys (or prod!). Then rename the file as `stripe_creds.json`. The R project includes an renv file so you can install the right packages.