Canada Federal Election 2019 {"x":{"url":"/post/2020-04-06-how-did-your-neighbours-vote-canada-2019-edition_files/figure-html//widgets/widget_neighbours_map.html","options":{"xdomain":"*","allowfullscreen":false,"lazyload":false}},"evals":[],"jsHooks":[]}

Continue reading

I just got my feet wet with tweedie regression and the recipes package yesterday. The results have been underwhelming, as the models didnt appear that predictive. I figured I might give it another try, this time using Kaggle’s claim prediction challenge from 2012. It is no longer possible to submit models, so we will create our own 20% test sample from the kaggle training data set and see how we fare.

Continue reading

I’m building my first tweedie model, and I’m finally trying the {recipes} package. We will try to predict the pure premium of car insurance policy. This can be done directly with a tweedie model, or by multiplying two separates models: a frequency (Poisson) and a severity (Gamma) model. We wil be using “lift charts” and “double lift charts” to evaluate the model performance . Here’s is the plan: Pre-process the train and test data using recipes.

Continue reading

I found life expectancy at birth data for “health regions” in Canada for 2015-2017 and in “census tracts” in the USA for 2010-2015. Here is a map of these two countries, excluding areas with a life expectancy at birth lower than 0. Data sources and shapefiles: Canada mortality. Canada shapefiles. USA mortality. USA shapefiles downloaded using the tigris package.

Continue reading

Bon, on a finalement relevé les visières. Mon spéculateur anonyme du blog post qui spécule sur le 3e lien? n’est nul autre que Martin Pellerin, le président de la chambre de Commerce de Lévis. Je vais laisser à d’autres le soin de spéculer sur l’information privilégiée dont il pouvait disposer lorsqu’il a acheté les terrains le 10 mai, soit quelques semainse avant que le tracé ne soit officialisé. Ce qui m’insulte, c’est surtout qu’il est un ardent promoteur du projet.

Continue reading

Race for a family

Hey, I’ve finally found an excuse to use the gganimate package in R to generate bar chart races! I’m going back to one of my previous jobs, demography, and we are going to look at how the fertility of the cohorts of Quebec women born between 1915 and 1980 has evolved. The data Fertility data from Statistics Canada, year 1921-2016. It includes data for all provinces. The code As usual, the code is on my github.

Continue reading

Author's picture

Simon Coulombe

gosseux de données | pelleteux de cloud

data scientist in the insurance industry

Québec, Canada