{ "info": { "author": "Philipp Sommer", "author_email": "philipp.sommer@unil.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: GIS" ], "description": "Retrieve WorldClim climate and other information for lat-lon grid cells\n=======================================================================\n\n|travis| |codecov| |version| |github| |supported-versions| |supported-implementations|\n\nThis repository contains utility functions to retrieve information for given\nlatitudes and longitude.\n\nInstallation\n------------\nWe strongly recommend to use conda_ for the installation. First, install the\nnecessary dependencies, namely netCDF4_, shapely_ and pandas_::\n\n conda install netcdf4 shapely pandas\n\nTo enable the download of the WorldClim data, you will also need rasterio_ and\nxarray_ (you can skip this if you already downloaded the data) via::\n\n conda install rasterio xarray\n\nThen install ``latlon_utils`` via::\n\n pip install latlon_utils\n\nor from the source directory via::\n\n pip install .\n\nUsage\n-----\nSo far, the package has two functions: the `get_climate` and `get_country`\nfunction. Use these like\n\nGet the country for 50 degrees north and 10 degrees east::\n\n >>> from latlon_utils import get_country\n\n >>> get_country(50, 10)\n 'Germany'\n\nGet the climate for 50 degrees north and 10 degrees east::\n\n >>> from latlon_utils import get_climate\n\n # limit the number of columns printed by pandas\n >>> import pandas; pandas.options.display.max_columns = 5\n\n >>> get_climate(50, 10)\n tavg jan 0.044739\n feb 0.974976\n mar 4.705505\n apr 8.232239\n mai 13.150024\n jun 16.012268\n jul 17.958984\n aug 17.828735\n sep 13.779480\n oct 8.787476\n nov 4.039001\n dec 1.430237\n djf 0.816650\n mam 8.695923\n jja 17.266663\n son 8.868652\n ann 8.911972\n prec jan 48.000000\n feb 42.000000\n mar 44.000000\n apr 44.000000\n mai 56.000000\n jun 68.000000\n jul 65.000000\n aug 52.000000\n sep 47.000000\n oct 52.000000\n nov 52.000000\n dec 59.000000\n djf 49.666667\n mam 48.000000\n jja 61.666667\n son 50.333333\n ann 52.416667\n Name: (50, 10), dtype: float64\n\n\n >>> get_climate(50, 10)['tavg', 'djf']\n 0.816650390625\n\n >>> get_climate([10, 11], [50, 51])\n tavg ... prec\n jan feb ... son ann\n lat lon ...\n 10 50 21.810730 22.687988 ... 10.666667 6.833333\n 11 51 24.617249 24.678040 ... 7.666667 3.750000\n \n [2 rows x 34 columns]\n\nData download\n-------------\nThis package is built upon freely available datasets but does not contain any\ndata. This data is downloaded on request (see the next section). In particular,\nthe `get_climate` method uses the data from [WorldClim2.0]_, the `get_country`\nfunction uses the `datasets/geo-countries`_ repository.\n\nDownload directory\n******************\nTo download and process the necessary datasets, run::\n\n python -m latlon_utils.download\n\n(see ``python -m latlon_utils.download --help`` for available options).\n\nWe download the GeoTIFF files from WorldClim_ and transform them to netCDF\ndatasets. The default directory to store the data is in\n``$HOME/.local/share/latlon_utils``, where ``$HOME`` stands for the users home\ndirectory. If you want to use a different directory, set the ``LATLONDATA``\nvariable, e.g.::\n\n export LATLONDATA=$HOME/my_data\n python download.py $LATLONDATA\n\nThe ``LATLONDATA`` environment variable is necessary to ensure that the python\npackage finds the data later again.\n\nWorldClim resolutions\n*********************\nThe default resolution that we use is ``10m``. However, you can also specify\nother resolutions in the python functions or via the ``LATLONRES`` environment\nvariable. To use, for example the 5 minutes resolutions, simply run::\n\n export LATLONRES='5m'\n\n\nReferences\n----------\n.. [WorldClim2.0] Fick, S.E. and R.J. Hijmans, 2017. Worldclim 2: New 1-km spatial resolution climate surfaces for global land areas. International Journal of Climatology. http://worldclim.org/\n\n.. _WorldClim: http://worldclim.org/\n.. _datasets/geo-countries: https://github.com/datasets/geo-countries\n.. _xarray: http://xarray.pydata.org/en/stable/\n.. _rasterio: https://rasterio.readthedocs.io/en/stable/\n.. _netCDF4: https://github.com/Unidata/netcdf4-python\n.. _pandas: https://pandas.pydata.org/\n.. _conda: https://conda.io/projects/conda/en/latest/\n.. _shapely: https://shapely.readthedocs.io/en/latest/\n\n\n.. |travis| image:: https://travis-ci.org/Chilipp/latlon-utils.svg?branch=master\n :alt: Travis\n :target: https://travis-ci.org/Chilipp/latlon-utils\n\n.. |codecov| image:: https://codecov.io/gh/Chilipp/latlon-utils/branch/master/graph/badge.svg\n :alt: Coverage\n :target: https://codecov.io/gh/Chilipp/latlon-utils\n\n.. |version| image:: https://img.shields.io/pypi/v/latlon-utils.svg?style=flat\n :alt: PyPI Package latest release\n :target: https://pypi.python.org/pypi/latlon-utils\n\n.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/latlon-utils.svg?style=flat\n :alt: Supported versions\n :target: https://pypi.python.org/pypi/latlon-utils\n\n.. |supported-implementations| image:: https://img.shields.io/pypi/implementation/latlon-utils.svg?style=flat\n :alt: Supported implementations\n :target: https://pypi.python.org/pypi/latlon-utils\n\n.. |github| image:: https://img.shields.io/github/release/Chilipp/latlon-utils.svg\n :target: https://github.com/Chilipp/latlon-utils/releases/latest\n :alt: Latest github release", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Chilipp/latlon-utils", "keywords": "worldclim geo-countries latitude longitude", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "latlon-utils", "package_url": "https://pypi.org/project/latlon-utils/", "platform": "", "project_url": "https://pypi.org/project/latlon-utils/", "project_urls": { "Homepage": "https://github.com/Chilipp/latlon-utils" }, "release_url": "https://pypi.org/project/latlon-utils/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Retrieve WorldClim climate and other information for lat-lon grid cells", "version": "0.0.4" }, "last_serial": 4995443, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "3eccfdd2d06e01dbbde33facb5ff8fd1", "sha256": "e295bee30a5be374fb3ff1a473033473b931f9f9ce66f04d17638dc95aefac3b" }, "downloads": -1, "filename": "latlon-utils-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3eccfdd2d06e01dbbde33facb5ff8fd1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21658, "upload_time": "2019-03-02T19:31:23", "url": "https://files.pythonhosted.org/packages/9f/88/b0dd3b27cb120d63fde5d680410b30eeb0ff5a627ea3b13c8b87988d588a/latlon-utils-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "a3d4cfee404c6ed1a718a6cdadf30145", "sha256": "d17f829dd681b9b53d825ab7246952431b919c657d977065edafb51be1b16358" }, "downloads": -1, "filename": "latlon-utils-0.0.2.tar.gz", "has_sig": false, "md5_digest": "a3d4cfee404c6ed1a718a6cdadf30145", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21755, "upload_time": "2019-03-02T22:35:24", "url": "https://files.pythonhosted.org/packages/b9/a7/bfdd26a42c8c53c31eef0815cce7fed4bda8fe9226c66a98443feae1ffe3/latlon-utils-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "dca67a3c20edd390ac54ca8928b7b481", "sha256": "c385c0b1b5b7b1c55caa40aaad85508d73f66084001bdbcbf202bcc5f353d93f" }, "downloads": -1, "filename": "latlon-utils-0.0.3.tar.gz", "has_sig": false, "md5_digest": "dca67a3c20edd390ac54ca8928b7b481", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21808, "upload_time": "2019-03-27T20:00:15", "url": "https://files.pythonhosted.org/packages/fc/e0/95019c6f81059a3612c66ad05d9eead2432d8b375b518f768c5a8df3d6a5/latlon-utils-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "26b2f525a69d24628560586ee9d2c6bd", "sha256": "bfc01d9c0c1627cbc3e239691dcb5ad5fccd18f10f643df134e0f653ca355fb7" }, "downloads": -1, "filename": "latlon-utils-0.0.4.tar.gz", "has_sig": false, "md5_digest": "26b2f525a69d24628560586ee9d2c6bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22265, "upload_time": "2019-03-28T00:32:59", "url": "https://files.pythonhosted.org/packages/86/ae/98ea346bcafdf1b07a57341d120469f44a0bfc804119b7168c7e1584491c/latlon-utils-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "26b2f525a69d24628560586ee9d2c6bd", "sha256": "bfc01d9c0c1627cbc3e239691dcb5ad5fccd18f10f643df134e0f653ca355fb7" }, "downloads": -1, "filename": "latlon-utils-0.0.4.tar.gz", "has_sig": false, "md5_digest": "26b2f525a69d24628560586ee9d2c6bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22265, "upload_time": "2019-03-28T00:32:59", "url": "https://files.pythonhosted.org/packages/86/ae/98ea346bcafdf1b07a57341d120469f44a0bfc804119b7168c7e1584491c/latlon-utils-0.0.4.tar.gz" } ] }