This patch updates BLSloadR to better address 403 and other download errors with to updates.
fread_bls()Because some BLS series update only infrequently, using a local file cache reduces demand for regularly re-downloading data from the BLS.
BLS_CACHE_DIR can be set to a file path to use as the BLSloadR cache folder. If this is not set, but caching is selected, the system will default to the path given by tools::R_user_dir("BLSloadR", which = "cache")USE_BLS_CACHE can be used to allow functions to default to using the cache, without needing to manually set an argument in each call.cache=TRUE argument in your function call or set the USE_BLS_CACHE environment variable to "TRUE"In addition to implementing a local file cache, some improvements have been made to the operation of fread_bls() behind the scenes to more efficiently check BLS files for issues like phantom columns. It is becoming evident that with the implementation of a local cache for files this is now the slowest part of the process, so future enhancements may include options to skip some of this processing for files where the BLS file structure is already known and verified.
Added fast_read option in get_oews() to improve function performance. This option pasrses the series_id within the data file instead of reading in the full series file in order to avoid redundant downloads.
Added vignette documenting use of file cache.
Added article describing usage of get_qcew()
load_bls_dataset():which_data argument to this function, which allows use of this function in a pipeline without needing manual entry in the console for any BLS datasets which have exactly 1 series file and at most 1 aspect file.get_salt()get_ces() - Major performance improvements with new filtering options:states parameter: Download data for specific states only (90%+ faster than full download)industry_filter parameter: Focus on specific industries (retail_trade, manufacturing, etc.)current_year_only parameter: Get only recent data (2006-present) instead of complete historyget_national_ces() - New specialized dataset options for optimal performance:dataset_filter parameter with 4 options: all_data, current_seasonally_adjusted, real_earnings_all_employees, real_earnings_productionget_qcew() - New function designed to access the Quarterly Census of Employment and Wages(QCEW):list_ces_states() - List available states for filteringlist_ces_industries() - List available industry filters with descriptionsshow_ces_options() - Comprehensive usage guide for CES optionslist_national_ces_options() - List national dataset filter optionsshow_national_ces_options() - Usage guide for national CES datasetsarea_lookup data table has details on QCEW area codes to pre-filter data requests.ind_lookup data table has details on NAICS codes used in QCEW files.download_bls_files() (downloads[['key']] vs downloads\$key)suppress_warnings instead of mixed naming)show_warnings changed to suppress_warnings in get_national_ces() for consistencyAny scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.