{ "info": { "author": "Maxim Kupfer", "author_email": "mbkupfer@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Financial and Insurance Industry", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Office/Business", "Topic :: Office/Business :: Financial", "Topic :: Scientific/Engineering" ], "description": "# bls-datasets\nMaking datasets easily accessible to python scripts.\n\n\n\nIntegrated datasets include:\n- [Occupational Employment Statistics (OES)](https://www.bls.gov/oes/)\n- [Quarterly Census of Employment and Wages (QCEW)](https://www.bls.gov/cew/)\n- *Coming soon: Employment Projections and Definition files*\n\nFor looking up BLS data via series-id lookups, please checkout OliverSherouse's library: [BLS](https://github.com/OliverSherouse/bls)\n# Usage\n\n```\n>>> from bls_datasets import oes, qcew\n\n# OES example:\n\n>>> df_oes = oes.get_data(year=2017)\n>>> df_oes.columns\nIndex(['OCC_CODE', 'OCC_TITLE', 'OCC_GROUP', 'TOT_EMP', 'EMP_PRSE', 'H_MEAN',\n 'A_MEAN', 'MEAN_PRSE', 'H_PCT10', 'H_PCT25', 'H_MEDIAN', 'H_PCT75',\n 'H_PCT90', 'A_PCT10', 'A_PCT25', 'A_MEDIAN', 'A_PCT75', 'A_PCT90',\n 'ANNUAL', 'HOURLY'],\n dtype='object')\n\n# Which occupation had the highest total employment in 2017?\n\n>>> detailed = df_oes[df_oes.OCC_GROUP == 'detailed']\n>>> detailed[detailed.TOT_EMP == detailed.TOT_EMP.max()].OCC_TITLE\n772 Retail Salespersons\n\n# QCEW example:\n>>> df_qcew = qcew.get_data('industry', rtype='dataframe', year='2017',\n... qtr='1', industry='10')\n>>> df_qcew.columns\nIndex(['area_fips', 'own_code', 'industry_code', 'agglvl_code', 'size_code',\n 'year', 'qtr', 'disclosure_code', 'qtrly_estabs', 'month1_emplvl',\n 'month2_emplvl', 'month3_emplvl', 'total_qtrly_wages',\n 'taxable_qtrly_wages', 'qtrly_contributions', 'avg_wkly_wage',\n 'lq_disclosure_code', 'lq_qtrly_estabs', 'lq_month1_emplvl',\n 'lq_month2_emplvl', 'lq_month3_emplvl', 'lq_total_qtrly_wages',\n 'lq_taxable_qtrly_wages', 'lq_qtrly_contributions', 'lq_avg_wkly_wage',\n 'oty_disclosure_code', 'oty_qtrly_estabs_chg',\n 'oty_qtrly_estabs_pct_chg', 'oty_month1_emplvl_chg',\n 'oty_month1_emplvl_pct_chg', 'oty_month2_emplvl_chg',\n 'oty_month2_emplvl_pct_chg', 'oty_month3_emplvl_chg',\n 'oty_month3_emplvl_pct_chg', 'oty_total_qtrly_wages_chg',\n 'oty_total_qtrly_wages_pct_chg', 'oty_taxable_qtrly_wages_chg',\n 'oty_taxable_qtrly_wages_pct_chg', 'oty_qtrly_contributions_chg',\n 'oty_qtrly_contributions_pct_chg', 'oty_avg_wkly_wage_chg',\n 'oty_avg_wkly_wage_pct_chg'],\n dtype='object')\n\n# What were the average weekly earnings in Fresno County for 2017 Q1?\n\n# FIPS code, area title\n# 06019, Fresno County, California\n\n>>> fresno = df_qcew[(df_qcew.own_code == 0) & (df_qcew.area_fips == '06019')]\n>>> fresno.avg_wkly_wage.values[0]\n803\n\n\n```\n\n# Installation\n`pip install bls-datasets`\n\n# Documentation\nDocumentation coming soon. Please reference the docstrings in the source code for now.\n\n\n# Notes on datasets\n\n\n**OES**\n\nOES consists of occupational statistics, primarily: employment, age, and salary. To learn more about this survey, you can visit this [link](https://www.bls.gov/oes/oes_emp.htm).\n\nNote that due to idiosyncrasies in earlier OES datasets, this package only allows data access starting in 2014. Earlier files are available, although, they are given different naming patterns, are often broken into multiple excel spreadsheets due to size constraints of older excel version, and they do not always consist of the same datacuts. I will not integrate any earlier years, unless I see it necessary, or receive enough user requests.\n\n**QCEW**\n\nQCEW consists of employer reported occupational statistics. Data can be cut/sliced by area, industry or company size. To learn more about this survey, you can visit this [link](https://www.bls.gov/cew/)\n\n\nCommon gotchas with QCEW data:\n- Datatypes are not always what you expect them to be. Reference the following tables when performing dataframe operations\n - [Quarterly data slice layout](https://data.bls.gov/cew/doc/access/csv_data_slices.htm##QTR_LAYOUT)\n - [Annual averages slice layout](https://data.bls.gov/cew/doc/access/csv_data_slices.htm##ANNUAL_LAYOUT)\n- Due to employer confidentiality, some of the figures may be unavailable. This is especially true when making more granular data cuts. Do check the `disclosure_code` columns for this.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mbkupfer/bls-datasets", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "bls-datasets", "package_url": "https://pypi.org/project/bls-datasets/", "platform": "", "project_url": "https://pypi.org/project/bls-datasets/", "project_urls": { "Homepage": "https://github.com/mbkupfer/bls-datasets" }, "release_url": "https://pypi.org/project/bls-datasets/0.0.9/", "requires_dist": [ "pandas (>=0.23.4)", "xlrd (>=1.1.0)", "requests (>=2.19.1)" ], "requires_python": "", "summary": "Python library for retrieving BLS datasets", "version": "0.0.9" }, "last_serial": 4441516, "releases": { "0.0.8": [ { "comment_text": "", "digests": { "md5": "1f0e92c14e1ad721aad91d59f88a2d0a", "sha256": "e2fa7a7daadf99a4796251c0d908779ede4c19bd3950630ef6aabc2ddf8835c7" }, "downloads": -1, "filename": "bls_datasets-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "1f0e92c14e1ad721aad91d59f88a2d0a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8228, "upload_time": "2018-10-07T14:30:54", "url": "https://files.pythonhosted.org/packages/81/ea/9d744b0fd690d29ac98cb3698fb65038c94d2ab3670104af02780d494cc4/bls_datasets-0.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a1f70df98b6d2c806617e0165a2cac92", "sha256": "0c89a34056ef33520b1fc5294fa50ac2916cf90e44b20200dd1944d6e7a0b4e5" }, "downloads": -1, "filename": "bls_datasets-0.0.8.tar.gz", "has_sig": false, "md5_digest": "a1f70df98b6d2c806617e0165a2cac92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6273, "upload_time": "2018-10-07T14:30:56", "url": "https://files.pythonhosted.org/packages/f3/18/6145ddbf303c45c3e5eef7a78ecfb45d111d2a20460b0f784483e826ecdf/bls_datasets-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "2455d8f775ca5f8a953ee7d4b278a6b6", "sha256": "1333e7d0b6b1ed296fa3af39bb7abcfa209feacb1ecb2bcbf9edba58f2d1a7a4" }, "downloads": -1, "filename": "bls_datasets-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "2455d8f775ca5f8a953ee7d4b278a6b6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8584, "upload_time": "2018-11-01T17:32:34", "url": "https://files.pythonhosted.org/packages/56/c3/61e48cb5373a904a791595ceebc8ea757f0d0cf57d3a7e262912ff244088/bls_datasets-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a1d4a6f9cd9875dc88ed57f385218b0", "sha256": "2ed8bdc09180d61cea49322ac153fd708d6c2a9bcffe2ff2e85c31a72f3e4071" }, "downloads": -1, "filename": "bls_datasets-0.0.9.tar.gz", "has_sig": false, "md5_digest": "7a1d4a6f9cd9875dc88ed57f385218b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6606, "upload_time": "2018-11-01T17:32:35", "url": "https://files.pythonhosted.org/packages/47/d8/f22315571eecc5a9c9ea9173da62b1bbd513b6f4451fac651fe4d478afcb/bls_datasets-0.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2455d8f775ca5f8a953ee7d4b278a6b6", "sha256": "1333e7d0b6b1ed296fa3af39bb7abcfa209feacb1ecb2bcbf9edba58f2d1a7a4" }, "downloads": -1, "filename": "bls_datasets-0.0.9-py3-none-any.whl", "has_sig": false, "md5_digest": "2455d8f775ca5f8a953ee7d4b278a6b6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8584, "upload_time": "2018-11-01T17:32:34", "url": "https://files.pythonhosted.org/packages/56/c3/61e48cb5373a904a791595ceebc8ea757f0d0cf57d3a7e262912ff244088/bls_datasets-0.0.9-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a1d4a6f9cd9875dc88ed57f385218b0", "sha256": "2ed8bdc09180d61cea49322ac153fd708d6c2a9bcffe2ff2e85c31a72f3e4071" }, "downloads": -1, "filename": "bls_datasets-0.0.9.tar.gz", "has_sig": false, "md5_digest": "7a1d4a6f9cd9875dc88ed57f385218b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6606, "upload_time": "2018-11-01T17:32:35", "url": "https://files.pythonhosted.org/packages/47/d8/f22315571eecc5a9c9ea9173da62b1bbd513b6f4451fac651fe4d478afcb/bls_datasets-0.0.9.tar.gz" } ] }