RSpatial

US State and County Choropleth Map (Heatmap)

In this #TidyTuesday post, I try to show an example of putting together six common geographic visualization methods of heat map or choropleth map.

Code is available on GitHUB

Counties

Map data from mpas

Corrected to match with American Community Survey (ACS)

COUNS (48 states an DC)

Map data from albersusa

50 States and DC

Using R6 class choroplethr

50 States and DC

R Spatial Data Analysis 4: stars

R Spatial Data Analysis 3: Simple Features

R Spatial Data Analysis 2: Spatial Class

R Spatial Data Analysis 1: from Data to Spatial Data

As much as R is popular in data analysis, R becomes more and more favored in geospatial analysis and visualization. To introduce spatial data, let first start with comman data. Basic R data types: vector, factor, matrix, data.frame, and list. Data and Plots There are many ways to munipulate and visualize data in R, including, typically, the basic and the tidyverse framework. Let’s warm up with plotting data.frame. basic plot attach(mtcars) par(mfrow = c(1,2)) plot(mpg, wt, main = "wt vs.