{ "info": { "author": "Jeremy A. Seibert", "author_email": "Jaseibert2@eagles.usi.edu", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Federal Package\n\nThis is a simple module built on top of Pandas-Datareader to make it easer to pull in Federal Reserve Data from the Federal Reserve in St. Louis (FRED).\n\n## Installation\n\n`pip install Federal`\n\n## Basic Usage:\n\n```python\n\n# Import the GDP and DateFormatter Modules\nfrom Federal.Econ import GDP\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the GDP and DateFormatter Objects\ng = GDP()\nd = DateFormatter()\n\n#Set your Start & End Dates\nd.start_date(1900,1,1)\nd.end_date(2018,1,1)\n\n# Make the Call\ndf = g.metro_gdp(name='Houston')\ndf.head()\n```\n\n## Setting Start & End Dates\n\nOnce imported, you declare the start date and end date via the `DateFormatter.start_date()` and `DateFormatter.end_date()` functions. These functions define the range of dates for the data that you are for. Once declared these values will be applied to each query unless explicitly changed.\n\nThere are several different DateTime format variants that the `DateFormatter.start_date()` and `DateFormatter.end_date()` functions accept:\n\n1. DateTime format: (Year, Month, Day): **Integer**\n```python\n# Import the DateFormatter Modules\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the DateFormatter Object\nd = DateFormatter()\n\nd.start_date(1900,1,1)\nd.end_date(2018,1,1)\n```\n\n2. DateTime format: (Day/Month/Year): **String**\n```python\n# Import the DateFormatter Modules\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the DateFormatter Object\nd = DateFormatter()\n\nd.start_date('1/1/1900')\nd.end_date('1/1/2018')\n```\n\n3. DateTime format: (Day-Month-Year): **String**\n```python\n# Import the DateFormatter Modules\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the DateFormatter Object\nd = DateFormatter()\n\nd.start_date('1-1-1900')\nd.end_date('1-1-2018')\n```\n\n4. DateTime format: (Day.Month.Year): **String**\n```python\n# Import the DateFormatter Modules\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the DateFormatter Object\nd = DateFormatter()\n\nd.start_date('1.1.1900')\nd.end_date('1.1.2018')\n```\n\n5. DateTime format: (Month/Day/Year): **String**\n```python\n# Import the DateFormatter Modules\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the DateFormatter Object\nd = DateFormatter()\n\nd.start_date('14/1/1900')\nd.end_date('16/1/2018')\n```\n\n### National Gross Domestic Product (GDP)\n\nAfter instantiating a FRED object, and defining the start and end dates using the `GDP.start_date()` and `GDP.end_date()` functions you can use the function `GDP.national_gdp()` depending on its parameters to return either nominal GDP or real GDP.\n\n```python\n# Import the GDP and DateFormatter Modules\nfrom Federal.Econ import GDP\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the GDP and DateFormatter Objects\ng = GDP()\nd = DateFormatter()\n\n#Set Dates\nd.start_date('1/1/1900')\nd.end_date('1/1/2018')\n\n# Real GDP\ndf = g.national_gdp()\ndf.head()\n\n# Nominal GDP\ndf = g.national_gdp(nominal=True)\ndf.head()\n```\n\n### State Gross Domestic Product (GSP)\n\nSimilar to the `GDP.national_gdp()` after making the necessary calls you can pull in information around State-Level GDP using the `GDP.state_gdp()` function. It requires one argument, which is the two-character string representing the state of interest. In the case below we pull the state GDP for Indiana.\n\n```python\n# Import the GDP and DateFormatter Modules\nfrom Federal.Econ import GDP\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the GDP and DateFormatter Objects\ng = GDP()\nd = DateFormatter()\n\n#Set the Dates\nd.start_date('1/1/1900')\nd.end_date('1/1/2018')\n\n# State GDP\ndf = g.state_gdp('IN')\ndf.head()\n```\n\n### Metropolitan Gross Domestic Product (GMP)\n\nThe final variation of GDP that the FRED module pulls in is Metropolitan-Level GDP. The Federal Reserve uses Core-Based Statistical Area (CBSA) Codes to define each metro within their API. Here using the `GDP.metro_gdp()` function you can either pass the CBSA code or a name of a metro area as arguments within the function. Beyond this, similar to national GDP, by passing `GDP.metro_gdp(name='',nominal=True)` with nominal equal to True, the function will return the nominal metro GDP.\n\n\n```python\n# Import the GDP and DateFormatter Modules\nfrom Federal.Econ import GDP\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the GDP and DateFormatter Objects\ng = GDP()\nd = DateFormatter()\n\n#Set the Dates\nd.start_date('1/1/1900')\nd.end_date('1/1/2018')\n\n# Metropolitan GDP - Passing the City Name as an argument\ndf = g.metro_gdp(name='Houston')\ndf.head()\n\n# Metropolitan GDP - Passing the CBSA code as an argument\ndf = g.metro_gdp(cbsa=26420)\ndf.head()\n\n# Metropolitan GDP - nominal\ndf = g.metro_gdp(cbsa=26420, nominal=True)\ndf.head()\n\n# Metropolitan GDP - nominal\ndf = g.metro_gdp(name='Houston', nominal=True)\ndf.head()\n```\n### National Unemployment\n\nUnemployment is defined by the `Unemployment.national_unemp()` function. This function takes an argument `sa` which returns either seasonally-adjusted non seasonally-adjusted unemployment.\n\n```python\n# Import the GDP and DateFormatter Modules\nfrom Federal.Econ import Unemployment\nfrom Federal.Formatter import DateFormatter\n\n#Insatiate the GDP and DateFormatter Objects\nu = Unemployment()\nd = DateFormatter()\n\n#Set the Dates\nd.start_date('1/1/1900')\nd.end_date('1/1/2018')\n\n# Seasonally-Adjusted National Unemployment\ndf = u.national_unemp(sa=True)\ndf.head()\n\n# Non Seasonally-Adjusted National Unemployment\ndf = u.national_unemp(sa=False)\ndf.head()\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/Jaseibert/Federal", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "Federal", "package_url": "https://pypi.org/project/Federal/", "platform": "", "project_url": "https://pypi.org/project/Federal/", "project_urls": { "Homepage": "https://github.com/Jaseibert/Federal" }, "release_url": "https://pypi.org/project/Federal/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "A wrapper on to the pandas-datareader package for easier handling of federal reserve (FRED) data", "version": "1.0.1" }, "last_serial": 4817229, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "441af6cfe97425e9e41a58009e6f1f57", "sha256": "63bca8a5079c59e4901dd6302bf670149176ecc4610ed53e0417d09d5602a026" }, "downloads": -1, "filename": "Federal-0.0.1-py3.7.egg", "has_sig": false, "md5_digest": "441af6cfe97425e9e41a58009e6f1f57", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": null, "size": 17790, "upload_time": "2019-02-11T06:42:09", "url": "https://files.pythonhosted.org/packages/d0/2e/9453ed2c7ec00d9d97bbce63989c65f4ed4431a3c97fb2757ef0f6929f27/Federal-0.0.1-py3.7.egg" }, { "comment_text": "", "digests": { "md5": "77c324bfe29bdbfeca93cb69f7b9af91", "sha256": "318ea2350faff8d90e564ede969ca691948e92a9f74349c92412a2725f717ce9" }, "downloads": -1, "filename": "Federal-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "77c324bfe29bdbfeca93cb69f7b9af91", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2186, "upload_time": "2019-02-11T06:42:07", "url": "https://files.pythonhosted.org/packages/e2/03/eac676c7c9062059a051524e93b8c852e52090682ddacd5034308a7e3245/Federal-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b39965a6dcdb06cfd1275fa39abfbd01", "sha256": "f9d91555545d00197908ae7a346218921241b8559f6f224d1c607eea8210a18e" }, "downloads": -1, "filename": "Federal-0.0.1.tar.gz", "has_sig": false, "md5_digest": "b39965a6dcdb06cfd1275fa39abfbd01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8657, "upload_time": "2019-02-11T06:42:10", "url": "https://files.pythonhosted.org/packages/26/ec/f4f19b15631ea1b0cd7472561706f53ddc81100f99d1caeb70e34b4a28e6/Federal-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "29fa9b378e8bf258a87d89379b5f187f", "sha256": "527fec7dac5839e0bc56cbbcce7cbd2a08ac7bba49f85461d849581725f38762" }, "downloads": -1, "filename": "Federal-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "29fa9b378e8bf258a87d89379b5f187f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10047, "upload_time": "2019-02-11T06:52:34", "url": "https://files.pythonhosted.org/packages/85/81/227bbca037baa8b0c2ce5b0667eccdb426a0bbc269340777af3aaa3d411a/Federal-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3b83b33d0a500e526e688a243a8bc50f", "sha256": "6bbd879fa76e00dd2b318875f49b922e54c9a609c2e65bfaf73f381f5e08e4f2" }, "downloads": -1, "filename": "Federal-0.0.2.tar.gz", "has_sig": false, "md5_digest": "3b83b33d0a500e526e688a243a8bc50f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8660, "upload_time": "2019-02-11T06:52:35", "url": "https://files.pythonhosted.org/packages/ea/ad/e4c2f93cd0d3a76d32caf032f469ede60d13dce5d3aa298e61aead36caf9/Federal-0.0.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "775646916dea41119e7f58fee376a11e", "sha256": "6f2a9133ff9644ceb5c709ef3ca8af6956b75af92b78a6f3fb16366312a9a243" }, "downloads": -1, "filename": "Federal-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "775646916dea41119e7f58fee376a11e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17651, "upload_time": "2019-02-13T04:37:55", "url": "https://files.pythonhosted.org/packages/e5/b8/3afe62306a4c1b92ba8aa5754730bc5b9b89759125b4a122bb6ff07835f7/Federal-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d28f2f4f8352c68559b1baaa42dcbe23", "sha256": "7906ec7ab51729603237c3a8258d19f4f307a2537b31fdc8b10c5d3223e9c42f" }, "downloads": -1, "filename": "Federal-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d28f2f4f8352c68559b1baaa42dcbe23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9261, "upload_time": "2019-02-13T04:38:00", "url": "https://files.pythonhosted.org/packages/f8/8c/3059a6e9c5adf6e664f9bf89f4b6fedac3aa09794a6e4e4a522ce4374bf2/Federal-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "7ba4055f876ab05b757189fe00ae7fca", "sha256": "08777b069cdbb83ac918b79902baa610ebbedb1c7efdf4f4852328f8d5ed1e8e" }, "downloads": -1, "filename": "Federal-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7ba4055f876ab05b757189fe00ae7fca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17648, "upload_time": "2019-02-13T19:55:37", "url": "https://files.pythonhosted.org/packages/65/90/64c357d6faa1ae5c5463e233a50e451518676a2f8f3baaf1c9ba3891c827/Federal-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1f1ac68de15ac8cb6aab4a96c1e8b6b3", "sha256": "10fbd63e0b9eec741fbb5e74fc623c7660fce23dc0a355ce2633bbdc376f92d0" }, "downloads": -1, "filename": "Federal-1.0.1.tar.gz", "has_sig": false, "md5_digest": "1f1ac68de15ac8cb6aab4a96c1e8b6b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13450, "upload_time": "2019-02-13T19:55:38", "url": "https://files.pythonhosted.org/packages/0e/e2/5d1ca569625194e5fd55b880fb38879f3829231786cc9db151e5ccd16ef3/Federal-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7ba4055f876ab05b757189fe00ae7fca", "sha256": "08777b069cdbb83ac918b79902baa610ebbedb1c7efdf4f4852328f8d5ed1e8e" }, "downloads": -1, "filename": "Federal-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "7ba4055f876ab05b757189fe00ae7fca", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 17648, "upload_time": "2019-02-13T19:55:37", "url": "https://files.pythonhosted.org/packages/65/90/64c357d6faa1ae5c5463e233a50e451518676a2f8f3baaf1c9ba3891c827/Federal-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1f1ac68de15ac8cb6aab4a96c1e8b6b3", "sha256": "10fbd63e0b9eec741fbb5e74fc623c7660fce23dc0a355ce2633bbdc376f92d0" }, "downloads": -1, "filename": "Federal-1.0.1.tar.gz", "has_sig": false, "md5_digest": "1f1ac68de15ac8cb6aab4a96c1e8b6b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13450, "upload_time": "2019-02-13T19:55:38", "url": "https://files.pythonhosted.org/packages/0e/e2/5d1ca569625194e5fd55b880fb38879f3829231786cc9db151e5ccd16ef3/Federal-1.0.1.tar.gz" } ] }