The goal of qcewAPI
is to wrap the QCEW Open Data Access RScript provided by the Bureau of Labor Statistics in an R package, and provide more documentations and examples.
Publicly available files include data on the number of establishments, monthly employment, and quarterly wages, by NAICS industry, by county, by ownership sector, for the entire United States.
Employment data under the QCEW program represent the number of covered workers who worked during, or received pay for, the pay period including the 12th of the month. Excluded are members of the armed forces, the self-employed, proprietors, domestic workers, unpaid family workers, and railroad workers covered by the railroad unemployment insurance system.
The QCEW data are used as the benchmark source for employment by the Current Employment Statistics program and the Occupational Employment Statistics program.
# install.packages("devtools")
devtools::install_github("jjchern/qcewAPI")
qcewAPI::get_area(year = "2013", qtr = "a", area = "26000")
#> Source: local data frame [2,822 x 38]
#>
#> area_fips own_code industry_code agglvl_code size_code year qtr
#> <int> <int> <fctr> <int> <int> <int> <fctr>
#> 1 26000 0 10 50 0 2013 A
#> 2 26000 1 10 51 0 2013 A
#> 3 26000 1 102 52 0 2013 A
#> 4 26000 1 1021 53 0 2013 A
#> 5 26000 1 1022 53 0 2013 A
#> 6 26000 1 1023 53 0 2013 A
#> 7 26000 1 1024 53 0 2013 A
#> 8 26000 1 1025 53 0 2013 A
#> 9 26000 1 1026 53 0 2013 A
#> 10 26000 1 1027 53 0 2013 A
#> .. ... ... ... ... ... ... ...
#> Variables not shown: disclosure_code <fctr>, annual_avg_estabs <int>,
#> annual_avg_emplvl <int>, total_annual_wages <dbl>, taxable_annual_wages
#> <dbl>, annual_contributions <int>, annual_avg_wkly_wage <int>,
#> avg_annual_pay <int>, lq_disclosure_code <fctr>, lq_annual_avg_estabs
#> <dbl>, lq_annual_avg_emplvl <dbl>, lq_total_annual_wages <dbl>,
#> lq_taxable_annual_wages <dbl>, lq_annual_contributions <dbl>,
#> lq_annual_avg_wkly_wage <dbl>, lq_avg_annual_pay <dbl>,
#> oty_disclosure_code <fctr>, oty_annual_avg_estabs_chg <int>,
#> oty_annual_avg_estabs_pct_chg <dbl>, oty_annual_avg_emplvl_chg <int>,
#> oty_annual_avg_emplvl_pct_chg <dbl>, oty_total_annual_wages_chg <dbl>,
#> oty_total_annual_wages_pct_chg <dbl>, oty_taxable_annual_wages_chg
#> <int>, oty_taxable_annual_wages_pct_chg <dbl>,
#> oty_annual_contributions_chg <int>, oty_annual_contributions_pct_chg
#> <dbl>, oty_annual_avg_wkly_wage_chg <int>,
#> oty_annual_avg_wkly_wage_pct_chg <dbl>, oty_avg_annual_pay_chg <int>,
#> oty_avg_annual_pay_pct_chg <dbl>.
qcewAPI::get_industry(year = "2013", qtr = "1", industry = "1012")
#> Source: local data frame [6,451 x 42]
#>
#> area_fips own_code industry_code agglvl_code size_code year qtr
#> <fctr> <int> <int> <int> <int> <int> <int>
#> 1 01000 3 1012 53 0 2013 1
#> 2 01000 5 1012 53 0 2013 1
#> 3 01001 5 1012 73 0 2013 1
#> 4 01003 5 1012 73 0 2013 1
#> 5 01005 5 1012 73 0 2013 1
#> 6 01007 5 1012 73 0 2013 1
#> 7 01009 5 1012 73 0 2013 1
#> 8 01011 5 1012 73 0 2013 1
#> 9 01013 5 1012 73 0 2013 1
#> 10 01015 5 1012 73 0 2013 1
#> .. ... ... ... ... ... ... ...
#> Variables not shown: disclosure_code <fctr>, qtrly_estabs <int>,
#> month1_emplvl <int>, month2_emplvl <int>, month3_emplvl <int>,
#> total_qtrly_wages <dbl>, taxable_qtrly_wages <dbl>, qtrly_contributions
#> <dbl>, avg_wkly_wage <int>, lq_disclosure_code <fctr>, lq_qtrly_estabs
#> <dbl>, lq_month1_emplvl <dbl>, lq_month2_emplvl <dbl>, lq_month3_emplvl
#> <dbl>, lq_total_qtrly_wages <dbl>, lq_taxable_qtrly_wages <dbl>,
#> lq_qtrly_contributions <dbl>, lq_avg_wkly_wage <dbl>,
#> oty_disclosure_code <fctr>, oty_qtrly_estabs_chg <int>,
#> oty_qtrly_estabs_pct_chg <dbl>, oty_month1_emplvl_chg <int>,
#> oty_month1_emplvl_pct_chg <dbl>, oty_month2_emplvl_chg <int>,
#> oty_month2_emplvl_pct_chg <dbl>, oty_month3_emplvl_chg <int>,
#> oty_month3_emplvl_pct_chg <dbl>, oty_total_qtrly_wages_chg <dbl>,
#> oty_total_qtrly_wages_pct_chg <dbl>, oty_taxable_qtrly_wages_chg <int>,
#> oty_taxable_qtrly_wages_pct_chg <dbl>, oty_qtrly_contributions_chg
#> <int>, oty_qtrly_contributions_pct_chg <dbl>, oty_avg_wkly_wage_chg
#> <int>, oty_avg_wkly_wage_pct_chg <dbl>.
qcewAPI::get_size(year = "2013", size = "6")
#> Source: local data frame [3,781 x 42]
#>
#> area_fips own_code industry_code agglvl_code size_code year qtr
#> <fctr> <int> <fctr> <int> <int> <int> <int>
#> 1 US000 5 10 21 6 2013 1
#> 2 US000 5 101 22 6 2013 1
#> 3 US000 5 1011 23 6 2013 1
#> 4 US000 5 1012 23 6 2013 1
#> 5 US000 5 1013 23 6 2013 1
#> 6 US000 5 102 22 6 2013 1
#> 7 US000 5 1021 23 6 2013 1
#> 8 US000 5 1022 23 6 2013 1
#> 9 US000 5 1023 23 6 2013 1
#> 10 US000 5 1024 23 6 2013 1
#> .. ... ... ... ... ... ... ...
#> Variables not shown: disclosure_code <fctr>, qtrly_estabs <int>,
#> month1_emplvl <int>, month2_emplvl <int>, month3_emplvl <int>,
#> total_qtrly_wages <dbl>, taxable_qtrly_wages <dbl>, qtrly_contributions
#> <dbl>, avg_wkly_wage <int>, lq_disclosure_codes <fctr>, lq_qtrly_estabs
#> <dbl>, lq_month1_emplvl <dbl>, lq_month2_emplvl <dbl>, lq_month3_emplvl
#> <dbl>, lq_total_qtrly_wages <dbl>, lq_taxable_qtrly_wages <dbl>,
#> lq_qtrly_contributions <dbl>, lq_avg_wkly_wage <dbl>,
#> oty_disclosure_code <fctr>, oty_qtrly_estabs_chg <int>,
#> oty_qtrly_estabs_pct_chg <dbl>, oty_month1_emplvl_chg <int>,
#> oty_month1_emplvl_pct_chg <dbl>, oty_month2_emplvl_chg <int>,
#> oty_month2_emplvl_pct_chg <dbl>, oty_month3_emplvl_chg <int>,
#> oty_month3_emplvl_pct_chg <dbl>, oty_total_qtrly_wages_chg <dbl>,
#> oty_total_qtrly_wages_pct_chg <dbl>, oty_taxable_qtrly_wages_chg <dbl>,
#> oty_taxable_qtrly_wages_pct_chg <dbl>, oty_qtrly_contributions_chg
#> <int>, oty_qtrly_contributions_pct_chg <dbl>, oty_avg_wkly_wage_chg
#> <int>, oty_avg_wkly_wage_pct_chg <dbl>.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.