The Beauty of Strange Attractors

Dynamic systems are those where something changes over time according to a set of rules. They are found in many fields of study including, physics, chemistry, geology, biology and economics. Examples include, the planets orbiting around the sun, the vibration of an airplane wing, and the diffusion of drugs in your body. In mathematics, the something that changes over time can be points in a plane that change according to the rules of a function, which in a general form looks like this: [Read More]

Mapping Trees in Toronto

As cities go, Toronto is often ranked as one of the greener ones. The city has a database of trees that reside mostly on public land and consists of more than 560,000 trees and 246 species. I used Shiny and Leaflet-R to visualize the distribution of different species across the city. You can see it here. The drop down allows you to select tree species by common name or Latin name. [Read More]

Tree Taxonomy in Toronto

The city of Toronto has a large (> 567,000) database of the trees that live on public land. There are 246 types of trees and shrubs in Toronto, which is about one quarter of all the tree species in North America. However tropical forests win the diversity crown with tens of thousands of species. Usually when you start to look at a new dataset its a good idea to look at its overall structure. [Read More]

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. The web is built with HTML, Javascript and css. [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. First, a table. [Read More]