megv
megv

Reputation: 1461

Heatmap in R including Alaska and Hawaii

I would like to create a heat-map including both Alaska and Hawaii in R. This is a reference, but it does not include Hawaii or Alaska:

Create a heatmap of USA with state abbreviations and characteristic frequency in R

Upvotes: 1

Views: 1518

Answers (1)

Michael Veale
Michael Veale

Reputation: 959

The map you're talking about is often called a choropleth or a thematic map, not a heatmap. While the definition isn't completely rigid, choropleths show difference on delineated levels, such as countries, regions or states, while heatmaps tend to be a continuous overlay which does not link directly to political boundaries (such as a map that colours an image of the US by pixel rather than by state, perhaps modelling air pressure, or the like).

The package choroplethr (https://cran.r-project.org/web/packages/choroplethr/choroplethr.pdf) uses the USAChoropleth object bundled to draw a map of the US that has Hawaii and Alaska as insets.

An example from the choroplethr vignette

An example from the choroplethr vignette

If you want to manually locate Hawaii or Alaska, and are familiar with ggplot2, see the answer Relocating Alaska and Hawaii on thematic map of the USA with ggplot2 .

Upvotes: 1

Related Questions