Skip to content

blscrapeR

An API Wrapper for the United States Bureau of Labor Statistics

v4.0.1 · Mar 17, 2024 · MIT + file LICENSE

Description

Scrapes various data from <https://www.bls.gov/>. The Bureau of Labor Statistics is the statistical branch of the United States Department of Labor. The package has additional functions to help parse, analyze and visualize the data.

Downloads

459

Last 30 days

8366th

1.4K

Last 90 days

7.7K

Last year

Trend: -18.3% (30d vs prior 30d)

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang ERROR
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (2 non-OK)
ERROR r-devel-linux-x86_64-fedora-clang

examples

Running examples in ‘blscrapeR-Ex.R’ failed
The error most likely occurred in:

> ### Name: dateCast
> ### Title: Cast a date column to data frame returned by the bls_api()
> ###   function
> ### Aliases: dateCast
> 
> ### ** Examples
> 
> 
> ## Cast a date column to data frame returned by the bls_api() function.
> df <- bls_api("LAUCN040010000000005") %>%
+ dateCast()
Error in curl::curl_fetch_memory(url, handle = handle) : 
  Failure when receiving data from the peer [api.bls.gov]:
Recv failure: Connection reset by peer
Calls: %>% ... request_fetch.write_memory -> <Anonymous> -> raise_libcurl_error
Execution halted
ERROR r-devel-linux-x86_64-fedora-clang

tests

Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(blscrapeR)
  > 
  > test_check("blscrapeR")
  Saving _problems/test_bls_api-19.R
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_bls_api.R:19:1'): (code run outside of `test_that()`) ──────────
  <curl_error_recv_error/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Failure when receiving data from the peer [api.bls.gov]:
  Recv failure: Connection reset by peer
  Backtrace:
      ▆
   1. ├─httr::content(POST(base_url, body = payload, content_type_json())) at test_bls_api.R:19:1
   2. │ ├─base::stopifnot(is.response(x))
   3. │ └─httr:::is.response(x)
   4. ├─httr::POST(base_url, body = payload, content_type_json())
   5. │ └─httr:::request_perform(req, hu$handle$handle)
   6. │   ├─httr:::request_fetch(req$output, req$url, handle)
   7. │   └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   8. │     └─curl::curl_fetch_memory(url, handle = handle)
   9. └─curl:::raise_libcurl_error(...)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]
  Error:
  ! Test failures.
  Execution halted

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 30, 2026
ERROR r-devel-linux-x86_64-fedora-clang

examples

Running examples in ‘blscrapeR-Ex.R’ failed
The error most likely occurred in:

> ### Name: dateCast
> ### Title: Cast a date column to data frame returned by the bls_api()
> ###   function
> ### Aliases: dateCast
> 
> ### ** Examples
> 
> 
> ## Cast
...[truncated]...
ror in curl::curl_fetch_memory(url, handle = handle) : 
  Failure when receiving data from the peer [api.bls.gov]:
Recv failure: Connection reset by peer
Calls: %>% ... request_fetch.write_memory -> <Anonymous> -> raise_libcurl_error
Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies httr jsonlite magrittr dplyr purrr tibble stringr blscrapeR

Version History

new 4.0.1 Mar 10, 2026
updated 4.0.1 ← 3.2.2 diff Mar 16, 2024
updated 3.2.2 ← 3.2.0 diff Sep 16, 2022
updated 3.2.0 ← 3.1.6 diff Dec 16, 2019
updated 3.1.6 ← 3.1.5 diff Jan 28, 2019
updated 3.1.5 ← 3.1.3 diff Jan 22, 2019
updated 3.1.3 ← 3.1.2 diff Jul 9, 2018
updated 3.1.2 ← 3.1.1 diff Mar 15, 2018
updated 3.1.1 ← 3.0.1 diff Nov 21, 2017
updated 3.0.1 ← 3.0.0 diff Oct 4, 2017
updated 3.0.0 ← 2.1.5 diff Aug 18, 2017
updated 2.1.5 ← 2.1.4 diff Jun 19, 2017
updated 2.1.4 ← 2.1.2 diff May 4, 2017
updated 2.1.2 ← 2.1.1 diff Feb 3, 2017
updated 2.1.1 ← 2.0.0 diff Jan 26, 2017
updated 2.0.0 ← 1.0.2 diff Dec 16, 2016
updated 1.0.2 ← 1.0.1 diff Oct 9, 2016
updated 1.0.1 ← 0.4.2 diff Oct 2, 2016
updated 0.4.2 ← 0.4.1 diff Jul 28, 2016
new 0.4.1 Jul 23, 2016