Leaflet Map

The Toronto Police make public the data for all the crimes committed in the city. Recently, the data for 2014 to 2017 became available. Since I wanted to learn about interactive maps in R, I thought it would be interesting to see a heat map of break and enter crimes across the city’s 140 neighbourhoods. Leaflet is a popular open-source JavaScript library for interactive maps. [Read More]

Climate Change at Home

In Al Gore’s latest movie, An Inconvenient Sequel: Truth to Power (2017), I was struck by the image of a plot of summer temperatures moving to the right as time progressed. I thought I’d see whether that shift held true for downtown Toronto. Environment Canada has Toronto temperature records going back to 1840. I chose to begin in 1848 so I could group the data into decades ending at the end of 2017. [Read More]

Is it Windy Outside?

Or, What's Up With The Great Lakes Image?

NOTE: The blog header image has been replaced by Clifford attractors. A static archived wind map can be seen here My earlier experience with Wordpress made me think there had to be a better way to do simple, reliable sites online. A blog is static, meaning everyone sees the same content. Yihui Xie from RStudio created what for my needs is a better way to host content - blogdown. [Read More]

Who's a Buffon?

Estimating Pi

I wanted to try a simple interactive visualization using RStudio’s Shiny package and thought Buffon’s needle problem would work well. Around 1732, Georges-Louis Leclerc, Comte de Buffon, a French mathematician, first posed and solved the question that essentially boils down to asking what is the probability that a needle dropped on a floor of parallel lines crosses a line? He discovered that if the length of the needle is less than or equal to the width of the lines the probability is: [Read More]

Visualizing Population Change

The Slope Graph

Every time I’ve visited Newfoundland and Labrador I’ve loved it. So, when I hear about the shrinking of small towns there my ears perk up. I thought it would be interesting to visualize the change in communities of all size across all provinces between 2001 and 2016. There are many ways to look at this, here are two. In this post I use the term “city” and “community” interchangeably. [Read More]

Inflation - Part II

...The Cost of Living in Toronto

What if we added the median home price of just detached homes in Toronto? This was tough data to get so I only have data for the start and end dates. Since detached homes, as a group, are generally more expensive than other types of homes I wondered whether the rate of appreciation of a home had to do with its cost. Do more expensive homes appreciate faster? This plot looks at median, detached home prices in different areas of central Toronto. [Read More]

Inflation - Part I

The Cost of Living in Toronto...

I’ve always loved the stories a good plot could tell, so I decided to learn more about data visualization and R. R is a funny name for a handy language that’s designed to deal with data. (Aside: R evolved from S which came from Bell Labs in the 70s which is further evidence that everything was invented in Bell Labs in the 70s.) For a first try, I thought I’d plot a simple time-series of inflation-adjusted prices of things in my city. [Read More]