This function queries the US Department of Labor Health and Safety Datasets. The datasets currently use V1 of DOL API.
dol_hsd(dataset = 1, sheet = 1, key = Sys.getenv("DOL_KEY"))
There are currently 13 datasets to choose from. Specify the one you want with a number from 1-13.
Injuries and Illness
Gulf Oil Spill
DOL OSHA Compliance
MSHA Employment Production
Mine Violation
Fatal Occupational Injuries
DOL OSHA Enforcement V2
Auto Workers
Safety and Health
Full Mine Information
Basic Mine Information
Mine Accident Injuries
Mine Inspections
For each dataset chosen, there are sub sheets within them. You must specify which sub-sheet you want. For example, if you chose Gulf Oil Spill, there are the subsheets, 1) OSHA_Direct_Read_Sampling Table as well as 2) OSHA_NOISE_REPORT Table.
The API key for this user. You must go to the DOL and sign up for an account and request for an API key.
A dataframe