cartogramR
Continuous Cartogram
Procedures for making continuous cartogram. Procedures available are: flow based cartogram (Gastner & Newman (2004) <doi:10.1073/pnas.0400280101>), fast flow based cartogram (Gastner, Seguy & More (2018) <doi:10.1073/pnas.1712674115>), rubber band based cartogram (Dougenik et al. (1985) <doi:10.1111/j.0033-0124.1985.00075.x>).
README
## Installation
Install cartogramR from CRAN with:
``` r
install.packages("cartogramR")
```
For windows users, the CRAN distributes a compiled package and there is no need to install it from source. If you install package from sources, you will need [FFTW](http://www.fftw.org/). This library is fairly common thus a package for it is usually available (linux: see fftw-devel (rpm), fftw-dev (deb); Mac OS X: fftw (brew)).
## Usage
For example cartogram for the number of electors in the USA in 1964:
1. Load package, data and verify that at least one grid point fall in
each region (the smallest region is Washington DC)
``` r
library(cartogramR)
data(usa)
plot(precartogramR(usa))
```
2. The default grid size $L=512$ is OK, thus we can run the cartogram for
variable `electors64` and plot the cartogram:
``` r
carto <- cartogramR(usa, "electors64")
plot(carto)
```
## Acknowledgements
- Many many thanks to [Michael T. Gastner](https://www.yale-nus.edu.sg/about/faculty/michael-t-gastner/) for his
[flow based cartogram](https://github.com/Flow-Based-Cartograms/go_cart) programs on which cartogramR is (heavily) based
- Timothée GIRAUD UMS 2414 RIATE / CNRS Paris, for suggestions and careful reading
Versions across snapshots
| Version | Repository | File | Size |
|---|---|---|---|
1.5-1 |
2026-04-09 windows/windows R-4.5 | cartogramR_1.5-1.zip |
2.4 MiB |