move_state: Move, scale, rotate a state on a map

Description Usage Arguments Value

View source: R/helpers.R

Description

Helps move states like Alaska and Hawaii so the map-based visualizations can be more compact. This function simplifies changing the position of the state (shifting), changing the size of the state (scaling), and rotating the state.

Usage

1
move_state(map, state, rotation = 0, scale = 1, shift = c(0, 0))

Arguments

map

A spatial data frame with the map data.

state

A string with the abbreviation of the state to adjust (ie. "AK").

rotation

A numeric with rotation adjustment given in degrees.

scale

A numeric with the scale factor for the state.

shift

A numeric vector with the horizontal and vertical adjustments for the state's position.

Value

The same spatial data frame but with the adjusted state.


ucsf-bhhi/coc-data documentation built on Dec. 23, 2021, 1:07 p.m.