library( geojsonio ) # read shapefiles
library( sp ) # work with shapefiles
library( sf ) # work with shapefiles - simple features format
# dorling cartogram of Phoenix Census Tracts
github.url <- "https://raw.githubusercontent.com/DS4PS/cpp-529-master/master/data/phx_dorling.geojson"
phx <- geojson_read( x=github.url, what="sp" )
plot( phx )
Here is a repo with cartograms for all metro areas:
https://github.com/DS4PS/usa-dorling-shapefiles
You can grab metro maps from the library and load as follows:
https://github.com/DS4PS/usa-dorling-shapefiles/tree/master/maps/metros-dorling