{"id":13304394,"url":"https://github.com/The-Strategy-Unit/experiencesdashboard","last_synced_at":"2025-03-10T13:31:21.525Z","repository":{"id":43278542,"uuid":"329648292","full_name":"The-Strategy-Unit/experiencesdashboard","owner":"The-Strategy-Unit","description":"Shiny dashboard visualising and analysing patient experience data from the NHS England Friends and Family Test (https://www.england.nhs.uk/fft/)","archived":false,"fork":false,"pushed_at":"2023-11-28T13:33:17.000Z","size":33907,"stargazers_count":8,"open_issues_count":11,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-04T18:51:44.748Z","etag":null,"topics":["golem","patient-experience","shiny"],"latest_commit_sha":null,"homepage":"https://connect.strategyunitwm.nhs.uk/qdc_public/","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/The-Strategy-Unit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-14T15:00:30.000Z","updated_at":"2024-01-26T11:59:49.000Z","dependencies_parsed_at":"2023-11-28T14:38:41.507Z","dependency_job_id":null,"html_url":"https://github.com/The-Strategy-Unit/experiencesdashboard","commit_stats":null,"previous_names":["the-strategy-unit/experiencesdashboard","cdu-data-science-team/experiencesdashboard"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Strategy-Unit%2Fexperiencesdashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Strategy-Unit%2Fexperiencesdashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Strategy-Unit%2Fexperiencesdashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Strategy-Unit%2Fexperiencesdashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-Strategy-Unit","download_url":"https://codeload.github.com/The-Strategy-Unit/experiencesdashboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242859565,"owners_count":20196965,"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":["golem","patient-experience","shiny"],"created_at":"2024-07-29T17:52:36.585Z","updated_at":"2025-03-10T13:31:18.766Z","avatar_url":"https://github.com/The-Strategy-Unit.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n# experiencesdashboard\n\n\u003c!-- badges: start --\u003e\n\n[![Lifecycle:\nexperimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)\n\u003c!-- badges: end --\u003e\n\n## About\n\nThis read me is based on version [0.7.2](https://github.com/CDU-data-science-team/experiencesdashboard/tree/0.7.2)\n\nThe Experience dashboard is the front end tool (Shiny App) for the [Patient Experience Qualitative Data Categorisation project](https://cdu-data-science-team.github.io/PatientExperience-QDC/), funded by NHS England and hosted by Nottinghamshire Healthcare NHS Foundation Trust. It ties a machine learning back-end, the [Pxtextmining](https://cdu-data-science-team.github.io/pxtextmining/reference/API/API/), to the data source via an API and present metrics and graphs to help clinical staffs and managers quickly gain insight from patient experience data collected via the [NHS England Friends and Family Test](https://www.england.nhs.uk/fft/).\n\n[Link to hosted version](https://connect.strategyunitwm.nhs.uk/qdc_public/). Please note that some of the data has been modified for the purposes of\ndemonstration so it should NOT be used for reporting and is not accurate\nin several important ways.\n\n### Folder Stucture\n\nThis shiny app is built using [golem](https://engineering-shiny.org/golem.html#golem) and follows the advised [folder structure](https://engineering-shiny.org/golem.html#understanding-golem-app-structure). Because a golem application is an R package, this package incorporates all the benefits that comes with R package development and management process. \n\nBelow is the folder structure and general description of the content of each important folder.\n\n``` r\nfs::dir_tree(recurse = 0)\n```\n\n```\nexperiencesdashboard\n├── .github/workflows\n├── LICENSE\n├── LICENSE.md\n├── NEWS.md\n├── README.md\n├── CODE_OF_CONDUCT.md\n├── app.R\n├── DESCRIPTION\n├── NAMESPACE\n├── vignettes/\n├── R/\n├── dev/\n├── inst/\n├── tests/\n├── data/\n├── data-raw/\n├── man/\n└── rsconnect/\n```\n\n------\n\n| Name | Link | Description |\n| ---- | ---- | ----------- |\n| .github/workflows | [[Link](/.github/workflows)]  | Github Action workflow files that automate the `R CMD check` and `deployment` process |\n| app.R | [[Link](.)]  | A `golem` file that contains the set of functions needed to deploy the app on any platform such as Posit Connect, etc |\n| DESCRIPTION | [[Link](.)]  | A standard `R` package file containing series of metadata about the package including the package dependencies required to run the app. It forms a key part of the dependency management |\n| NAMESPACE | [[Link](.)]  | A standard `R` package file that contains functions to import and from which package and what functions to export |\n| R/ | [[Link](R/)]  | Standard `R` package folder holding all the package functions. It contains the functions required for the app core functionality such as the Server function `app_server.R`, UI function `app_ui.R`, all the modules `mod_*` files and utilitarian/business logic functions `fct_*.R` or `*utils*.R`/ or other `.R` files. It also contains an important file, `run_app.R`, which in turn contains the [`run_app()`](R/run_app.R) function that is called to launch the app |\n| dev/ | [[Link](dev/)]  | This folder contains utilitarian files used during development phase only and not core functionalities of the app.  |\n| inst/ | [[Link](inst)]  | It contains the [`golem-config.yml`](inst/golem-config.yml) file and [`inst/app/www/`](inst/app/www/) files. [`inst/app/www/`](inst/app/www/) contains all files that are made available at application run time, while [`golem-config.yml`](inst/golem-config.yml) is an important yaml file to configure the app. |\n| test/ | [[Link](tests/)]  | This folder contains the codes for the unit test infrastructure |\n| data/ | [[Link](data/)]  | Contains `.rda` data used by the app during runtime |\n| data-raw/ | [[Link](data-raw/)]  | It contains scripts to prepare dataset in the `data` folder. We also store some data in there that are not required at runtime |\n| man/ | [[Link](man/)]  | This is a standard `R` package folder containing automatically filled files for function documentations |\n| rsconnect/ | [[Link](rsconnect/)]  |  Contains posit connect deployment files |\n\n### Built With\n\n- [golem](https://github.com/ThinkR-open/golem)\n- [R](https://www.r-project.org/)\n- [GitHub Actions](https://github.com/features/actions)\n- [pxtextmining API](https://cdu-data-science-team.github.io/pxtextmining/reference/API/API/)\n\n## Using this Solution\n\nThe implementation you will follow will depend on your use case and if you have access to the project database (for internal users).\n\n### A. Installation: \n\nFollow this approach if you have the right access to this project database\n\n#### Install the package\n\n{experiencesdashboard} is not currently on CRAN, so you will have to install it directly from Github.\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"CDU-data-science-team/experiencesdashboard\")\n```\n\n#### Run the app \n``` r\nlibrary(experiencesdashboard) # load the package\n# usethis::edit_r_environ() # add the environment variables to connect to the database. see `get_pool()`\nSys.setenv(\"R_CONFIG_ACTIVE\" = \"my_config\") # set the configuration to use inline with the `golem-config.yml` file\nrun_app() # run the app\n```\n\n### B. Local Implementation with your own data\n\nThis package uses data from a database to populate the dashboard. The [`get_pool()`](R/fct_app_server-helpers.R) set up the DB connection. To use this package locally and on your own dataset, you will need to do the following:\n\n1. Clone the repo. [cloning-a-repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)\n\n2. Connect your data either  \n    a. _**Via Database Connection**_: Set the environmental variables needed to establish a Database connection (see [`get_pool()`](R/fct_app_server-helpers.R))\n   \n    b. _**Via Local file**_: Read in your data into the `db_data` object in the [`app_server.R`](R/app_server.R) by replacing `db_data \u003c- get_db_data(pool, get_golem_config(\"trust_name\")))` with e.g. `db_data \u003c- read.csv(''my_data_path.csv)`. With this you can safely ignore the preceding codes that creates the db connection.\n\n4. Set up your data/app configuration: If you need to use this app locally, then you will need to set up a configuration for your use case in the [`golem-config.yml`](inst/golem-config.yml) ([get help here](https://engineering-shiny.org/golem.html#golem-config))\n\n5. choose your configuration: run `Sys.setenv(\"R_CONFIG_ACTIVE\" = \"my_config\")` and run the app with `run_app()`. please see sample code in the [`run_dev.R`](dev/run_dev.R)\n\n\n#### Format your data for the app\n\nYour data type must follow the schema in [Database table schema](data-raw/phase_2_schema.csv) before you can load the data into the app in step 2 above. Though not all the columns are required but to ignore any will depend on your configuration in step 3 above. \n\n  i. You can safely ignore these columns without any modification:  `'extra_variable_1', 'extra_variable_2', 'extra_variable_3'`\n  \n  ii. To ignore the following columns `\n   'location_2', 'location_3', 'sex', 'gender', 'age', 'ethnicity', 'sexuality', 'disability', 'religion'`, You need to set your configuration file accordingly. A sample configuation is this:\n   \n  ```\n  my_config:\n    trust_name: my_config\n    comment_1: Why did you answer this way?\n    comment_2: What could be improved?\n    question_1: fft\n    location_1: Division\n  ```\nPlease [get in touch](mailto:chris.beeley@gmail.com) if you need additional help implementing this solution locally.\n\n## Code of Conduct\n\nPlease note that the experiencesdashboard project is released with a\n[Contributor Code of\nConduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).\nBy contributing to this project, you agree to abide by its terms.\n\n## License\n\nDistributed under a MIT License. _See [LICENSE.md](/LICENSE.md) for more information._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThe-Strategy-Unit%2Fexperiencesdashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThe-Strategy-Unit%2Fexperiencesdashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThe-Strategy-Unit%2Fexperiencesdashboard/lists"}