Jump to content

Module:Medical cases data/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Mxn (talk | contribs) at 01:55, 4 June 2020 (Created page with '{{tl|Module rating |alpha}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> T...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

{{Module rating }} This module inserts charts and maps of medical cases related to a pandemic, broken down by subregions.

caseTable

Inserts a table of cases and deaths by region.

Usage: {{#invoke:Medical cases data|caseTable|config=Configuration}}

{{#invoke:Medical cases data|caseTable
|config=San Francisco Bay Area
}}
COVID-19 pandemic medical cases in the San Francisco Bay Area by county
CountiesCases[a]Recov.[b]DeathsPop. (2019)C/1MRef.
91,940,40411,2657,739,378250,718
Santa Clara530,920?3,2261,927,852275,395d c[1]
Alameda[c]400,532?2,5101,671,329239,649d c[2]
Contra Costa302,824300,6661,6011,153,526262,520d c[3]
San Francisco203,788?1,392881,549231,170d c[4]
San Mateo184,001?946766,573240,031d c[5]
Sonoma119,749118,903668494,336242,242d c[6]
Solano118,904118,073441447,643265,622d c[7]
Marin44,6507,030274258,826172,510d c[8]
Napa35,03627,672207137,744254,356d c[9]
  1. ^ Cumulative cases reported by each county's health department. Cases reported are those of county residents, including those who tested positive elsewhere in California.
  2. ^ Counties differ in what they consider to be a recovery.
  3. ^ Including cases in the City of Berkeley, which are reported by the Berkeley Public Health Division.

map

Inserts a map of cases and deaths by region.

Usage: {{#invoke:Medical cases data|map|config=Configuration|frameWidth=Frame width in pixels|frameHeight=Frame height in pixels|caption=Caption as wikitext}}

{{#invoke:Medical cases data|map
|config=San Francisco Bay Area
|frameHeight=300
}}

Configuration

return {
	caption = "Cases by county", -- Table or map caption as wikitext
	outbreakItem = "Q94050008", -- QID of the Wikidata item representing the 
	regionTerm = "Counties", -- Term for each region, used as the first column's header
	regionNamePattern = "(.+) County", -- Naming pattern for regions, applied to each region's item's label to display a short name in first column; see [[mw:Extension:Scribunto/Lua reference manual#Patterns]]
	populationDate = "2020-01-01", -- Date of the population figures used to calculate per-capita infection rates
	columnsByRegion = {
		-- Set each region's QID or each region's outbreak's QID to a table that specifies the relevant column names of the tabular data for each region.
		Q107146 = {
			cases = "CumulativeConfirmedCases", -- "cases" by default
			cases2 = "UndatedCases", -- (Optional) A second column to add to the case count
			recoveries = "CumulativeRecoveredPatients", -- (Optional)
			deaths = "CumulativeDeaths", -- "deaths" by default
		},
	},
	notesByRegion = {
		-- Set each region's QID or each region's outbreak's QID to an optional footnote as wikitext
		Q107146 = "Including cases in the City of Berkeley.",
	},
	columnNotes = {
		cases = "Cumulative cases reported by each county's health department.", -- (Optional) Footnote for the "Cases" column as wikitext
		recoveries = "Counties differ in what they consider to be a recovery.", -- (Optional) Footnote for the "Recoveries" column as wikitext
		deaths = "Includes suspected cases.", -- (Optional) Footnote for the "Deaths" column as wikitext
	}
}

Available configurations