{ "info": { "author": "Sebastien Celles", "author_email": "s.celles@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Cython", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Scientific/Engineering" ], "description": "Welcome to pandas\\_degreedays's documentation!\n==============================================\n\n|Latest Version| |Supported Python versions| |Wheel format| |License|\n|Development Status| |Downloads monthly| |Documentation Status|\n|Sourcegraph| |Gitter| |Code Health| |Build Status|\n\npandas\\_degreedays\n==================\n\nPandas Degree Days (``pandas_degreedays``) is a\n`Python `__ package to calculate `degree\ndays `__.\n\nUsage\n-----\n\nYou must provide a `Pandas\nSeries `__\nwith temperature values.\n\nLet's call ``ts_temp`` this Serie which looks like:\n\n::\n\n datetime\n 2014-03-20 23:00:00 11\n 2014-03-20 23:30:00 11\n 2014-03-21 00:00:00 11\n 2014-03-21 00:30:00 11\n 2014-03-21 01:00:00 11\n 2014-03-21 01:30:00 11\n ...\n 2014-11-01 20:00:00 12\n 2014-11-01 20:30:00 12\n 2014-11-01 21:00:00 12\n 2014-11-01 21:30:00 12\n 2014-11-01 22:00:00 12\n 2014-11-01 22:30:00 12\n Name: temp, Length: 10757\n\nYou can get a time serie with temperature in ``sample`` folder and read\nit using:\n\n::\n\n import pandas as pd\n filename = 'temperature_sample.xls'\n df_temp = pd.read_excel(filename)\n df_temp = df_temp.set_index('datetime')\n ts_temp = df_temp['temp']\n\nYou can also fetch a time serie with temperature from\n`OpenWeatherMap.org `__. You need to\ninstall first\n`openweathermap\\_requests `__.\n\n::\n\n import logging\n logger = logging.getLogger()\n logger.setLevel(logging.DEBUG)\n from pandas_degreedays.provider import TemperatureProvider\n ts_temp = TemperatureProvider('OpenWeatherMap', api_key='').get_from_coordinates(0.34189, 46.5798114, '20120601', '20141215')\n\nWe can see if some data are missing using:\n\n::\n\n idx = ts_temp.index\n s_idx = pd.Series(idx, index=idx)\n diff_idx = s_idx-s_idx.shift(1)\n s_sampling_period = diff_idx.value_counts()\n sampling_period = s_sampling_period.index[0] # most prevalent sampling period\n not_sampling_period = (diff_idx != sampling_period) # True / False\n\nWe can interpolate linearly missing data using:\n\n::\n\n from pandas_degreedays import inter_lin_nan \n ts_temp = inter_lin_nan(ts_temp, '1H') # interpolates linearly NaN\n\nWe can calculate degree days using:\n\n::\n\n from pandas_degreedays import calculate_dd\n df_degreedays = calculate_dd(ts_temp, method='pro', typ='heating', Tref=18.0, group='yearly')\n\n| ``method`` can be :\n| - ``'pro'`` (energy professionals) - this is default calculation\n method - ``'meteo'``\n\n| ``typ`` (calculation type) can be :\n| - ``'heating'`` - this is default calculation type - ``'cooling'``\n\n``Tref`` is reference temperature - default value is ``18.0``\n\n| ``group`` can be :\n| - ``'yearly'`` - this is default grouping option - ``'yearly10'`` -\n same as ``'yearly'`` but year starts in October (10) - ``'monthly'`` -\n ``'weekly'`` - ``None`` - Any lambda function that can be use and that\n can be applied to a ``datetime``:\n\n::\n\n from pandas_degreedays import yearly_month\n df_degreedays = calculate_dd(ts_temp, method='pro', typ='heating', Tref=18.0, group=lambda dt: yearly_month(dt, 10))\n\nIt outputs a `Pandas\nDataFrame `__\nwith degree days like:\n\n::\n\n Tmin Tmax Tavg Tref DD DD_cum\n 2014-03-22 7.0 11.0 9.00 18 9.000000 9.000000\n 2014-03-23 3.0 12.0 7.50 18 10.500000 19.500000\n 2014-03-24 0.0 10.0 5.00 18 13.000000 32.500000\n 2014-03-25 6.0 10.0 8.00 18 10.000000 42.500000\n 2014-03-26 5.0 12.0 8.50 18 9.500000 52.000000\n 2014-03-27 2.0 8.0 5.00 18 13.000000 65.000000\n ... ... ... ... ... ... ...\n 2014-10-26 5.0 17.0 11.00 18 7.000000 653.547663\n 2014-10-27 9.0 22.0 15.50 18 3.336923 656.884586\n 2014-10-28 7.5 20.0 13.75 18 4.544400 661.428986\n 2014-10-29 8.0 19.0 13.50 18 4.618182 666.047168\n 2014-10-30 12.0 22.0 17.00 18 1.992000 668.039168\n 2014-10-31 11.0 24.0 17.50 18 2.143077 670.182245\n\n [224 rows x 6 columns]\n\nYou can display plot using:\n\n::\n\n from pandas_degreedays import plot_temp\n plot_temp(ts_temp, df_degreedays)\n\n.. figure:: img/figure_yearly10.png\n :alt: \n\n.. figure:: img/figure_yearly10_comp.png\n :alt: \n\nAbout Pandas\n------------\n\n`pandas `__ is a Python package providing\nfast, flexible, and expressive data structures designed to make working\nwith \"relational\" or \"labeled\" data both easy and intuitive. It's a very\nconvenient library to work with time series.\n\nInstall\n-------\n\nFrom Python package index\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n $ pip install pandas_degreedays\n\nFrom source\n~~~~~~~~~~~\n\nGet latest version using Git\n\n::\n\n $ git clone https://github.com/scls19fr/pandas_degreedays.git\n $ cd pandas_degreedays\n $ python setup.py install\n\nLinks\n-----\n\n- Documentation can be found at `Read The\n Docs `__ ;\n- Source code and issue tracking can be found at\n `GitHub `__.\n- Feel free to `tip me `__!\n\n.. |Latest Version| image:: https://img.shields.io/pypi/v/pandas_degreedays.svg\n :target: https://pypi.python.org/pypi/pandas_degreedays/\n.. |Supported Python versions| image:: https://img.shields.io/pypi/pyversions/pandas_degreedays.svg\n :target: https://pypi.python.org/pypi/pandas_degreedays/\n.. |Wheel format| image:: https://img.shields.io/pypi/wheel/pandas_degreedays.svg\n :target: https://pypi.python.org/pypi/pandas_degreedays/\n.. |License| image:: https://img.shields.io/pypi/l/pandas_degreedays.svg\n :target: https://pypi.python.org/pypi/pandas_degreedays/\n.. |Development Status| image:: https://img.shields.io/pypi/status/pandas_degreedays.svg\n :target: https://pypi.python.org/pypi/pandas_degreedays/\n.. |Downloads monthly| image:: https://img.shields.io/pypi/dm/pandas_degreedays.svg\n :target: https://pypi.python.org/pypi/pandas_degreedays/\n.. |Documentation Status| image:: https://readthedocs.org/projects/pandas_degreedays/badge/?version=latest\n :target: http://pandas_degreedays.readthedocs.org/en/latest/\n.. |Sourcegraph| image:: https://sourcegraph.com/api/repos/github.com/scls19fr/pandas_degreedays/.badges/status.png\n :target: https://sourcegraph.com/github.com/scls19fr/pandas_degreedays\n.. |Gitter| image:: https://badges.gitter.im/Join%20Chat.svg\n :target: https://gitter.im/scls19fr/pandas_degreedays?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n.. |Code Health| image:: https://landscape.io/github/scls19fr/pandas_degreedays/master/landscape.svg?style=flat\n :target: https://landscape.io/github/scls19fr/pandas_degreedays/master\n.. |Build Status| image:: https://travis-ci.org/scls19fr/pandas_degreedays.svg\n :target: https://travis-ci.org/scls19fr/pandas_degreedays", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/scls19fr/pandas_degreedays", "keywords": "pandas data weather temperature degree days", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pandas_degreedays", "package_url": "https://pypi.org/project/pandas_degreedays/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pandas_degreedays/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/scls19fr/pandas_degreedays" }, "release_url": "https://pypi.org/project/pandas_degreedays/0.0.6/", "requires_dist": null, "requires_python": null, "summary": "Pandas degree days", "version": "0.0.6" }, "last_serial": 1602330, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "1c13ea9f48d6d3cfeb51a002a15cffdc", "sha256": "05459885229fc3ddd7c2a1772b408ca09aa4f38089aa1a59cf4f5d8bc9f1fdb7" }, "downloads": -1, "filename": "pandas_degreedays-0.0.3.tar.gz", "has_sig": false, "md5_digest": "1c13ea9f48d6d3cfeb51a002a15cffdc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7386, "upload_time": "2015-01-21T14:46:23", "url": "https://files.pythonhosted.org/packages/ca/81/abe2444fb6b3eb3e115310517fc5c4a439cf30b61c92e65318738ff95171/pandas_degreedays-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "d4132ee5e6bf7b97f4810060b4ef7443", "sha256": "681ad6182c28dab354505c2fe81f26aa59d1a1cf5db7fe8742825b7514b089b1" }, "downloads": -1, "filename": "pandas_degreedays-0.0.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d4132ee5e6bf7b97f4810060b4ef7443", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12963, "upload_time": "2015-02-04T20:59:34", "url": "https://files.pythonhosted.org/packages/ea/57/721f159c002883a469a442c2f6d4ad8765d1ca5a860ce98aa4724bf419fe/pandas_degreedays-0.0.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "17d86b542ad0bb075e2012f302602658", "sha256": "d434d4321f26e6ea8af16feb1e8fbfd23736e06404861d42180d42313ef66251" }, "downloads": -1, "filename": "pandas_degreedays-0.0.4.tar.gz", "has_sig": false, "md5_digest": "17d86b542ad0bb075e2012f302602658", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9573, "upload_time": "2015-02-04T20:59:30", "url": "https://files.pythonhosted.org/packages/97/75/88ff882305dd5815381b1c14d99dbf07cfa1eb5be06aa16c544dfb4bdd88/pandas_degreedays-0.0.4.tar.gz" } ], "0.0.5": [], "0.0.6": [ { "comment_text": "", "digests": { "md5": "5e80195a2f5cfba7ebb9dfb59baf2353", "sha256": "053263517a3b159e024b7429bf4e020f305571eb32e688d15ee99b79d25afa01" }, "downloads": -1, "filename": "pandas_degreedays-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e80195a2f5cfba7ebb9dfb59baf2353", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12814, "upload_time": "2015-06-22T21:02:47", "url": "https://files.pythonhosted.org/packages/f4/1b/859faef056cedf3cc71a62a88426e075e6e70a8a3ff38b2fab8841e1e184/pandas_degreedays-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a007c06b2b6cf2c2ed2b6627321d8856", "sha256": "d172c6b1a0b38cdbdf396eaa3a89f81ade422f6e5bf67550417db1b6f88e0e55" }, "downloads": -1, "filename": "pandas_degreedays-0.0.6.tar.gz", "has_sig": false, "md5_digest": "a007c06b2b6cf2c2ed2b6627321d8856", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9376, "upload_time": "2015-06-22T21:02:43", "url": "https://files.pythonhosted.org/packages/5b/20/dd68f6bb6501adbc4d4d251ba2977768569548509a256f6a29325683291c/pandas_degreedays-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5e80195a2f5cfba7ebb9dfb59baf2353", "sha256": "053263517a3b159e024b7429bf4e020f305571eb32e688d15ee99b79d25afa01" }, "downloads": -1, "filename": "pandas_degreedays-0.0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e80195a2f5cfba7ebb9dfb59baf2353", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 12814, "upload_time": "2015-06-22T21:02:47", "url": "https://files.pythonhosted.org/packages/f4/1b/859faef056cedf3cc71a62a88426e075e6e70a8a3ff38b2fab8841e1e184/pandas_degreedays-0.0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a007c06b2b6cf2c2ed2b6627321d8856", "sha256": "d172c6b1a0b38cdbdf396eaa3a89f81ade422f6e5bf67550417db1b6f88e0e55" }, "downloads": -1, "filename": "pandas_degreedays-0.0.6.tar.gz", "has_sig": false, "md5_digest": "a007c06b2b6cf2c2ed2b6627321d8856", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9376, "upload_time": "2015-06-22T21:02:43", "url": "https://files.pythonhosted.org/packages/5b/20/dd68f6bb6501adbc4d4d251ba2977768569548509a256f6a29325683291c/pandas_degreedays-0.0.6.tar.gz" } ] }