Make interactive cartograms with d3.js
based on this example by Shawn Allen. I also used this example by Etienne Côme.
For France, boundaries come from OpenStreetMap, data from INSEE.
For USA, boundaries and data come from Shawn Allen's project
Warning : sizing is a little manual for the moment...
To install:
if (!require("devtools")) install.packages("devtools")
devtools::install_github("pvictor/topogRam")
You can use it like any other htmlwidget :
library("topogRam")
data(frRegPop)
topogRam(
data = frRegPop,
key_var = "P13_POP",
geo_lab = "region",
colors = c("#FEE0D2", "#FC9272", "#DE2D26")
)
See the examples.
Or check these examples :