{"id":13781157,"url":"https://github.com/KMarkert/restee","last_synced_at":"2025-05-11T14:34:41.391Z","repository":{"id":57461537,"uuid":"327682633","full_name":"KMarkert/restee","owner":"KMarkert","description":"Python package to call processed EE objects via the REST API to local data","archived":true,"fork":false,"pushed_at":"2024-06-08T01:14:19.000Z","size":1272,"stargazers_count":37,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T10:53:36.254Z","etag":null,"topics":["earth-engine","geospatial-processing","python","rest-api","xarray"],"latest_commit_sha":null,"homepage":"https://kmarkert.github.io/restee","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KMarkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-07T17:37:26.000Z","updated_at":"2025-03-10T11:24:16.000Z","dependencies_parsed_at":"2024-08-03T18:12:27.060Z","dependency_job_id":"eaaf7ed5-8415-4c73-a0aa-28394267b889","html_url":"https://github.com/KMarkert/restee","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"60d1291bf8be6d3df7eea99eee886d1855956227"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KMarkert%2Frestee","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KMarkert%2Frestee/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KMarkert%2Frestee/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KMarkert%2Frestee/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KMarkert","download_url":"https://codeload.github.com/KMarkert/restee/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253580302,"owners_count":21930922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["earth-engine","geospatial-processing","python","rest-api","xarray"],"created_at":"2024-08-03T18:01:23.475Z","updated_at":"2025-05-11T14:34:41.054Z","avatar_url":"https://github.com/KMarkert.png","language":"Python","readme":"# restee\n\n🚨 This repository is no longer under development or maintined, therefor it is archived. The [google/Xee](https://github.com/google/Xee) repository serves a similar purpose and is actively maintained, please use that package instead. 🚨\n\nPython package to call process EE objects via the REST API to local data\n\n[![PyPI version](https://badge.fury.io/py/restee.svg)](https://badge.fury.io/py/restee)\n[![docs](https://github.com/KMarkert/restee/actions/workflows/docs.yml/badge.svg)](https://github.com/KMarkert/restee/actions/workflows/docs.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\n\n`restee` is a package that aims to make plugging Earth Engine (EE) computations into downstream Python processing easier. The EE REST API allows user to interface with EE using REST API calls that allow for . There are many more features to the EE REST API, however, `restee` aims to simply provide a user-friendly means to access computed server-side objects (like image data) from the [Python `earthengine-api`](https://developers.google.com/earth-engine/guides/python_install) API to a local Python enviroment (client-side).\n\nIt should be noted that `restee` relies on fairly new and advanced EE features that may not be suitable for all users (see [warning from the EE team](https://developers.google.com/earth-engine/reference#audience)). If you are new to Earth Engine, please get started with the [JavaScript guide](https://developers.google.com/earth-engine/getstarted).\n\n## Installation\n\n`restee` relies heavily on the geospatial Python ecosystem to manage different geospatial data formats and execute geospatial processes. It is recommended to use [`conda`](https://docs.anaconda.com/anaconda/install/) to handle the package dependencies and create a virtual environment. To do this run the following command:\n\n```sh\nconda create -n restee -c conda-forge -y \\\n    python\u003e=3.6 \\\n    numpy \\\n    scipy \\\n    pandas \\\n    xarray \\\n    rasterio \\\n    geopandas \\\n    pyproj \\\n    requests \\\n    backoff \\\n    earthengine-api \\\n    tqdm\n```\n\nOnce all of the dependencies are installed, the `restee` package can be installed using `pip`:\n\n```sh\npip install restee\n```\n\nIt is strongly recommended to read the [Installation documentation]()\n\n## Getting Started\n\nThis section is meant purely as a demonstration of what is possible, please see the [Installation page](/installation) for how to install package and setup the authentication then the [Usage page](/usage) for in depth information.\n\n```python\nimport ee\nee.Initialize()\n\nimport restee as ree\n\n# get an authenticated session with GCP for REST API calls\nsession = ree.EESession(\"\u003cCLOUD-PROJECT\u003e\",\"\u003cPATH-TO-SECRET-KEY\u003e\")\n\n# use ee to get a featurecollection for USA\ncountries = ee.FeatureCollection(\"USDOS/LSIB_SIMPLE/2017\")\ncamerica= countries.filter(ee.Filter.eq(\"wld_rgn\", \"Central America\"))\n\n# define the domain imagery will be requested for\n# in this case it is the computed USA featurecollection\ndomain = ree.Domain.from_ee_geometry(session,camerica,resolution=0.01)\n\n# define some computations\n# here we calculate median NDVI for the summer months over the USA\nmodis = (\n    ee.ImageCollection(\"MODIS/006/MOD09GA\")\n    .filterDate(\"2020-06-01\",\"2020-09-01\")\n    .map(lambda x: x.normalizedDifference([\"sur_refl_b02\",\"sur_refl_b01\"]))\n    .median()\n    .rename(\"NDVI\")\n)\n\n# request the ee.Image pixels as a xarray dataset\nndvi_ds = ree.img_to_xarray(session,domain,modis,no_data_value=0)\n\n# inspect the local xarray Dataset object\nndvi_ds\n\n# output\n# \u003cxarray.Dataset\u003e\n# Dimensions:  (lat: 1130, lon: 1509)\n# Coordinates:\n#   * lon      (lon) float64 -92.23 -92.22 -92.21 -92.2 ... -77.17 -77.16 -77.15\n#   * lat      (lat) float64 18.48 18.47 18.46 18.45 ... 7.225 7.215 7.205 7.195\n# Data variables:\n#     NDVI     (lat, lon) float32 nan nan nan nan nan nan ... nan nan nan nan nan\n```\n\nFrom this point on the computed data is local to your system so you can do with it what you want. This allows the data to be plotted, persisted, or fed into another downstream process. For the sake of example, here we will plot the result.\n\n```python\nndvi_ds.NDVI.plot(robust=True,cmap=\"viridis\")\n```\n\n![MODIS Summer NDVI](docs/img/modis_ndvi_example.png)\n\nAgain, this quick example was to highlight how a user may define an EE computation using the `earthengine-api` and request the data into a local data structure. One may use `restee` to get zonal statitics calculated for feature collections or even explore collection metadata, any format on EE can be requested locally. For more details, please see the [Usage page](/usage).\n\n## Get in touch\n\nPlease report any bugs, ask questions, or suggest new features on [GitHub](https://github.com/KMarkert/restee/issues).\n\n## Contribute\n\nContributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.\n\n## License\n\n`restee` is available under the open source [MIT License](https://github.com/KMarkert/restee/blob/main/LICENSE).\n","funding_links":[],"categories":["Python API"],"sub_categories":["Packages"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKMarkert%2Frestee","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKMarkert%2Frestee","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKMarkert%2Frestee/lists"}