{"id":13707884,"url":"https://github.com/ijlyttle/shinypod","last_synced_at":"2025-08-25T20:11:42.520Z","repository":{"id":72603114,"uuid":"49367937","full_name":"ijlyttle/shinypod","owner":"ijlyttle","description":"Implementation of shiny modules","archived":false,"fork":false,"pushed_at":"2017-10-09T13:08:39.000Z","size":666,"stargazers_count":42,"open_issues_count":8,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-15T11:48:12.963Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ijlyttle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-01-10T13:30:48.000Z","updated_at":"2024-02-06T13:55:30.000Z","dependencies_parsed_at":"2023-06-05T02:15:36.188Z","dependency_job_id":null,"html_url":"https://github.com/ijlyttle/shinypod","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijlyttle%2Fshinypod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijlyttle%2Fshinypod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijlyttle%2Fshinypod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ijlyttle%2Fshinypod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ijlyttle","download_url":"https://codeload.github.com/ijlyttle/shinypod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240427195,"owners_count":19799466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T22:01:46.915Z","updated_at":"2025-02-24T05:43:23.537Z","avatar_url":"https://github.com/ijlyttle.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# shinypod 0.0.99\n\nAs you write more-and-more shiny apps and they become more-and-more complex, you may notice a couple of things:\n\n1. Among different apps, you may be doing the same things over and over again, like uploading and parsing csv files.\n2. Within a given app, your ui and server functions may become difficult to manage as inputs, outputs, and reactives pile up.\n\nAdressing these problems is the motivation for shiny to [introduce modules](http://shiny.rstudio.com/articles/modules.html).\n\nThe goals of this package are to propose a design framework for shiny modules, and provide some implementations.\n\nSo far, we have reusable modules for:\n\n* uploading and parsing a CSV file into a data-frame (including handling time-zones)\n* configuring a two-y-axes dygraph using a data-frame\n\n## Installation\n\nThis package is not on CRAN; however, it is based on the new CRAN (0.13.0) version of shiny. To install:\n\n```R\ndevtools::install_github(\"ijlyttle/shinypod\")\n```\n\n## Philosophy\n\nFor each module foo, we have fundamental functions: `foo_ui_input()`, `foo_ui_output()`, possibly `foo_ui_misc()`, and `foo_server()`. The fundamental UI functions each return a named `shiny::tagList`; the server function is called by `shiny::callModule`.\n\nFor each module foo, we also have a couple of functions that return ui arrangements for a sidebar layout: `foo_ui_sidebar_side()` and `foo_ui_sidebar_main()`. These functions rely on the fundamental UI functions. \n\nEach of these functions has an associated arguement `id`, which is used to keep orderly the shiny namespace.\n\n## Examples\n\nLet's say you wanted to be able to upload and parse a csv file, and have the dataframe be returned by a reactive function.\n\nWe can write this app using the \"all-in-one\" approach:\n\n```R\nlibrary(\"shiny\")\nlibrary(\"shinyjs\")\nlibrary(\"shinyBS\")\nlibrary(\"shinypod\")\n\napp \u003c- shinyApp(\n  ui = {\n    shinyUI(\n      fluidPage(\n        useShinyjs(),\n        sidebarLayout(\n          sidebarPanel(read_delim_sidebar_side(\"read_csv\")),\n          mainPanel(read_delim_sidebar_main(\"read_csv\"))\n        )\n      )\n    )  \n  },\n  server = {\n    shinyServer(function(input, output, session) {\n    \n      rct_data \u003c- callModule(read_delim_server, id = \"read_csv\")\n    \n      observe(print(rct_data()))\n    })  \n  }\n)\n\nrunApp(app)\n```\n\n## Deployed examples\n\nSome simple shinypod apps deployed at shinyapps:\n\n- [Parse CSV file](https://ijlyttle.shinyapps.io/read_delim/)\n- [Parse CSV file and dygraph](https://ijlyttle.shinyapps.io/read_delim_dygraph/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijlyttle%2Fshinypod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fijlyttle%2Fshinypod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fijlyttle%2Fshinypod/lists"}