Skip Navigation

US National Employment Hours and Earnings

labor statistics employment hours earnings national

The Current Employment Statistics (CES) program produces detailed industry estimates of nonfarm employment, hours, and earnings of workers on payrolls in the United States.

README containing file for detailed information about this dataset is available at original dataset location.

This dataset is sourced from Current Employment Statistics - CES (National) data published by US Bureau of Labor Statistics (BLS). Review Linking and Copyright Information and Important Web Site Notices for the terms and conditions related to the use this dataset.

Storage Location

This dataset is stored in the East US Azure region. Allocating compute resources in East US is recommended for affinity.

Notices

MICROSOFT PROVIDES AZURE OPEN DATASETS ON AN “AS IS” BASIS. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, GUARANTEES OR CONDITIONS WITH RESPECT TO YOUR USE OF THE DATASETS. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAW, MICROSOFT DISCLAIMS ALL LIABILITY FOR ANY DAMAGES OR LOSSES, INCLUDING DIRECT, CONSEQUENTIAL, SPECIAL, INDIRECT, INCIDENTAL OR PUNITIVE, RESULTING FROM YOUR USE OF THE DATASETS.

This dataset is provided under the original terms that Microsoft received source data. The dataset may include data sourced from Microsoft.

Access

Available inWhen to use
Azure Notebooks

Quickly explore the dataset with Jupyter notebooks hosted on Azure or your local machine.

Azure Databricks

Use this when you need the scale of an Azure managed Spark cluster to process the dataset.

Azure Synapse

Use this when you need the scale of an Azure managed Spark cluster to process the dataset.

Preview

data_type_code industry_code supersector_code series_id year period value footnote_codes seasonal series_title supersector_name industry_name data_type_text
26 5000000 5 CES0500000026 1939 M04 52 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
26 5000000 5 CES0500000026 1939 M05 65 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
26 5000000 5 CES0500000026 1939 M06 74 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
26 5000000 5 CES0500000026 1939 M07 103 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
26 5000000 5 CES0500000026 1939 M08 108 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
26 5000000 5 CES0500000026 1939 M09 152 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
26 5000000 5 CES0500000026 1939 M10 307 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
26 5000000 5 CES0500000026 1939 M11 248 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
26 5000000 5 CES0500000026 1939 M12 151 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
26 5000000 5 CES0500000026 1940 M01 44 nan S All employees, 3-month average change, seasonally adjusted, thousands, total private, seasonally adjusted Total private Total private ALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
Name Data type Unique Values (sample) Description
data_type_code string 37 1
10

See https://download.bls.gov/pub/time.series/ce/ce.datatype

data_type_text string 37 ALL EMPLOYEES, THOUSANDS
WOMEN EMPLOYEES, THOUSANDS

See See https://download.bls.gov/pub/time.series/ce/ce.datatype

footnote_codes string 2 nan
P
industry_code string 902 30000000
32000000

Different industries covered. See https://download.bls.gov/pub/time.series/ce/ce.industry

industry_name string 895 Durable goods
Nondurable goods

Different industries covered. See https://download.bls.gov/pub/time.series/ce/ce.industry

period string 13 M03
M06

See https://download.bls.gov/pub/time.series/ce/ce.period

seasonal string 2 U
S
series_id string 26,021 CEU9091000001
CEU3100000008

Different types of data series available in the dataset. See https://download.bls.gov/pub/time.series/ce/ce.series

series_title string 25,685 All employees, thousands, durable goods, not seasonally adjusted
All employees, thousands, nondurable goods, not seasonally adjusted

Title of the different types of data series available in the dataset. See https://download.bls.gov/pub/time.series/ce/ce.series

supersector_code string 22 31
60

Higher level industry or sector classification. See https://download.bls.gov/pub/time.series/ce/ce.supersector

supersector_name string 22 Durable Goods
Professional and business services

Higher level industry or sector classification. See https://download.bls.gov/pub/time.series/ce/ce.supersector

value float 572,372 38.5
38.400001525878906
year int 81 2017
2012

Select your preferred service:

Azure Notebooks

Azure Databricks

Azure Synapse

Azure Notebooks

Package: Language: Python Python
In [1]:
# This is a package in preview.
from azureml.opendatasets import UsLaborEHENational

usLaborEHENational = UsLaborEHENational()
usLaborEHENational_df = usLaborEHENational.to_pandas_dataframe()
ActivityStarted, to_pandas_dataframe
ActivityStarted, to_pandas_dataframe_in_worker
Looking for parquet files...
Reading them into Pandas dataframe...
Reading ehe_national/part-00000-tid-148006372733218319-122ceb1f-08a6-4430-acc4-afa8feb00295-6944-1-c000.snappy.parquet under container laborstatisticscontainer
Done.
ActivityCompleted: Activity=to_pandas_dataframe_in_worker, HowEnded=Success, Duration=35903.59 [ms]
ActivityCompleted: Activity=to_pandas_dataframe, HowEnded=Success, Duration=35927.93 [ms]
In [2]:
usLaborEHENational_df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 7616400 entries, 0 to 7616399
Data columns (total 13 columns):
data_type_code      object
industry_code       object
supersector_code    object
series_id           object
year                int32
period              object
value               float32
footnote_codes      object
seasonal            object
series_title        object
supersector_name    object
industry_name       object
data_type_text      object
dtypes: float32(1), int32(1), object(11)
memory usage: 697.3+ MB
In [1]:
# Pip install packages
import os, sys

!{sys.executable} -m pip install azure-storage-blob
!{sys.executable} -m pip install pyarrow
!{sys.executable} -m pip install pandas
In [2]:
# Azure storage access info
azure_storage_account_name = "azureopendatastorage"
azure_storage_sas_token = r""
container_name = "laborstatisticscontainer"
folder_name = "ehe_national/"
In [3]:
from azure.storage.blob import BlockBlobServicefrom azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient

if azure_storage_account_name is None or azure_storage_sas_token is None:
    raise Exception(
        "Provide your specific name and key for your Azure Storage account--see the Prerequisites section earlier.")

print('Looking for the first parquet under the folder ' +
      folder_name + ' in container "' + container_name + '"...')
container_url = f"https://{azure_storage_account_name}.blob.core.windows.net/"
blob_service_client = BlobServiceClient(
    container_url, azure_storage_sas_token if azure_storage_sas_token else None)

container_client = blob_service_client.get_container_client(container_name)
blobs = container_client.list_blobs(folder_name)
sorted_blobs = sorted(list(blobs), key=lambda e: e.name, reverse=True)
targetBlobName = ''
for blob in sorted_blobs:
    if blob.name.startswith(folder_name) and blob.name.endswith('.parquet'):
        targetBlobName = blob.name
        break

print('Target blob to download: ' + targetBlobName)
_, filename = os.path.split(targetBlobName)
blob_client = container_client.get_blob_client(targetBlobName)
with open(filename, 'wb') as local_file:
    blob_client.download_blob().download_to_stream(local_file)
In [4]:
# Read the parquet file into Pandas data frame
import pandas as pd

print('Reading the parquet file into Pandas data frame')
df = pd.read_parquet(filename)
In [5]:
# you can add your filter at below
print('Loaded as a Pandas data frame: ')
df
In [6]:
 

Azure Databricks

Package: Language: Python Python
In [1]:
# This is a package in preview.
from azureml.opendatasets import UsLaborEHENational

usLaborEHENational = UsLaborEHENational()
usLaborEHENational_df = usLaborEHENational.to_spark_dataframe()
Failure while loading azureml_run_type_providers. Failed to load entrypoint azureml.scriptrun = azureml.core.script_run:ScriptRun._from_run_dto with exception (six 1.10.0 (/usr/lib/python3/dist-packages), Requirement.parse('six>=1.11.0')). ActivityStarted, to_spark_dataframe ActivityStarted, to_spark_dataframe_in_worker ActivityCompleted: Activity=to_spark_dataframe_in_worker, HowEnded=Success, Duration=4288.24 [ms] ActivityCompleted: Activity=to_spark_dataframe, HowEnded=Success, Duration=4292.09 [ms]
In [2]:
display(usLaborEHENational_df.limit(5))
data_type_codeindustry_codesupersector_codeseries_idyearperiodvaluefootnote_codesseasonalseries_titlesupersector_nameindustry_namedata_type_text
2600CES0000000026 1939M0457.0nanSAll employees, 3-month average change, seasonally adjusted, thousands, total nonfarm, seasonally adjustedTotal nonfarmTotal nonfarmALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
2600CES0000000026 1939M0566.0nanSAll employees, 3-month average change, seasonally adjusted, thousands, total nonfarm, seasonally adjustedTotal nonfarmTotal nonfarmALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
2600CES0000000026 1939M0674.0nanSAll employees, 3-month average change, seasonally adjusted, thousands, total nonfarm, seasonally adjustedTotal nonfarmTotal nonfarmALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
2600CES0000000026 1939M07108.0nanSAll employees, 3-month average change, seasonally adjusted, thousands, total nonfarm, seasonally adjustedTotal nonfarmTotal nonfarmALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
2600CES0000000026 1939M08121.0nanSAll employees, 3-month average change, seasonally adjusted, thousands, total nonfarm, seasonally adjustedTotal nonfarmTotal nonfarmALL EMPLOYEES, 3-MONTH AVERAGE CHANGE, SEASONALLY ADJUSTED, THOUSANDS
In [1]:
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "laborstatisticscontainer"
blob_relative_path = "ehe_national/"
blob_sas_token = r""
In [2]:
# Allow SPARK to read from Blob remotely
wasbs_path = 'wasbs://%s@%s.blob.core.windows.net/%s' % (blob_container_name, blob_account_name, blob_relative_path)
spark.conf.set(
  'fs.azure.sas.%s.%s.blob.core.windows.net' % (blob_container_name, blob_account_name),
  blob_sas_token)
print('Remote blob path: ' + wasbs_path)
In [3]:
# SPARK read parquet, note that it won't load any data yet by now
df = spark.read.parquet(wasbs_path)
print('Register the DataFrame as a SQL temporary view: source')
df.createOrReplaceTempView('source')
In [4]:
# Display top 10 rows
print('Displaying top 10 rows: ')
display(spark.sql('SELECT * FROM source LIMIT 10'))

Azure Synapse

Package: Language: Python
In [1]:
# Azure storage access info
blob_account_name = "azureopendatastorage"
blob_container_name = "laborstatisticscontainer"
blob_relative_path = "ehe_national/"
blob_sas_token = r""
In [2]:
# Allow SPARK to read from Blob remotely
wasbs_path = 'wasbs://%s@%s.blob.core.windows.net/%s' % (blob_container_name, blob_account_name, blob_relative_path)
spark.conf.set(
  'fs.azure.sas.%s.%s.blob.core.windows.net' % (blob_container_name, blob_account_name),
  blob_sas_token)
print('Remote blob path: ' + wasbs_path)
In [3]:
# SPARK read parquet, note that it won't load any data yet by now
df = spark.read.parquet(wasbs_path)
print('Register the DataFrame as a SQL temporary view: source')
df.createOrReplaceTempView('source')
In [4]:
# Display top 10 rows
print('Displaying top 10 rows: ')
display(spark.sql('SELECT * FROM source LIMIT 10'))