cd_shp: Congressional District (116th) Cartogram Shapefile

Description Usage Format Details Author(s) Examples

Description

Congressional District (116th) Cartogram Shapefile

Usage

1

Format

A dataframe with 435 rows and 6 variables, including:

cd

District code. The formatting corresponds to the CCES cumulative coding of cd: a two-letter abbreviation for the state followed by a dash, and the district number padded with zeros to the left to be of length 2. At-large districts like Delaware are given a "-01" for the district number.

geometry

The simple features (sf) column that wil be used for mapping

Details

These shape files are directly downloaded from Daily Kos in the link http://dkel.ec/map. It additionally adds minimal formatting of the coordinate system to render properly in R's sf.

Author(s)

Daniel Donner http://dkel.ec/map

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(ggplot2)
library(ggthemes)
library(dplyr)

ggplot(cd_shp) + geom_sf() + theme_map()

library(dplyr)
cd_black <- left_join(cd_shp, race_by_cd, by = "cd") %>%
  filter(race == "Black")

ggplot(cd_black) +
  geom_sf(aes(fill = frac)) +
  scale_fill_viridis_b("Percent Black") +
  theme_map() +
  labs(caption = "Map Source: http://dkel.ec/map")

kuriwaki/donner-map documentation built on March 8, 2021, 5:31 a.m.