Skip to content
Permalink
Browse files
update prediction data
  • Loading branch information
chenc29 committed Oct 28, 2021
1 parent c9bc90a commit 0a97d46cd2500262354205451d271a121cc6464f
Showing with 7 additions and 6 deletions.
  1. +7 −6 read_wapData.R
@@ -50,7 +50,7 @@ rpi_wap_stats <- readRDS("../COVID_RPI_WiFi_Data/rpi_wifi_semester_day_summary.r
#buildinginfo <- readRDS("../COVID_RPI_WiFi_Data/buildinginfo.rds")

#user_prediction: Building, weekday, Hour, users, Mean_Usercount, latitude, longitude, buildingType
user_predictions <- readRDS("../COVID_RPI_WiFi_Data/rpi_user_predictions.rds")
user_predictions <- readRDS("../COVID_RPI_WiFi_Data/median_last3wks_with_floors.rds")

################################################################################################################
###CLEANING DATA
@@ -81,12 +81,13 @@ hits_per_wap_semester_by_building_max <- hits_per_wap_semester_by_building_max %
hits_per_wap_semester_by_building_max <- hits_per_wap_semester_by_building_max %>% group_by(Building) %>% summarise_all(funs(max)) %>% ungroup() %>% select(Building, usercount_max)
colnames(hits_per_wap_semester_by_building_max) <- c('Building', 'capacity')

user_predictions <- user_predictions %>%
dplyr::group_by(Building, Weekday, Hour, lat, lng, BuildingType) %>%
dplyr::summarize(totalusers = sum(users)) %>%
ungroup()

#user_predictions <- user_predictions %>% mutate(Hour = hour(as.POSIXct(time))) %>% select(Building, Median_Usercount, Mean_Usercount, Hour, latitude, longitude, buildingType, weekday)
user_predictions <- user_predictions %>% group_by(Building, Hour, latitude, longitude, buildingType, weekday) %>% ungroup()
colnames(user_predictions) <- c('Building', 'weekday', 'Hour','users', 'Mean_Usercount' ,'lat','lng', 'BuildingType')
user_predictions <- user_predictions %>% filter(BuildingType != "housing" & BuildingType != "greek") %>%
filter(!(Building %in% remove_list))
names(user_predictions)[names(user_predictions) == 'Weekday'] <- 'weekday'
names(user_predictions)[names(user_predictions) == 'totalusers'] <- 'users'

################################################################################################################
## DEFININING LISTS AND DATA FRAMES FOR CONVENIENCE

0 comments on commit 0a97d46

Please sign in to comment.