Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions climada/entity/impact_funcs/trop_cyclone.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"NAM", "NER", "NGA", "NLD", "NOR", "POL", "PRK", "PRT", "PSE", "REU", "ROU",
"RUS", "RWA", "SDN", "SEN", "SGP", "SGS", "SJM", "SLE", "SMR", "SPM", "SRB",
"SSD", "STP", "SVK", "SVN", "SWE", "SYC", "TCD", "TGO", "TUN", "TUR", "UKR",
"UMI", "VAT", "XKX", "ZMB",
"UMI", "VAT", "XKO", "ZMB",
],
}

Expand Down Expand Up @@ -365,8 +365,18 @@

@staticmethod
def get_countries_per_region(region=None):
"""Returns dictionaries with numerical (numeric) and alphabetical (alpha3) ISO3 codes
of all countries associated to a calibration region.
"""Returns countries within a tropical cyclone calibration region and associated impact functions.

Check warning on line 368 in climada/entity/impact_funcs/trop_cyclone.py

View check run for this annotation

Jenkins - WCR / Pylint

line-too-long

LOW: Line too long (106/100)
Raw output
Used when a line is longer than a given number of characters.
Comment thread
spjuhel marked this conversation as resolved.
Outdated

This method returns a tuple with numerical (numeric) and alphabetical (alpha3)
ISO3 codes of all countries associated to a calibration region.

If no region or "all" is provided as argument, the method return a tuple of
dictionaries with short name of the tropical cyclone calibration regions as
keys and the values for each of those.

Notes
-----

Only contains countries that were affected by tropical cyclones
between 1980 and 2017 according to EM-DAT.

Expand Down Expand Up @@ -395,9 +405,12 @@
return (
CountryCode.REGION_NAME.value,
CountryCode.IMPF_ID.value,
coordinates.country_to_iso(
CountryCode.ALPHA3.value, representation="numeric"
),
{
reg: coordinates.country_to_iso(
CountryCode.ALPHA3.value[reg], representation="numeric"
)
for reg in CountryCode.REGION_NAME.value
},
CountryCode.ALPHA3.value,
)

Expand Down
Loading