qcew


Nameqcew JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://github.com/TrentLThompson/qcew
SummaryA package for retrieving Quarterly Census of Employment and Wages (QCEW) data.
upload_time2023-05-16 17:49:50
maintainer
docs_urlNone
authorTrent Thompson
requires_python>= 3.8
license
keywords qcew bls employment wages statistics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # qcew

A package for retrieving Quarterly Census of Employment and Wages ([QCEW](https://www.bls.gov/cew/)) data from the Bureau of Labor Statistics' [database](https://www.bls.gov/cew/downloadable-data-files.htm).

## Requirements
- Python ≥ 3.8

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install qcew.

```bash
pip install qcew
```

## Usage

```python
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](/LICENSE) for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/TrentLThompson/qcew",
    "name": "qcew",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">= 3.8",
    "maintainer_email": "",
    "keywords": "QCEW,BLS,employment,wages,statistics",
    "author": "Trent Thompson",
    "author_email": "808trent@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2c/6c/bcf55e8a553973e2b2ade3c8851073189b71f489b6181982501fadc2e392/qcew-1.0.4.tar.gz",
    "platform": null,
    "description": "# qcew\n\nA package for retrieving Quarterly Census of Employment and Wages ([QCEW](https://www.bls.gov/cew/)) data from the Bureau of Labor Statistics' [database](https://www.bls.gov/cew/downloadable-data-files.htm).\n\n## Requirements\n- Python \u2265 3.8\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install qcew.\n\n```bash\npip install qcew\n```\n\n## Usage\n\n```python\nimport qcew\n\n# Get the entire quarterly census of employment and wages database for 2020.\ndata = qcew.get_qcew_data(\n    year=\"2020\",\n    annual=False,\n    fields=None\n)\n\n# Get annual average employment and pay data for the United States from 2001 to 2021.\ndata = qcew.get_qcew_data_slice(\n    slice_type=\"area\",\n    qcew_codes=[\"US000\"],\n    years=[str(i) for i in range(2001, 2022)],\n    annual_data=True,\n    fields=[\n        \"area_fips\",\n        \"own_code\",\n        \"industry_code\",\n        \"year\",\n        \"disclosure_code\",\n        \"annual_avg_emplvl\",\n        \"avg_annual_pay\"\n        ]\n    )\n\n# Get monthly employment data for the state of Hawaii as well as Honolulu County, HI in 2020.\ndata = qcew.get_qcew_data_slice(\n    slice_type=\"area\",\n    qcew_codes=[\n        \"15000\", # Hawaii -- Statewide\n        \"15003\", # Honolulu County, HI\n        ],\n    years=[\"2020\"],\n    annual_data=False,\n    fields=[\n        \"area_fips\",\n        \"own_code\",\n        \"industry_code\",\n        \"year\",\n        \"qtr\",\n        \"disclosure_code\",\n        \"month1_emplvl\",\n        \"month2_emplvl\",\n        \"month3_emplvl\"\n        ]\n    )\n\n# Get annual average employment and pay data for the manufacturing sector as a whole from 2010 to 2020.\ndata = qcew.get_qcew_data_slice(\n    slice_type=\"industry\",\n    qcew_codes=[\n        \"31-33\", # NAICS code for manufacturing sector.\n        ],\n    years=[str(i) for i in range(2010, 2021)],\n    annual_data=True,\n    fields=[\n        \"area_fips\",\n        \"own_code\",\n        \"industry_code\",\n        \"year\",\n        \"disclosure_code\",\n        \"annual_avg_emplvl\",\n        \"avg_annual_pay\"\n        ]\n    )\n\n# Get monthly employment data for establishments with fewer than 5 employees in the first quarter of 2021.\ndata = qcew.get_qcew_data_slice(\n    slice_type=\"size\",\n    qcew_codes=[\n        \"1\", # Size code for establishments with fewer than 5 employees.\n        ],\n    years=[\"2021\"],\n    annual_data=False,\n    fields=[\n        \"area_fips\",\n        \"own_code\",\n        \"industry_code\",\n        \"size_code\",\n        \"year\",\n        \"qtr\",\n        \"disclosure_code\",\n        \"month1_emplvl\",\n        \"month2_emplvl\",\n        \"month3_emplvl\"\n        ]\n    )\n```\n\n## License\nDistributed under the MIT license. See [LICENSE](/LICENSE) for more information.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A package for retrieving Quarterly Census of Employment and Wages (QCEW) data.",
    "version": "1.0.4",
    "project_urls": {
        "Homepage": "https://github.com/TrentLThompson/qcew"
    },
    "split_keywords": [
        "qcew",
        "bls",
        "employment",
        "wages",
        "statistics"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "492fd8c90ca871e6ec69700b4b0aa6f54a5a83b48af92482ce63b7a99262ad1c",
                "md5": "e33f6a9e6118c52f9ed7f71c2a3f1dfa",
                "sha256": "4c1fad617cc5256b28bd2111363920b6eb09dc48cb4d512e35c58f48596b89f6"
            },
            "downloads": -1,
            "filename": "qcew-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e33f6a9e6118c52f9ed7f71c2a3f1dfa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">= 3.8",
            "size": 6403,
            "upload_time": "2023-05-16T17:49:48",
            "upload_time_iso_8601": "2023-05-16T17:49:48.524285Z",
            "url": "https://files.pythonhosted.org/packages/49/2f/d8c90ca871e6ec69700b4b0aa6f54a5a83b48af92482ce63b7a99262ad1c/qcew-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2c6cbcf55e8a553973e2b2ade3c8851073189b71f489b6181982501fadc2e392",
                "md5": "2f768945104c945f244d6ea9cbcadb73",
                "sha256": "8517c8803f83f3e07fbe78fb2f34d0eb07398325942a1e0a40a4f191955393ad"
            },
            "downloads": -1,
            "filename": "qcew-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "2f768945104c945f244d6ea9cbcadb73",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">= 3.8",
            "size": 6368,
            "upload_time": "2023-05-16T17:49:50",
            "upload_time_iso_8601": "2023-05-16T17:49:50.386513Z",
            "url": "https://files.pythonhosted.org/packages/2c/6c/bcf55e8a553973e2b2ade3c8851073189b71f489b6181982501fadc2e392/qcew-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-16 17:49:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TrentLThompson",
    "github_project": "qcew",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "qcew"
}
        
Elapsed time: 0.06748s