This document provides insight about data gathered by the lorauna app. During the 2018/2019 sauna season the entrering and exiting visitors have been continiously logged by the on-premise receptionist This log entries are now used to analyze the seasons performance.

Data

The dataset to create this report is pulled directly from the lorauna database and has been prepared in the following manner:

# setup connection
connection <- mongo(collection = "visitor", db = "lorauna", url = Sys.getenv("MONGO_URL"))

# read and filter visitors data
visitors <- connection$find(
  query = '{
    "created": { "$gte" : { "$date" : "2018-11-01T00:00:00Z" }},
    "created": { "$lte" : { "$date" : "2019-03-31T00:00:00Z" }}
  }'
)

# add date column
visitors$date <- as.Date(visitors$created)

# add day column
visitors$day <- format(visitors$date, '%d')

# add week day column
visitors$weekday <- weekdays(as.Date(visitors$date))

# add month column
visitors$month <- months(as.Date(visitors$date))

# filter weekdays
visitors <- visitors %>% filter(weekday %in% c('Monday', 'Tuesday', 'Friday', 'Saturday', 'Sunday'))

# define weekday factors for sorting
visitors$weekday <- factor(visitors$weekday, levels=c("Monday", 
    "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"))

# define month factors for sorting
visitors$month <- factor(visitors$month, levels=c("November", "December", "January", "February", "March"))

# filter incoming visitors
visitors_in <- visitors %>% filter(value == 1)

Summary of the dataset:

summary(visitors_in)
##      value     sauna_id            created                   
##  Min.   :1   Length:3608        Min.   :2018-11-02 22:51:32  
##  1st Qu.:1   Class :character   1st Qu.:2018-12-07 16:49:59  
##  Median :1   Mode  :character   Median :2019-01-25 17:35:36  
##  Mean   :1                      Mean   :2019-01-18 20:25:40  
##  3rd Qu.:1                      3rd Qu.:2019-02-26 18:47:36  
##  Max.   :1                      Max.   :2019-03-30 19:53:55  
##                                                              
##  current_seats        date                day                 weekday   
##  Min.   :-2.00   Min.   :2018-11-02   Length:3608        Monday   :569  
##  1st Qu.: 8.00   1st Qu.:2018-12-07   Class :character   Tuesday  :638  
##  Median :15.00   Median :2019-01-25   Mode  :character   Wednesday:  0  
##  Mean   :14.51   Mean   :2019-01-18                      Thursday :  0  
##  3rd Qu.:21.00   3rd Qu.:2019-02-26                      Friday   :678  
##  Max.   :33.00   Max.   :2019-03-30                      Saturday :813  
##                                                          Sunday   :910  
##       month    
##  November:740  
##  December:583  
##  January :611  
##  February:784  
##  March   :890  
##                
## 

Summary by Month

Sum of visitors for each month:

November

In November there were 740 visitors.

The following bar plot shows the average distribution by weekday:

December

In December there were 583 visitors.

The following bar plot shows the average distribution by weekday:

January

In January there were 611 visitors.

The following bar plot shows the average distribution by weekday:

February

In February there were 784 visitors.

The following bar plot shows the average distribution by weekday:

March

In March there were 890 visitors.

The following bar plot shows the average distribution by weekday: