Data source

This is from - and a discussion of why this matters is here:

Setting things up

The following code sets up options and reads in the listings.csv file - and currently filters out listings with apparently zero days availability. At the moment I’m unsure what zero implies here - missing value, no longer listed, some mixture of this or something entirely different. Until this is resolved, focus will be on non-zero values…

    echo = TRUE,
    message = FALSE,
    warning = FALSE
library(tidyverse) # Data manipulation tool (autoloads ggplot2 as well)
library(readr)     # Fast reading of listings data
library(dplyr)     # Pipelining
library(rgdal)     # For mapping later on
library(ggmap)     # For mapping later on
# The following reads in the data,  makes 'room_type' and 'neighbourhood' into factors
# and stores in a table called 'listings'
# Now I delete the zero days available data - remove the 'filter' command to keep them
"" -> stem
stem %>% paste0("listings.csv") -> fullname
read_csv(fullname) %>%
  mutate(room_type=as.factor(room_type),neighbourhood=as.factor(neighbourhood))  %>% 
  filter(availability_365 > 0) ->