About AHS Heatmaps
The Purpose
The purpose of this application is to provide live temperature and carbon dioxide data in an easy-to-understand format. Various sensors across the school are read, their data is compiled, and interactive maps are generated. The maps on the site are regenerated by the server and updated every 5 minutes.
How It Works
The application is written in Python. The application first requests data from a server connected to the various sensors placed around the school by Energize Andover. It then iterates through a supplied folder of maps in SVG format, with one file/image per floor. Each file is converted into various alternate formats, using inkscape's command-line tool. Various python libraries are utilized to detect text in the converted files, and extract both the text and its pixel location in the image. Finally, OpenCV, an open-source computer vision library, to find rooms around these coordinates, and extract the location and dimensions of their rectangular shapes. Finally, all this information is combined with the original data to create a new, colored map. Custom JavaScript code makes these maps interactive. You can learn more about this project and find a more in-depth explanation on my website.
Interpretation
To properly interpret the data supplied by this application, use the following as a guide:
- The rooms' colors range from light blue to red, assigned as follows:
- Pure light blue is given to any room with a temperature of at most 60°F, or carbon dioxide levels of at most 100 parts per million (PPM). This signals unusually cold temperatures, which may cause problems for students and faculty and may signify problems with the heating system, or unusually low CO2 levels, which is not problematic.
- Pure green is given to any room with a temperature of 70°F, or carbon dioxide levels of 900 PPM. This signals normal temperatures or normal CO2 levels, neither of which is not problematic.
- Pure Red is given to any room with a temperature of at least 80°F, or carbon dioxide levels of at least 2000 PPM. This signals unusually high temperatures or CO2 levels, both of which can be dangerous to students and faculty and could signify problems with the room's ventilation.
- Consistent, unbelievably high or low sensor readings for a particular room likely indicate a broken sensor. Please report any such problematic rooms by emailing energizeandover@gmail.com.
A sample map may be seen below:

History
This application was made by Daniel Ivanovich as an independent project for the Energize Andover Program between the fall of 2018 and the fall of 2019.