lair.pollutants.get_pollutant#

lair.pollutants.get_pollutant(name)[source]#

Look up a pollutant by name, case-insensitively.

Parameters:

name (str) – The pollutant, e.g. 'CH4', 'nox', 'PM25'.

Returns:

Pollutant – Its metadata.

Raises:

KeyError – If the pollutant is not in POLLUTANTS.

Return type:

Pollutant

See also

Pollutant

What it returns.

lair.pollutants.POLLUTANTS

Every name it knows.

Examples

A label ignores case, unlike a folder or file name (Spelling a pollutant):

>>> from lair.pollutants import get_pollutant
>>> get_pollutant("nox").name
'NOx'
>>> get_pollutant("PM25").name
'PM2.5'