{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# Intake-stac\n\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pangeo-data/intake-stac/master?filepath=examples?urlpath=lab)\n[![Build Status](https://travis-ci.org/pangeo-data/intake-stac.svg?branch=master)](https://travis-ci.org/pangeo-data/intake-stac)\n[![PyPI version](https://badge.fury.io/py/intake-stac.svg)](https://badge.fury.io/py/intake-stac)\n[![Documentation Status](https://readthedocs.org/projects/intake-stac/badge/?version=latest)](https://intake-stac.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/pangeo-data/intake-stac/branch/master/graph/badge.svg)](https://codecov.io/gh/pangeo-data/intake-stac)\n\nThis is an [intake](https://intake.readthedocs.io/en/latest) data source for [SpatioTemporal Asset Catalogs (STAC)](https://stacspec.org/). The STAC specification provides a common metadata specification, API, and catalog format to describe geospatial assets, so they can more easily indexed and discovered. A 'spatiotemporal asset' is any file that represents information about the earth captured in a certain space and time.\n\nTwo examples of STAC catalogs are:\n\n- https://planet.stac.cloud/?t=catalogs\n- https://landsat-stac.s3.amazonaws.com/catalog.json\n\n[Radiant Earth](https://radiant.earth) keeps track of a more complete listing of STAC implementations [here](https://github.com/radiantearth/stac-spec/blob/master/implementations.md).\n\nThis project provides an opinionated way for users to load datasets from these catalogs into the scientific Python ecosystem. Currently it uses the intake-xarray plugin and supports several file formats including GeoTIFF, netCDF, GRIB, and OpenDAP.\n\n\n## Installation\n\nintake-stac has a few [requirements](requirements.txt), such as the Intake library. Intake-stac can be installed from Pip or the source repository. \n\n```bash\n$ pip install intake-stac\n```\n\nFrom source repository:\n\n```bash\n$ git clone https://github.com/pangeo-data/intake-stac.git\n$ cd intake-stac\n$ pip install .\n```\n\nor\n\n```\n$ pip install git+https://github.com/pangeo-data/intake-stac\n```\n\nThe [examples/](examples/) directory contains some example Jupyter Notebooks that can be used to test the functionality.\n\n#### Versions\nTo install a specific versions of intake-stac, specify the version in the install command\n\n```bash\npip install intake-stac==0.1.0\n```\n\nThe table below shows the corresponding versions between intake-stac and STAC:\n\n| sat-stac | STAC |\n| -------- | ---- |\n| 0.1.x | 0.6.x |\n\n\n## Usage\n\nThe package can be imported using\n```python\nfrom intake_stac import StacCatalog, StacCollection, StacItem\n```\n\n### Loading a catalog\n\nYou can load data from a STAC catalog by providing the URL to valid STAC catalog entry:\n```python\ncatalog = StacCatalog('https://storage.googleapis.com/pdd-stac/disasters/catalog.json', 'planet-disaster-data')\nlist(catalog)\n```\n\nYou can also point to STAC Collections or Items. Each constructor returns a Intake Catalog with the top level corresponding to the STAC object used for initialization.\n\n```python\nstac_cat = StacCatalog('https://landsat-stac.s3.amazonaws.com/catalog.json', 'landsat-stac')\ncollection_cat = StacCollection('https://landsat-stac.s3.amazonaws.com/landsat-8-l1/catalog.json', 'landsat-8')\nitems_cat = StacItem('https://landsat-stac.s3.amazonaws.com/landsat-8-l1/111/111/2018-11-30/LC81111112018334LGN00.json', 'LC81111112018334LGN00')\n```\n\nIntake-Stac uses [sat-stac](https://github.com/sat-utils/sat-stac) to parse STAC objects. You can also pass `satstac` objects (e.g. `satstac.Collection`) directly to the Intake-Stac constructors: \n\n```python\nimport satstac\ncol = satstac.Collection.open('https://landsat-stac.s3.amazonaws.com/landsat-8-l1/catalog.json')\ncollection_cat = StacCollection(col, 'landsat-8')\n```\n\n### Using the catalog\n\nOnce you have a catalog, you can display its entries by iterating through its contents:\n\n```python\nfor entry_id, entry in catalog.items():\n display(entry)\n```\n\nIf the catalog has too many entries to comfortably print all at once,\nyou can narrow it by searching for a term (e.g. 'thumbnail'):\n```python\nfor entry_id, entry in catalog.search('thumbnail').items():\n display(entry)\n```\n\n### Loading a dataset\nOnce you have identified a dataset, you can load it into a `xarray.DataArray` using `to_dask()`:\n\n```python\nda = entry.to_dask()\n```\n\n## Development\n\nThe `master` branch contains the last versioned release, and the `development` branch contains the latest version of the code. New Pull Requests should be made to the `development` branch. For additional [contributing guidelines](docs/contributing.rst) see the documentation.\n\n### Running the tests\n\nTo run the tests some additional packages need to be installed from the `requirements-dev.txt` file.\n\n```\n$ pip install -r requirements-dev.txt\n$ pytest -v -s --cov intake-stac --cov-report term-missing\n```\n\n\n## About\n[intake-stac](https://github.com/pangeo-data/intake-stac) was created as part of the [Pangeo](http://pangeo.io) initiative. See the initial [design document](https://hackmd.io/cyJZkjV5TCWTJg1mUAoEVA).\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/pangeo-data/intake-stac", "keywords": "intake stac", "license": "BSD 2-Clause", "maintainer": "Joe Hamman", "maintainer_email": "jhamman@ucar.edu", "name": "intake-stac", "package_url": "https://pypi.org/project/intake-stac/", "platform": "", "project_url": "https://pypi.org/project/intake-stac/", "project_urls": { "Homepage": "https://github.com/pangeo-data/intake-stac" }, "release_url": "https://pypi.org/project/intake-stac/0.2.0/", "requires_dist": [ "intake (>=0.5.1)", "intake-xarray (~=0.3.0)", "scikit-image (~=0.15.0)", "sat-stac (>=0.1.3)" ], "requires_python": ">=3.5", "summary": "An intake adapter for building intake catalogs begining with SpatioTemporal Asset Catalogs (STAC)", "version": "0.2.0" }, "last_serial": 5945874, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f7d289c7d4f4c0e1816c5445d1a81fcb", "sha256": "2103b55deb6c3d5e9931c90bac98371955625df0af88b3ebff7941aab9bc8814" }, "downloads": -1, "filename": "intake_stac-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f7d289c7d4f4c0e1816c5445d1a81fcb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 7882, "upload_time": "2019-05-24T19:41:23", "url": "https://files.pythonhosted.org/packages/e5/73/ae946c524e75c3967abb38d133350990abef960701cdc5259f92bd9c677d/intake_stac-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "931d0adf148ce3a1d3baee3739193a68", "sha256": "d38d78ce0e3b173d9e9973df0cc899350dae71dbf2226b2bddf5e927c7082f0d" }, "downloads": -1, "filename": "intake_stac-0.1.0.tar.gz", "has_sig": false, "md5_digest": "931d0adf148ce3a1d3baee3739193a68", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 6651, "upload_time": "2019-05-24T19:41:26", "url": "https://files.pythonhosted.org/packages/f8/ae/628c28dbdf138a2f1c7117879a76ae8c496056f57b75cdb308695fb0000c/intake_stac-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "5954e82046f50d3f823d9d6468e7346b", "sha256": "3907b6864d4858567c56da3fc3089e50c5214e1bf0936aa51bb3dbf6e1b4f14f" }, "downloads": -1, "filename": "intake_stac-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5954e82046f50d3f823d9d6468e7346b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 9490, "upload_time": "2019-10-08T17:29:59", "url": "https://files.pythonhosted.org/packages/c4/12/a57020c420ce690e70b93ce378782163a6b99a093bf5b7ffc664333dc890/intake_stac-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d88bffc112541260a24558072f7968c", "sha256": "d452cfee1ce041af12e2827f9f250ca18ce3c9bb6780b0920b90efdc2448a5fc" }, "downloads": -1, "filename": "intake_stac-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5d88bffc112541260a24558072f7968c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 27044, "upload_time": "2019-10-08T17:30:01", "url": "https://files.pythonhosted.org/packages/6a/b3/b8efa691b262e1a5d4f126e9a852a9855b3a4826028809effc5abfb0d627/intake_stac-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5954e82046f50d3f823d9d6468e7346b", "sha256": "3907b6864d4858567c56da3fc3089e50c5214e1bf0936aa51bb3dbf6e1b4f14f" }, "downloads": -1, "filename": "intake_stac-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5954e82046f50d3f823d9d6468e7346b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.5", "size": 9490, "upload_time": "2019-10-08T17:29:59", "url": "https://files.pythonhosted.org/packages/c4/12/a57020c420ce690e70b93ce378782163a6b99a093bf5b7ffc664333dc890/intake_stac-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d88bffc112541260a24558072f7968c", "sha256": "d452cfee1ce041af12e2827f9f250ca18ce3c9bb6780b0920b90efdc2448a5fc" }, "downloads": -1, "filename": "intake_stac-0.2.0.tar.gz", "has_sig": false, "md5_digest": "5d88bffc112541260a24558072f7968c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 27044, "upload_time": "2019-10-08T17:30:01", "url": "https://files.pythonhosted.org/packages/6a/b3/b8efa691b262e1a5d4f126e9a852a9855b3a4826028809effc5abfb0d627/intake_stac-0.2.0.tar.gz" } ] }