Skip to contents

Convert a location format string to the name of the corresponding column in us_location_table, raising an error if an unknown format is provided.

Usage

to_us_location_table_column(location_format)

to_location_table_column(location_format)

Arguments

location_format

the format string to convert. Valid values are:

  • "abbr" or "short_name": USPS 2-letter abbreviation

  • "code" or "hub": Legacy 2-digit FIPS code for states and territories and US for the US as a whole, the schema typically used in forecast hubs.

  • "hrd": USPS 2-letter abbreviation for subnational states and territories and USA for the US as a whole, the schema used by the NHSN Hospital Respiratory Data (HRD) dataset.

  • "long_name" or "name": Full location name, as a string.

Value

the corresponding column name in us_location_table.