{"id":26483997,"url":"https://github.com/the-strategy-unit/nhp_inputs","last_synced_at":"2026-01-29T14:14:41.185Z","repository":{"id":281889075,"uuid":"527582445","full_name":"The-Strategy-Unit/nhp_inputs","owner":"The-Strategy-Unit","description":"Shiny app: input parameters for the New Hospital Programme (NHP) demand model","archived":false,"fork":false,"pushed_at":"2026-01-22T21:09:32.000Z","size":3812,"stargazers_count":1,"open_issues_count":61,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-23T09:16:17.260Z","etag":null,"topics":["new-hospital-programme","nhp-core","nhp-operational"],"latest_commit_sha":null,"homepage":"https://connect.strategyunitwm.nhs.uk/nhp/inputs/","language":"R","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.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-22T13:42:22.000Z","updated_at":"2026-01-07T11:59:23.000Z","dependencies_parsed_at":"2025-12-15T23:10:39.268Z","dependency_job_id":null,"html_url":"https://github.com/The-Strategy-Unit/nhp_inputs","commit_stats":null,"previous_names":["the-strategy-unit/nhp_inputs"],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/The-Strategy-Unit/nhp_inputs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Strategy-Unit%2Fnhp_inputs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Strategy-Unit%2Fnhp_inputs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Strategy-Unit%2Fnhp_inputs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Strategy-Unit%2Fnhp_inputs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-Strategy-Unit","download_url":"https://codeload.github.com/The-Strategy-Unit/nhp_inputs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Strategy-Unit%2Fnhp_inputs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28879150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["new-hospital-programme","nhp-core","nhp-operational"],"created_at":"2025-03-20T04:59:26.051Z","updated_at":"2026-01-29T14:14:41.156Z","avatar_url":"https://github.com/The-Strategy-Unit.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n# NHP Inputs\n\n\u003c!-- badges: start --\u003e\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![check](https://github.com/The-Strategy-Unit/nhp_inputs/actions/workflows/check.yaml/badge.svg)](https://github.com/The-Strategy-Unit/nhp_inputs/actions/workflows/check.yaml)\n\u003c!-- badges: end --\u003e\n\n## About\n\nA web app to input the parameters needed to run scenarios through the New Hospital Programme (NHP) demand model.\n\nThe app is [deployed to Posit Connect](https://connect.strategyunitwm.nhs.uk/nhp/inputs/).\nYou must have an account and sufficient permissions to view it.\n\nResults can then be viewed in [the outputs app](https://connect.strategyunitwm.nhs.uk/nhp/outputs/), which is generated from the [nhp_outputs](https://github.com/The-Strategy-Unit/nhp_outputs) repository.\n\nYou can find more information on [the NHP model project information site](https://connect.strategyunitwm.nhs.uk/nhp/project_information/), including [a diagram](https://connect.strategyunitwm.nhs.uk/nhp/project_information/project_plan_and_summary/components-overview.html) of how the components of the modelling process fit together.\n\n## For developers\n\nThe app is built and maintained by members of [the Strategy Unit's Data Science team](https://the-strategy-unit.github.io/data_science/).\n\n### Structure\n\nTechnically there are two apps: the main app in the `main` branch, and the inputs selection app (where users start or edit a scenario) in the `inputs_selection_app` branch.\nUsers arrive at the selection app before being routed to the main app. \n\nBoth apps are built with [Shiny](https://shiny.posit.co/) and the main app uses the [the {golem} package](https://thinkr-open.github.io/golem/). Server and UI modules can be found in `R/`, configuration in `inst/golem-config.yml` and supporting data and text in `inst/app/`.\n\nPackages used in the app are listed in `DESCRIPTION`, and can be installed with `devtools::install_deps(dependencies = TRUE)`.\n\n### Run locally\n\nRun the app locally on your machine to test that your changes work as expected.\n\nTo prepare, add an `.Renviron` file to the project root that contains the required environment variables. There is an `.Renviron.example` file which describes the required variables.\nYou can get these from a member of the Data Science team.\n\nThen, from the `main` branch (or your development branch of it), use Git's `worktree` function to put the `inputs_selection_app` branch (or your development branch of it) in its own subfolder. \n\nIn the terminal:\n\n```\ngit fetch origin inputs_selection_app\ngit worktree add inputs_selection_app inputs_selection_app\n```\n\nIf you want a development version of the inputs selection app, you can specify the branch name as the second of the arguments to `git worktree add`.\n\nTo run the app from RStudio, start up the selection app by opening the `dev/watch.R` script, go to the 'Background Jobs' tab of the console pane and click the 'Start Background Job' button.\nIn the 'Run Script as Background Job' dialog box select the project root as the 'Working Directory', then hit 'Start'.\nWhen ready, the app will tell you to visit `http://127.0.0.1:9081/` in your browser.\n\nNote that your selections in the app remain local to you and the resulting json file of parameters for your scenario will live in your local `params/development/` directory.\nThese scenarios will be selectable and editable in future from your locally-run inputs selection app.\n\nIf you need to remove the selection-app folder at any point, you can terminate the background job (if running) and in the terminal run:\n\n```\ngit worktree remove inputs_selection_app\n```\n\n### Test in dev\n\nDuring pre-release QA we test both apps on the server.\nThis helps us spot any issues that are server-specific and might be overlooked if running the apps locally.\n\nTo test the unreleased app in our development environment:\n\n1. Merge any PRs you want to test into the `main` branch.\n2. If you've changed any dependencies, run `dev/generate_manifest.R` to update `manifest.json`.\n3. If you've made any changes to the inputs selection app, run the manual `deploy()` call under the 'development' heading in the `deploy.R` script in your selection app development branch.\n\nWhen using the dev inputs selection app on Connect, make sure to set the 'Model Version' dropdown to 'dev' in the expandable 'Advanced Options' box.\nThat way you'll be taken to the dev inputs app when you hit 'Start'.\n\n### Data extraction\n\nThe app displays trust-specific data to users.\nThe data is processed via Databricks scripts in [the nhp_data repository](https://github.com/The-Strategy-Unit/nhp_data) and stored in Azure storage.\n\n### Deployment\n\nDeployment is controlled by GitHub Actions, where:\n\n* pushes to the `main` branch redeploy the app to /nhp/dev/inputs/ for purposes of quality assurance\n* tagged releases trigger a new deployment to /nhp/vX-Y/inputs/, where 'vX-Y' is the current version (note the hyphen)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-strategy-unit%2Fnhp_inputs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-strategy-unit%2Fnhp_inputs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-strategy-unit%2Fnhp_inputs/lists"}