Building Energy Boot Camp 2018 - Day 2
Today began with an introduction to MAC addresses and how every device will have a MAC address. This was brought up because we later began a discussion of BACnet and a bit of the hardware involved in the collection of data. BACnet and MAC addresses are used in Andover Public Schools’ (APS) network, allowing the transfer of information. You can see a diagram of the network below. We also discussed HTTP requests and BACnet responses, which we use in our buildingEnergyAPI to retrieve data from our data server, and examined samples of both of these. Learning how to construct an HTTP request is important when working with our network, as it allows us to get the information we want. Finally, we discussed ideas for dashboards in which we can display energy usage statistics in an appealing way.
Afterwards, we practiced using pandas and our analytic tools by writing a script to list the classrooms that have, on average, CO2 levels of at least 1,000 PPM during school hours (8:00 AM - 3:30 PM). We used the analytic tools to create a CSV with the data we need (2018 - AHS CO2 (0800-1530).csv), and then I wrote the following script, HighCO2.py, to analyze the data and output the results:
""" # # File: HighCO2.py # Author: danIv (Daniel Ivanovich) # Created: 07/24/2018 # Description: Finds rooms with average CO2 levels of at least 1000 ppm during school hours. # """ import pandas as pd FILE = '2018 Q1Q2 - AHS CO2 (0800-1530).csv' high_co2_rooms =  def print_results(): print("Now listing the %s rooms with average CO2 levels above 1000 ppm:\n" % len(high_co2_rooms)) for room in high_co2_rooms: print(room + ' - ' + room) try: df = pd.read_csv(FILE) loopCounter = 0; for series in df: series = df[series] if loopCounter == 0: loopCounter += 1 continue loopCounter += 1 if series.mean() > 1000: high_co2_rooms.append([series.name, str("%.2f ppm" % series.mean())]) print_results() except KeyboardInterrupt: print_results()
Finally, we started our blogs to document our work on this project. What you’re reading right now is mine.