diff options
author | Naeem Model <me@nmode.ca> | 2024-05-09 20:22:45 +0000 |
---|---|---|
committer | Naeem Model <me@nmode.ca> | 2024-05-09 20:22:45 +0000 |
commit | dce01ac19a0298388089ce4297a44ef2aa2c4c46 (patch) | |
tree | 1dbc74e9f7e9139f14a517b33a0e3c82c6e04dd0 /inst/app/templates/content/estimators/add-estimators/parameters | |
parent | e06a56581d43cb3c59d51b9b39e6d0fb36efe31c (diff) |
Revamp Shiny app
Diffstat (limited to 'inst/app/templates/content/estimators/add-estimators/parameters')
4 files changed, 63 insertions, 0 deletions
diff --git a/inst/app/templates/content/estimators/add-estimators/parameters/id.html b/inst/app/templates/content/estimators/add-estimators/parameters/id.html new file mode 100644 index 0000000..a3159ca --- /dev/null +++ b/inst/app/templates/content/estimators/add-estimators/parameters/id.html @@ -0,0 +1 @@ +{{ htmlTemplate("templates/content/estimators/add-estimators/components/mu.html", id = "id") }} diff --git a/inst/app/templates/content/estimators/add-estimators/parameters/idea.html b/inst/app/templates/content/estimators/add-estimators/parameters/idea.html new file mode 100644 index 0000000..379be84 --- /dev/null +++ b/inst/app/templates/content/estimators/add-estimators/parameters/idea.html @@ -0,0 +1 @@ +{{ htmlTemplate("templates/content/estimators/add-estimators/components/mu.html", id = "idea") }} diff --git a/inst/app/templates/content/estimators/add-estimators/parameters/seq_bayes.html b/inst/app/templates/content/estimators/add-estimators/parameters/seq_bayes.html new file mode 100644 index 0000000..bcc82b7 --- /dev/null +++ b/inst/app/templates/content/estimators/add-estimators/parameters/seq_bayes.html @@ -0,0 +1,22 @@ +<div class="row"> + <!-- Serial interval (mu). --> + <div class="col-md"> + {{ htmlTemplate("templates/content/estimators/add-estimators/components/mu.html", id = "seq_bayes") }} + </div> + <!-- Maximum value of the uniform prior (kappa). --> + <div class="col-md mt-2 mt-md-0"> + <!-- Label and help tooltip. --> + <label class="form-label" for="kappa"> + Maximum prior (κ) + <sup data-bs-toggle="tooltip" data-bs-placement="right" data-bs-html="true" + data-bs-title="The initial maximum belief of <em>R<sub>0</sub></em>. The higher this value, the higher + <em>R<sub>0</sub></em> is believed to be prior to the estimation."> + [?] + </sup> + </label> + <!-- Input field. --> + <input name="kappa" class="form-control" type="text" placeholder="Default: 20"> + <!-- Warning text for incorrect values. --> + <small id="kappa_warn" class="form-text text-primary shiny-text-output"></small> + </div> +</div> diff --git a/inst/app/templates/content/estimators/add-estimators/parameters/wp.html b/inst/app/templates/content/estimators/add-estimators/parameters/wp.html new file mode 100644 index 0000000..b789a23 --- /dev/null +++ b/inst/app/templates/content/estimators/add-estimators/parameters/wp.html @@ -0,0 +1,39 @@ +<!-- Radio buttons to specify whether the serial interval is known. --> +<label class="form-label" for="wp_mu_known">Is the serial interval known?</label> +<div class="shiny-input-radiogroup" id="wp_mu_known"> + <div class="form-check form-check-inline"> + <label class="form-check-label"> + <input type="radio" class="form-check-input me-2" name="wp_mu_known" value="Yes" checked>Yes + </label> + </div> + <div class="form-check form-check-inline"> + <label class="form-check-label"> + <input type="radio" class="form-check-input me-2" name="wp_mu_known" value="No">No + </label> + </div> +</div> +<!-- Show the input field for the serial interval if it is known. --> +<div data-display-if="input.wp_mu_known == 'Yes'" class="mt-2 mt-md-0"> + {{ htmlTemplate("templates/content/estimators/add-estimators/components/mu.html", id = "wp") }} +</div> +<!-- Show the input fields for the grid search parameters if the serial interval is unknown. --> +<div data-display-if="input.wp_mu_known == 'No'" class="row"> + <!-- Grid length. --> + <div class="col-md mt-2 mt-md-0"> + <label class="form-label" for="grid_length">Grid length</label> + <input name="grid_length" class="form-control" type="text" placeholder="Default: 100"> + <small id="grid_length_warn" class="form-text text-primary shiny-text-output"></small> + </div> + <!-- Maximum shape. --> + <div class="col-md mt-2 mt-md-0"> + <label class="form-label" for="max_shape">Maximum shape</label> + <input name="max_shape" class="form-control" type="text" placeholder="Default: 10"> + <small id="max_shape_warn" class="form-text text-primary shiny-text-output"></small> + </div> + <!-- Grid length. --> + <div class="col-md mt-2 mt-md-0"> + <label class="form-label" for="max_scale">Maximum scale</label> + <input name="max_scale" class="form-control" type="text" placeholder="Default: 10"> + <small id="max_scale_warn" class="form-text text-primary shiny-text-output"></small> + </div> +</div> |