Giter VIP home page Giter VIP logo

qcew's Introduction

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.

qcew's People

Contributors

trentlthompson avatar

Watchers

 avatar

Forkers

firmai-research

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.