I've found a minor edge case issue. I currently handle it in the calling code, but it would be nice to take care of it in the library.
Currently If pollutant concentration is outside of the lookup table range iaqi() function will crash with IndexError.
This PR fixes it. If the concentration is lower or higher than the range defined in the look up table, the function will return lowest or highest AQI value from the table accordingly.
Please let me know what you think about these changes.
Hi @hrbonz
Thanks for this great library.
I've found a minor edge case issue. I currently handle it in the calling code, but it would be nice to take care of it in the library.
Currently If pollutant concentration is outside of the lookup table range iaqi() function will crash with IndexError.
This PR fixes it. If the concentration is lower or higher than the range defined in the look up table, the function will return lowest or highest AQI value from the table accordingly.
Please let me know what you think about these changes.
Thanks.
Andrii