View source: R/laus_get_data.R
laus_get_data | R Documentation |
Allows users to request LAUS data and have it downloaded as a data frame with ease
laus_get_data(
location.vector,
measure.vector,
start.year,
end.year,
api.version = 1,
bls.key = NULL
)
location.vector |
A string or vector of the different cities, states or metropolitan statistical areas you want LAUS data from. To get help type help_laus_areacodes() to get a list of all of the area names that area associated to an area code in the LAUS data |
measure.vector |
A string of the laus measure you want to gather in your call, e.g. unemployment, unemployment rate. |
start.year |
The year you want as the beginning period of data collection |
end.year |
The year you want as the ending period of data collection |
api.version |
A numerical value that specifies which version of the api you're using (1 or 2). Default is version 1. |
bls.key |
The BLS key you're using to retrieve data using version 2 |
library(blsAPI)
library(dplyr)
library(rjson)
unem_df <- laus_get_data(location.vector = c("Florida", "California",
"Charlotte County, FL", "Fresno County, CA"),
measure.vector = "unemployment rate",
start.year = 2019, end.year = 2021,
api.version = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.