build_casecount_display: Add a case count display using 'geo cards' to an app

Description Usage Arguments

View source: R/build.R

Description

Add a case count display using 'geo cards' to an app

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
build_casecount_display(
  app,
  sources,
  name,
  desc,
  ref_source = NULL,
  append_higher_admin_name = FALSE,
  max_date = NULL,
  min_date = NULL,
  geo_links = NULL,
  nrow = 2,
  ncol = 3,
  thumb = FALSE,
  state = NULL,
  views = NULL,
  id = NULL,
  order = 1,
  case_fatality_max = 20,
  require_token = FALSE,
  md_desc = ""
)

Arguments

app

An app object created with register_app().

sources

A list of sources created with source_list().

name

A name for the display, which is displayed in the header of the app when this display is selected.

desc

A description that will be shown under the name.

ref_source

The name of the reference source, which should match one of the source_ids provided in source_entry() when building the source_list().

append_higher_admin_name

If TRUE, will append the higher-level admin name to the geocard headers. For example, if currently creating a display for admin level 2 (e.g. US counties), setting to TRUE will append the state name to the geocard header. So if viewing for Benton County in the state of Washington, the header, instead of being simply being "Benton", will now be "Benton, Washington".

max_date

Optional maximum date to plot. If not specified, will be set to latest date.

min_date

Optional minimum date to plot. If not specified, will be set to 8 weeks prior to max date.

geo_links

Optional object or list of objects created by geo_link_href() or geo_link_filter() that will provide links to other displays (e.g. for a given continent, provide a link in its card that when clicked will open up the display for all countries in that continent).

nrow

Default number of rows to show in the display.

ncol

Default number of columns to show in the display.

thumb

Optional path to an image file (png or jpeg) to use as the thumbnail for the display.

state

Optional initial state (see the state argument of trelliscopejs::trelliscope for more details).

views

Optional pre-specified views to allow the user to choose between. See default_views() for more information.

id

Optional ID passed to trelliscopejs::trelliscope.

order

Integer indicating what order this display should appear in in the display list shown when the app opens.

case_fatality_max

The maximum y-axis limit to allow for case fatality percentage. Passed to geocard::geocard().

require_token

Should a token be required to view the app? Passed to trelliscopejs::trelliscope.

md_desc

Optional longer-form description of the display, provided as a markdown string.


WorldHealthOrganization/casecountapp documentation built on Jan. 22, 2021, 6:36 p.m.