Assignment 3: Zombie tracking
As part of a health study, the residents of 9 apartment buildings have all been given wireless fitness bracelets that record heart rate and motion.
Suddenly, some of the apartment dwellers become zombies. The zombies go rampaging through the buildings, turning the other apartment dwellers into zombies, but the people do fight back. While the buildings are put in lock down, the data from the wireless fitness bracelets keeps being recorded (this can be useful for tracking zombies, because they have no heart rate yet are moving).
Your task is to create a visualization to see how the situation is progressing in the apartment buildings. You are given a JSON file with the information from the fitness bracelets called peopletracking.json, which has hourly data from each person in those buildings for seven days since the zombie outbreak. Each record in this file contains the hour, the building they are in, their heart rate, whether they are moving, and an anonymized personal id.
Create a script that uses pandas to read this file into a dataframe and creates a png file containing a graph of the average heart rate of moving indivuals as a function of time. The graph should have 9 panels in a 3x3 grid where each panel corresponds to one of the buildings. To give you an idea of what we are looking for, below, you'll find a blurred version of such a visualization. Based on the visualization, also answer the following questions:
- Which buildings might be safely unlocked after seven days?
- When do you estimate that these safe buildings could have been unlocked?
- What other visualization might have given a more accurate estimate?
Submit the script that creates this visualization with the answers to these questions in the comments in the code. Also submit your plot. The deadline for this assignment is March 1st, 2024 at midnight. Remember to follow best practices in your code.
- 16 February 2024, 11:24 AM
- 16 February 2024, 11:24 AM