{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\"Open\n", "\n", "**Printing Earth Engine objects in a collapsible tree structure using eerepr**\n", "\n", "Uncomment the following line to install [geemap](https://geemap.org) if needed." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# !pip install -U geemap" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "By default, geemap now uses [eerepr](https://github.com/aazuspan/eerepr) to print Earth Engine objects. You no longer need to used the `.getInfo()` function. Uncomment the following code block and execute it if you don't want to use eerepr for printing objects." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# import os\n", "# os.environ['USE_EEREPR'] = 'False'" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import ee\n", "import geemap" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "geemap.ee_initialize()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Print `ee.Image`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "image = ee.Image('USGS/SRTMGL1_003')\n", "image" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Print `ee.ImageCollection`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "collection = ee.ImageCollection(\"LANDSAT/LC09/C02/T1_L2\").limit(10)\n", "collection" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Print `ee.Feature`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "feature = ee.FeatureCollection(\"TIGER/2018/States\").first()\n", "feature" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Print `ee.FeatureCollection`" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fc = ee.FeatureCollection(\"TIGER/2018/States\").limit(10)\n", "fc" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" } }, "nbformat": 4, "nbformat_minor": 5 }