qcew
A package for retrieving Quarterly Census of Employment and Wages (QCEW) data from the Bureau of Labor Statistics' database.
Requirements
- Python ≥ 3.8
Installation
Use the package manager pip to install qcew.
pip install qcew
Usage
import qcew
# Get the entire quarterly census of employment and wages database for 2020.
data = qcew.get_qcew_data(
year="2020",
annual=False,
fields=None
)
# Get annual average employment and pay data for the United States from 2001 to 2021.
data = qcew.get_qcew_data_slice(
slice_type="area",
qcew_codes=["US000"],
years=[str(i) for i in range(2001, 2022)],
annual_data=True,
fields=[
"area_fips",
"own_code",
"industry_code",
"year",
"disclosure_code",
"annual_avg_emplvl",
"avg_annual_pay"
]
)
# Get monthly employment data for the state of Hawaii as well as Honolulu County, HI in 2020.
data = qcew.get_qcew_data_slice(
slice_type="area",
qcew_codes=[
"15000", # Hawaii -- Statewide
"15003", # Honolulu County, HI
],
years=["2020"],
annual_data=False,
fields=[
"area_fips",
"own_code",
"industry_code",
"year",
"qtr",
"disclosure_code",
"month1_emplvl",
"month2_emplvl",
"month3_emplvl"
]
)
# Get annual average employment and pay data for the manufacturing sector as a whole from 2010 to 2020.
data = qcew.get_qcew_data_slice(
slice_type="industry",
qcew_codes=[
"31-33", # NAICS code for manufacturing sector.
],
years=[str(i) for i in range(2010, 2021)],
annual_data=True,
fields=[
"area_fips",
"own_code",
"industry_code",
"year",
"disclosure_code",
"annual_avg_emplvl",
"avg_annual_pay"
]
)
# Get monthly employment data for establishments with fewer than 5 employees in the first quarter of 2021.
data = qcew.get_qcew_data_slice(
slice_type="size",
qcew_codes=[
"1", # Size code for establishments with fewer than 5 employees.
],
years=["2021"],
annual_data=False,
fields=[
"area_fips",
"own_code",
"industry_code",
"size_code",
"year",
"qtr",
"disclosure_code",
"month1_emplvl",
"month2_emplvl",
"month3_emplvl"
]
)
License
Distributed under the MIT license. See LICENSE for more information.
Metadata
Release files for qcew 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qcew-1.0.4.tar.gz | 6.4 kB | Without provenance | Details for qcew-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qcew-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for qcew-1.0.4-py3-none-any.whl |
Total release size: 12.8 kB
Release files / qcew-1.0.4.tar.gz
| Download URL | qcew-1.0.4.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8517c8803f83f3e07fbe78fb2f34d0eb07398325942a1e0a40a4f191955393ad
|
|
BLAKE2b-256 checksum How to use checksums |
2c6cbcf55e8a553973e2b2ade3c8851073189b71f489b6181982501fadc2e392
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / qcew-1.0.4-py3-none-any.whl
| Download URL | qcew-1.0.4-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c1fad617cc5256b28bd2111363920b6eb09dc48cb4d512e35c58f48596b89f6
|
|
BLAKE2b-256 checksum How to use checksums |
492fd8c90ca871e6ec69700b4b0aa6f54a5a83b48af92482ce63b7a99262ad1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for qcew 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.