The Fart Detector is based on a project from the Raspberry Pi Foundation and code from Adeept.
If you want to know more about the chemistry of how a gas sensor works, you can find it here.