get_bls_county: A function that returns county-level labor statistics

View source: R/get_bls_county.R

get_bls_countyR Documentation

A function that returns county-level labor statistics

Description

A function to download and format state employment data. Due to limitations in the data source, the function can only return data from the last 12 months. NOTE: Unlike many other BLS data sets, these data are never estimated, meaning the most current data may be as much as 60 days behind the current data. The county data are also never seasonally adjusted.

Usage

get_bls_county(date_mth = NULL, stateName = NULL, ...)

Arguments

date_mth

The month you would like data for. Accepts full month names and four-digit year. If NULL, it will return the most recent month in the database.

stateName

is an optional argument if you only want data for certain state(s). The argument is NULL by default and will return data for all 50 states.

...

additional arguments

Value

A tibble from the BLS API.

Examples

## Not run: 
# Most recent month in the data set.
get_bls_county()

# A specific month
df <- get_bls_county("May 2017")

# Multiple months
df <- get_bls_county(c("April 2017","May 2017"))

# A specific state
df <- get_bls_county(stateName = "Florida")

# Multiple states, multiple months
df<- get_bls_county(date_mth = "April 2017", 
             stateName = c("Florida", "Alabama"))

## End(Not run)


blscrapeR documentation built on Sept. 17, 2022, 1:05 a.m.