res_national_map: Reserve National Map

Description Usage Arguments Details Value Author(s) References Examples

View source: R/res_national_map.R

Description

Create a base map for NERRS reserves in ggplot

Usage

1
2
3
4
5
6
res_national_map(
  incl = c("contig", "AK", "HI", "PR"),
  highlight_states = NULL,
  highlight_reserves = NULL,
  agg_county = TRUE
)

Arguments

incl

chr vector to include AK, HI , and PR (case sensitive)

highlight_states

chr vector of state FIPS codes

highlight_reserves

chr vector of 3 letter reserve codes

agg_county

logical, should counties be aggregated tot he state-level? Defaults to TRUE

Details

Create a base map of the US with options for including AK, HI, and PR. The user can choose which states and NERRS reserves to highlight. This function was developed, in part, from a blog post by Bob Rudis.

Value

Returns a ggplot object

Author(s)

Bob Rudis, Julie Padilla Maintainer: Julie Padilla

References

Rudis, Bob. 2014. "Moving The Earth (well, Alaska & Hawaii) With R". rud.is (blog). November 16, 2014. https://rud.is/b/2014/11/16/moving-the-earth-well-alaska-hawaii-with-r/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
##National map highlighting states with NERRS
nerr_states <- c('01', '02', '06', '10', '12', '13', '15'
, '23', '24', '25', '27', '28', '33', '34', '36', '37', '39'
, '41', '44', '45', '48', '51', '53', '55', '72')

res_national_map(highlight_states = nerr_states)


#' ##Just the national map
res_national_map()

##National map highlighting west coast states and NERRS (including AK)
nerr_states_west <- c('02', '06', '41', '53')

nerrs_codes <- c('pdb', 'sos', 'sfb', 'elk', 'tjr', 'kac')

res_national_map(highlight_states = nerr_states_west, highlight_reserve = nerrs_codes)

SWMPrExtension documentation built on Aug. 30, 2020, 5:06 p.m.