% Author: Simon-Pierre Boucher — contact@spboucher.ai % ============================================================================= % 03_data.tex % ============================================================================= \section{Data}\label{sec:data} This section describes the two primary datasets, the cleaning procedures applied to each, the spatial merge strategy used to link them, and the construction of key variables. \subsection{Airbnb Listings} Our Airbnb data consist of approximately 5{,}000 listings scraped from the Airbnb platform for the province of Quebec, Canada. Each listing record contains the following fields: listing name, city, latitude and longitude coordinates, property type, nightly price (in Canadian dollars), star rating, number of reviews, superhost status, guest-favourite designation, pet-friendliness, and price/rating category indicators. The listings span multiple cities across Quebec, with the largest concentrations in Montreal, Quebec City (Qu\'{e}bec), Sherbrooke, and various resort/cottage communities in the Laurentians and Eastern Townships. Property types include \textit{Rental unit}, \textit{Cabin/Chalet}, \textit{House}, \textit{Condo}, and \textit{Apartment}, with Rental unit being the most common category. \paragraph{Cleaning.} We standardise city names by merging accented and unaccented variants (e.g., ``Montr\'{e}al'' and ``Montreal'') and consolidating aliases (e.g., ``Quebec City'' and ``Qu\'{e}bec City'' mapped to ``Qu\'{e}bec''). We drop listings with missing or non-positive nightly prices, which yields a cleaned sample of 3{,}456 listings, and winsorise the price distribution at the 1st and 99th percentiles to mitigate the influence of extreme outliers. The log-transformed price, $\ln(\text{price\_numeric})$, is used as the dependent variable in the Airbnb pricing model. Missing ratings are imputed with the sample median, reflecting the assumption that unrated listings represent recently created properties whose quality is, on average, comparable to the centre of the distribution. Missing review counts are set to zero. An indicator variable, \texttt{is\_entire\_home}, is constructed to identify listings of types House, Cabin/Chalet, and Condo, which are typically rented in their entirety. \subsection{Residential Rental Listings} The rental data consist of approximately 8{,}300 listings scraped from Realtor.ca, Canada's primary real-estate listing platform, for the province of Quebec. Each record contains: address, latitude and longitude, property type, monthly lease rent (in Canadian dollars), building type, number of bedrooms, number of bathrooms, interior size, number of storeys, and postal code. Building types in the rental data are dominated by \textit{Apartment} ($n \approx 7{,}515$), followed by \textit{House} ($n \approx 745$) and \textit{Row/Townhouse} ($n \approx 48$). The geographic distribution is heavily concentrated in the Montreal metropolitan area, with additional clusters in Quebec City, Gatineau, Sherbrooke, and Laval. \paragraph{Cleaning.} Monthly rent values are extracted from the lease-rent string and converted to numeric format. We restrict the sample to listings with monthly rental periods and positive rent values. Extreme rent values are handled through winsorisation at the 1st and 99th percentiles. The log of monthly rent, $\ln(\text{rent})$, serves as the dependent variable in the hedonic rent model. Bedroom and bathroom counts are cleaned and converted to numeric types. Listings with missing geographic coordinates are dropped prior to spatial merging. \subsection{Spatial Merge Strategy}\label{sec:spatial_merge} The core challenge in linking the Airbnb and rental datasets is that they share no common listing identifiers. We exploit the fact that both datasets contain precise latitude and longitude coordinates to construct a spatial buffer merge. For each rental listing $i$, we compute the Haversine (great-circle) distance to every Airbnb listing $j$ and count the number of Airbnb listings falling within four concentric buffers: 250\,m, 500\,m, 1\,km, and 2\,km. Formally, the Airbnb count for rental listing $i$ within buffer radius $r$ is: \begin{equation}\label{eq:buffer_count} \texttt{airbnb\_count}_{i,r} = \sum_{j=1}^{N_{\text{Airbnb}}} \mathbf{1}\left[ d(i, j) \leq r \right], \end{equation} where $d(i, j)$ is the Haversine distance between listings $i$ and $j$, and $\mathbf{1}[\cdot]$ is the indicator function. In addition to the count, we construct several exposure metrics within each buffer: Airbnb density (count divided by buffer area, $\pi r^2$), mean Airbnb nightly price, share of entire-home listings, mean rating, and superhost share. These variables capture not only the intensity of Airbnb activity but also its composition and quality. At the preferred 500\,m radius, the mean Airbnb count per rental listing is approximately 8 listings, with substantial variation across urban and rural areas. \subsection{City-Level Aggregation} As a complementary linkage strategy, we aggregate Airbnb data to the city level and merge city-level summary statistics---total Airbnb count, mean nightly price, share of entire-home listings---onto the rental data using the city name as the merge key. This approach sacrifices the within-city spatial variation that drives our buffer-based analysis but provides a useful benchmark for examining cross-city relationships. \subsection{Summary Statistics} Tables~\ref{tab:summary_airbnb} and~\ref{tab:summary_rent} present summary statistics for the cleaned Airbnb and rental datasets, respectively. \begin{table}[htbp] \centering \caption{Summary Statistics --- Airbnb Listings} \label{tab:summary_airbnb} \small\setlength{\tabcolsep}{4pt} \input{../results/tables/summary_stats_airbnb.tex} \end{table} \begin{table}[htbp] \centering \caption{Summary Statistics --- Residential Rental Listings} \label{tab:summary_rent} \small\setlength{\tabcolsep}{4pt} \input{../results/tables/summary_stats_rent.tex} \end{table} Key features of the data are worth noting. The median Airbnb nightly price is approximately \$220 CAD, while the median monthly rent is approximately \$1{,}950 CAD. There is substantial variation in both prices, reflecting the heterogeneity of listings in terms of location, size, and quality. The Airbnb data span a wide range of property types, from budget-oriented rental units to luxury chalets, while the rental data are dominated by apartment units. % Table removed: buffer_summary.tex not generated as a separate file. % Buffer-based exposure statistics are described in Section~\ref{sec:spatial_merge}. \subsection{Geographic Distribution} Figures~\ref{fig:map_airbnb} and~\ref{fig:map_rent} display the geographic distribution of Airbnb and rental listings, respectively. The spatial overlap between the two datasets is concentrated in the Montreal metropolitan area and, to a lesser extent, in Quebec City and resort regions. \begin{figure}[htbp] \centering \includegraphics[width=0.85\textwidth]{map_airbnb.pdf} \caption{Geographic Distribution of Airbnb Listings in Quebec} \label{fig:map_airbnb} \end{figure} \begin{figure}[htbp] \centering \includegraphics[width=0.85\textwidth]{map_rent.pdf} \caption{Geographic Distribution of Residential Rental Listings in Quebec} \label{fig:map_rent} \end{figure} Figure~\ref{fig:price_distributions} shows the distributions of Airbnb nightly prices and monthly rents (both in levels, trimmed above the 99th percentile for readability). \begin{figure}[htbp] \centering \begin{subfigure}[t]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{dist_airbnb_price.pdf} \caption{Airbnb nightly price (CAD)} \label{fig:dist_airbnb} \end{subfigure} \hfill \begin{subfigure}[t]{0.48\textwidth} \centering \includegraphics[width=\textwidth]{dist_rent.pdf} \caption{Monthly rent (CAD)} \label{fig:dist_rent} \end{subfigure} \caption{Distributions of Airbnb Nightly Prices and Monthly Rents} \label{fig:price_distributions} \end{figure} \subsection{Data Limitations} Several limitations of the data should be acknowledged. First, the data are cross-sectional, representing a single snapshot in time. We cannot observe how Airbnb entry or exit affects rents over time, nor can we control for time-varying confounders. Second, we do not observe host identifiers, which precludes the construction of multi-listing indicators at the host level---a variable that has been important in prior studies for distinguishing professional from casual hosts. Third, the Airbnb data are scraped from the public-facing platform and may not capture all listings, particularly those that are inactive, delisted, or hidden behind search filters. Fourth, the rental data from Realtor.ca represent \textit{asking} rents rather than \textit{transacted} rents; to the extent that there is systematic negotiation between posted and final rents, our dependent variable may be measured with noise. Fifth, there may be spatial selection in the data: the coverage of both platforms is likely denser in urban areas, particularly Montreal, which limits the generalisability of our findings to rural and peripheral markets.