I tried to implement this [great blog](https://www.fromthebottomoftheheap.net/2017/10/19/first-steps-with-mrf-smooths/) post by Gavin Simpson using data downloaded using the cancensus package, but I get the following error when trying to evaluate the gam:

```
Error in smooth.construct.mrf.smooth.spec(object, dk$data, dk$knots) : 
  mismatch between nb/polys supplied area names and data area names
In addition: Warning message:
In if (all.equal(sort(a.name), sort(levels(k))) != TRUE) stop("mismatch 
between nb/polys supplied area names and data area names") :
  the condition has length > 1 and only the first element will be used

```

I have posted my minimal working example [here](https://github.com/SimonCoulombe/mrf/blob/master/mrf.R). Any tip would be greatly appreciated.

Best,