Template:Country: Difference between revisions

From DFO – Flood Observatory
No edit summary
No edit summary
 
(16 intermediate revisions by the same user not shown)
Line 32: Line 32:
}}
}}
</noinclude><includeonly>
</noinclude><includeonly>
'''{{{Country}}}'''
={{{Country}}}=


* Region: {{{RegionName}}} ({{{RegionCode}}})
* Region: {{{RegionName}}} ({{{RegionCode}}})
Line 41: Line 41:
* ISO-3: {{{ISO3}}}
* ISO-3: {{{ISO3}}}


=Recorded floods for {{{Country}}}=
Total number of flood events: {{#cargo_query:
tables=FloodReports
|fields = COUNT(_pageName)
|where=Country HOLDS '{{PAGENAME}}'
| format = plain
}}'''
{{#ifeq: {{{Country|}}} | United States of America
| <!-- THEN -->
{{#cargo_query:
tables=FloodReports
|fields=
    CONCAT_WS('','[[',_pageName, '|', ReportNumber, ']]')=﹟,
    GlideNumber=Glide ﹟,
    BeginDate=Start Date,
    EndDate=End Date,
    Country=Country,
    OtherCountry=Additional Countries,
    SubdivisionName=State,
    FORMAT(Area,0)=Area (km²),
    Source=Source,
    MainCause=Main Cause,
    NumberOfFatalities=Fatalities,
    NumberOfDisplaced=Displaced,
    Severity=Severity,
    FORMAT(FloodImpactIndex,1)=Flood impact index
|where=Country HOLDS '{{PAGENAME}}'
|hidden fields=Glide ﹟,Source
|order by=Start Date DESC
|limit=6000
|rows per page=25
|link=ReportNumber
|format=dynamic table
|default=No flood reports found for this country.
}}
| <!-- ELSE -->
{{#cargo_query:
{{#cargo_query:
tables=FloodEvents
tables=FloodReports
|fields=EventID, StartDate, EndDate, Severity, _pageName=Record
|fields=
|where=Country='{{PAGENAME}}'
    CONCAT_WS('','[[',_pageName, '|', ReportNumber, ']]')=﹟,
|order by=StartDate DESC
    GlideNumber=Glide ﹟,
|limit=500
    BeginDate=Start Date,
    EndDate=End Date,
    Country=Country,
    FORMAT(Area,0)=Area (km²),
    Source=Source,
    MainCause=Main Cause,
    NumberOfFatalities=Fatalities,
    NumberOfDisplaced=Displaced,
    Severity=Severity,
    FORMAT(FloodImpactIndex,1)=Flood impact index
|where=Country HOLDS '{{PAGENAME}}'
|hidden fields=Glide ﹟,Source
|order by=Start Date DESC
|limit=6000
|rows per page=25
|link=ReportNumber
|format=dynamic table
|default=No flood reports found for this country.
}}
}}
}}


[[Category:Countries]]
[[Category:Countries]]

Latest revision as of 13:52, 13 February 2026

This is the "Country" template. It should be called in the following format:

{{Country:
 | Country=
 | RegionCode=
 | RegionName=
 | SubregionCode=
 | SubregionName=
 | IntermediateRegionCode=
 | IntermediateRegionName=
 | M49=
 | ISO2=
 | ISO3=

}}

This template defines the table "Countries". View table.