Skip to main content
SciNet
  • Home
  • All Courses
  • Calendar
  • Certificates
  • SciNet
    Main Site Documentation my.SciNet
  • CCDB
  • More
Close
Toggle search input
English
English Français
You are currently using guest access
Log in
SciNet
Home All Courses Calendar Certificates SciNet Collapse Expand
Main Site Documentation my.SciNet
CCDB
Expand all Collapse all
  1. Dashboard
  2. BCH2203 - Winter 2022
  3. 3: Pandas and zombies

3: Pandas and zombies

Completion requirements
Opened: Wednesday, 16 February 2022, 12:00 AM
Due: Wednesday, 2 March 2022, 11:59 PM

As part of a health study, the residents of 10 condominium 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.

Fortunately, some people had been taught how to kill zombies in a secret zombie defense course, and they are able to teach the other people who live in the apartment building.

The buildings are put in lock down, but the data from the wireless fitness bracelets keeps being recorded. This is useful for tracking zombies, because it turns out that zombies have no heart rate but are moving.

Your task is to find out how effective the zombie defense course was. As input, you are given two JSON files:

  • buildinginfo.json

    Contains data on the occupancy of each of the 10 buildings, how many people in them were trained zombie killers.

  • peopletracking.json

    Hourly data from the fitness bracelets for each person in those buildings for seven days since the zombie outbreak, giving the building they are in, their heart rate, and whether they are moving.

Use pandas to read these files into dataframes and answer the follow questions:

  1. Which buildings can be safely unlocked after seven days?
  2. What would have been the earliest time that these safe buildings could have been unlocked?
  3. For each building, determine the final survival rate R, i.e., the number of people with a non-zero heart rate divided by the total number of people in the building. Also determine the percentage of occupants of each building trained in killing zombies, call it T.
  4. Creates a plot of all (T,R) pairs; make it professional, i.e., everything is properly labeled and legible.

All parts should be done using python scripts (you may use one script or several, if you wish). Submit your script(s), with the answers to these questions in the comments in the code, and your plot by March 2nd, 2022 at midnight.  Remember to comment your code properly.

  • buildinginfo.json buildinginfo.json
    16 February 2022, 11:55 PM
  • peopletracking.json peopletracking.json
    16 February 2022, 11:55 PM
Contact site support
You are currently using guest access (Log in)
Data retention summary


All content on this website is made available under the Creative Commons Attribution 4.0 International licence, with the exception of all videos which are released under the Creative Commons Attribution-NoDerivatives 4.0 International licence.
Powered by Moodle