Skip to contents

Given a vector of state/territory two-letter USPS short names (e.g. MA, TX, PR), return the corresponding location code typically used in forecast hubs (legacy FIPS code for states and territories, US for the US).

Usage

us_loc_abbr_to_code(abbrs)

Arguments

abbrs

vector of USPS two letter name abbreviations

Value

vector of the same length recoded as hub-style location codes