Skip to content

Data Utilization and Preparation

Mayerhofer, Mia edited this page Dec 7, 2020 · 7 revisions

Description of All Data Used in SafeCampus

Initial Data Files and Sources

These files are not used in the actual app but are used to create the main data frames (combined_wap_data and rpi_wap_data) used in the app. They are used in Test_Wifi_overview_source.R, a test R script to create the main rds files used in the app located in both the COVID_RPI_WiFi_Data and IDEA-COVID-SafeCampus repositories.

1. apinfo.csv: This csv file contains the following information for each WAP device: WAP name, building, floor, room, longitude and latitude. It is missing several coordinate values which is why we use another csv file that contains all of the coordinates. This csv file may be found in the wap_data folder in the IDEA-COVID-ContactTracing repository.

2. allBuildingInfo.csv: This csv file contains the following information for each building: full building name, longitude, latitude, building type, and building abbreviation. This csv may be found in the some_test_files folder of the IDEA-COVID-SafeCampus repository.

3. Min_25_24_time.csv : This csv file contains 30 minute time intervals from 0:00 to 24:00. This csv file may be found in the RPIWiFiWatch folder in the IDEA-COVID-ContactTracing repository.

4. rpi_wifi_last_seven_days.Rds: This is the main source of raw WiFi Access Point usage across the RPI campus. It contains user and MAC information in from over 1300 locations and is updated every two hours. This file may be found in the COVID_RPI_WiFi_Data repository.

Final Data Files and Sources

There are four main source and reference files used in the SafeCampus app. With the exception of building_info.R which is located in the IDEA-COVID-SafeCampus repository, the other three Rds files below may be found in the RPI_COVID_WiFi_Data repository.

1. building_info.R: This R script contains lists of building names and abbreviations for each of the five building types: academic, housing, greek, other on campus, and other off campus. These are compiled into one main list called alltype so this information can be easily accessed within the app. The custom color palette used for the leaflet bubble map visualization is also included in this script.

2. rpi_wap_raw.rds: This is an rds file of the prepared WAP data used in the majority of the app. This rds file is created in Test_WiFi_overview_source.R.

3. combined_wap_data.rds: This is an rds file similar to rpi_wap_raw.rds but is grouped differently to be used to plot the leaflet bubble map in the Campus WiFi Overview tab. It contains the sums of user counts and mac counts for each 30 minute interval. This file is also created in Test_WiFi_overview_source.R.

4. buildinginfo.rds: This is an rds file of the csv file allBuildingInfo.csv which contains the following information for every building: full building name, longitude, latitude, building type, and building abbreviation. This file is also created in Test_WiFi_overview_source.R and is used to create rpi_wap_raw.rds and combined_wap_data.rds with the correct information for all buildings on campus.

Preparation of rpi_wap_raw.rds and combined_wap_data.rds

These two files are the main data frames used in the SafeCampus app. They are created in Test_WiFi_overview_source.R and then converted into Rds files to improve the speed and flow of the app. They are both created from rpi_wifi_last_seven_days.Rds. Below is a step by step guide to the creation of these data frames in Test_WiFi_overview_source.R:

  1. Format the time and date columns to Eastern Standard Time (EST).
  2. Merge with apinfo.csv and allBuildingInfo.csv to add specific building and WAP device information to the data frame.
  3. Add the 30 minute time intervals to the data frame using Min_25_24_time.csv.
  4. The combined_wap_data data frame stems from rpi_wap_raw and takes the sum of user count and mac count for every 30 minute interval.
  5. Finally, Rds files are created of the rpi_wap_raw and combined_wap_data data frames used in the SafeCampus app.