Data source

This is from http://insideairbnb.com/get-the-data.html - and a discussion of why this matters is here: https://53degrees.wordpress.com/2016/10/21/august-snapshot-of-dublins-airbnb/

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…

knitr::opts_chunk$set(
    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
"http://data.insideairbnb.com/ireland/leinster/dublin/2016-08-07/visualisations/" -> stem
stem %>% paste0("listings.csv") -> fullname
read_csv(fullname) %>%
  mutate(room_type=as.factor(room_type),neighbourhood=as.factor(neighbourhood))  %>% 
  filter(availability_365 > 0) ->
  listings