get_qwi: get_qwi

Description Usage Arguments Value Examples

View source: R/get_qwi.R

Description

The purpose of this function is to retrive firm information from the US Census' Quarterly Workforce Indicator API. These data can be retrieved with by specifying the states, the quarters, the years, and additional detail. This function can accept multiple states, years and quarters. This makes the data retrieval easier and stay inside of the US Census' limits on the API.

Usage

1
2
3
4
get_qwi(years, variables = NULL, quarters = c(1, 2, 3, 4),
  industry_level = 2, states, endpoint = "sa", all_groups = TRUE,
  owner_code = TRUE, geography = "cbsa", seasonadj = "U",
  apikey = NULL, processing = "sequential", quiet = FALSE)

Arguments

years

years to fetch (e.g. 2010, or c(2010, 2011))

variables

the variables you wish to fetch. Default is all.

quarters

The quarters to fetch (e.g. c(1,2,3,4)) Default is all

industry_level

Industries to fetch. Default is all level 2

states

state fips code to fetch

endpoint

US Census endpoint designation. One of "SA" for Sex * Age, "SE" for Sex by Education and "rh" for Race/Ethnicity

all_groups

default to true

owner_code

firm owner code

geography

the US Census geography granuality (one of cbsa or county)

seasonadj

seasonal adjustment factor (one of "U" or "S")

apikey

your US Census API Key

processing

the processing strategy (default = "sequential")

quiet

specify if progress is to be printed (default = FALSE)

Value

the desired data from the US Census's Quaterly Workforce API

Examples

1
2
3
4
5
## Not run: 
get_qwi(year = c(2010, 2011), states = c("01", "37"), apikey = "SECRETKEY")
get_qwi(year = c(2010, 2011), industry_level = 3, states = c("01", "37"), apikey = "SECRETKEY")

## End(Not run)

medewitt/tidyqwi documentation built on Jan. 14, 2019, 7:49 p.m.