Christopher Belanger, PhD MBA Posts Projects Publications CV Contact Click here to open the menu.

Posts

New Paper! The Experience of Meaningless Work in the Public Sector

My co-authors Samia Chreim, Silvia Bonaccio, and I have just published a new paper called “The Experience and Implications of Meaningless Work in the Public Sector” in The Journal of Business Ethics.

A Minimal(ish?) Example of Using Session Cookies in SolidStart

In which the author tries and generally succeeds in understanding how to get the full-stack Javascript-based web framework SolidStart to manage user session cookies.

Rolling Joins with dplyr v1.1.0!

The R package dplyr now does rolling joins. What is a rolling join, why might you want to use one, and how would you go about it? These and other scintillating questions will be explored within.

Building a Chat App with R and Shiny

How to build a basic chat application in R using Shiny, RSQlite databases, and CSS. The underlying logic can also be used for serious business applications.

Teaching a Computer to Talk* *(Sort of)

Using math to provide future generations with an infinitely renewable source of Dr. Seuss stories and Doug Ford campaign speeches. Includes an interactive web app and an R package.

Ontario, Meet Your MPPs (Most Prolific Posters)

How do politicians in Ontario use Twitter? Who do they talk to, and what do they talk about? In this post, we’ll look at what and who politicians care about by analyzing their public statements on social media.

Exploring Twitter Trends with Storywrangler in R

This post will show how to do Twitter trends analysis with the Storywrangler dataset using my new R package, storywranglr. We’ll look at three worked ‘mini-cases’: a marketing case about Black Friday, a consumer interest case about TV shows, and a case where we link to another dataset about musicians.

Scraping Dynamic Web Sites with API Interception using R

This post introduces a new web-scraping technique called API interception using the Ontario Newsroom as a case study. Then we use our new data to answer a question: is there evidence of a ‘Friday news dump’ in Ontario politics?

Starbucks and Tim Horton's: A Geomarketing Case Study

A minimal example of how geospatial data can be used to analyze business patterns. With interactive maps!

valhallr: An R Interface to the Valhalla Routing Engine

The ‘valhallr’ package provides an R interface to the Valhalla routing engine–the same one Tesla uses in its cars. This post introduces the package and demonstrates how to use it to generate turn-by-turn directions, origin-destination analyses, and isochrones.

Crafting a Quicker COVID Queue? Mapping Ottawa's Age-80+ Residents

In March, the City of Ottawa expects to begin vaccinating age-80+ residents who live at home. But where do they live? And could we perhaps use open data to focus vaccination efforts?

COVID Countdown! Building a Shiny Dashboard to Track Vaccinations in Canada

Trudeau has committed to vaccinating every willing Canadian against COVID-19 by September. So how’s it going so far? I built a dashboard to find out, and, well…

Pardon Me? Analyzing Trump's Presidential Pardons

Presidential pardons have been all over the news this week, since Donald Trump issued a number of of them on his way out the door. But how does his use of the pardon power compare to that of past Presidents? The answer might surprise you!

Interactive COVID-19 Simulation: The Effects of Physical Distancing on Transmission

This interactive simulation lets you explore how different levels of physical distancing affect the transmission of COVID-19.

A Fast, Effective, and Simple Classification Model for Customer Reviews

This post presents a new, simple, fast, and effective model for predicting a Yelp review’s star rating from its review text, including an interactive demonstration app and a downloadable R package.

Tidy Geocoding in R: Two New Functions

This post introduces two custom functions for geocoding in R: one using the City of Ottawa’s free geocoding service, and one using Google’s geocoding API. I provide instructions on how to install the functions, some code examples, and interactive maps.

Two Ways to Count Points in Polygons with R

TODO: ADD SHORT SUMMARY

Web Scraping in R: Selenium, FireFox, and PhantomJS

A minimal example of using Selenium to automatically collect data from web pages that need Javascript.

OCTranspo Route Mapping in R: Part 1

In this post I’m going to explain how to start using R’s tidytransit package to plan trips on OCTranspo, Ottawa’s public transit system. OCTranspo makes a lot of its data available online, but they leave out a key file called transfers.txt that tells the system how you can move from one route to another. You need this file for trip planning, so the first step to planning trips is to generate our own transfers.txt using reasonable assumptions about how transit users can move between route stops on foot.

Connecting GitHub to Netlify with the Academic Theme

Quick notes about setting up a Hugo static website workflow. Update as of 2026–I didn’t like this workflow and I’m not using it any more.