id
int64
0
190k
prompt
stringlengths
21
13.4M
docstring
stringlengths
1
12k
12,238
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Creates a task to export a FeatureCollection to a FeatureView. Args: collection: The feature collection to be exported. description: Human-readable name of the task. assetId: The destination asset ID. ingestionTimeParameters: The FeatureView ingestion time parameters. **kwargs: Holds other keyword arguments that may ha...
12,239
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Creates a task to export an ImageCollection as a video to Drive. Args: collection: The image collection to be exported. The collection must only contain RGB images. description: Human-readable name of the task. folder: The name of a unique folder in your Drive account to export into. Defaults to the root of the drive. ...
12,240
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Creates a task to export an ImageCollection as a video to Cloud Storage. Args: collection: The image collection to be exported. The collection must only contain RGB images. description: Human-readable name of the task. bucket: The name of a Cloud Storage bucket for the export. fileNamePrefix: Cloud Storage object name ...
12,241
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Creates a task to export an Image as a pyramid of map tiles. Exports a rectangular pyramid of map tiles for use with web map viewers. The map tiles will be accompanied by a reference index.html file that displays them using the Google Maps API, and an earth.html file for opening the map on Google Earth. Args: image: Th...
12,242
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Sets proxy if needed. This is only needed for countries where Google services are not available. Args: port (int, optional): The proxy port number. Defaults to 1080. ip (str, optional): The IP address. Defaults to 'http://127.0.0.1'. timeout (int, optional): The timeout in seconds. Defaults to 300.
12,243
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Checks whether Google Drive is mounted in Google Colab. Returns: bool: Returns True if Google Drive is mounted, False otherwise.
12,244
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Checks if the ee credentials file exists in Google Drive. Returns: bool: Returns True if Google Drive is mounted, False otherwise.
12,245
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Checks if the ee credentials file exists in Google Colab. Returns: bool: Returns True if Google Drive is mounted, False otherwise.
12,246
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Copies ee credentials from Google Colab to Google Drive.
12,247
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Copies ee credentials from Google Drive to Google Colab.
12,248
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def clone_repo(out_dir=".",...
Updates the geemap package from the geemap GitHub repository without the need to use pip or conda. In this way, I don't have to keep updating pypi and conda-forge with every minor update of the package.
12,249
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def download_from_url(url, ...
Install a package from a GitHub repository. Args: url (str): The URL of the GitHub repository.
12,250
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Opens the GitHub repository for this package. Args: subdir (str, optional): Sub-directory of the repository. Defaults to None.
12,251
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Opens the YouTube tutorials for geemap.
12,252
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple try: from IPython.displ...
Shows an image within Jupyter notebook. Args: img_path (str): The image file path. width (int, optional): Width of the image in pixels. Defaults to None. height (int, optional): Height of the image in pixels. Defaults to None.
12,253
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Shows HTML within Jupyter notebook. Args: html (str): File path or HTML string. Raises: FileNotFoundError: If the file does not exist. Returns: ipywidgets.HTML: HTML widget.
12,254
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def check_install(package):...
Uploads an image to imgur.com Args: in_gif (str): The file path to the image.
12,255
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Converts hex color to RGB color. Args: value (str, optional): Hex color code as a string. Defaults to 'FFFFFF'. Returns: tuple: RGB color as a tuple.
12,256
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Download a file shared via Google Drive (e.g., https://drive.google.com/file/d/18SUo_HcDGltuWYZs1s7PpOmOq_FvFn04/view?usp=sharing) Args: gfile_url (str): The Google Drive shared file URL file_name (str): The output file name to use. out_dir (str, optional): The output directory. Defaults to '.'. unzip (bool, optional):...
12,257
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Downloads a file from voila. Adopted from https://github.com/voila-dashboards/voila/issues/578#issuecomment-617668058 Args: htmlWidget (object): The HTML widget to display the URL. filename (str): File path to download. title (str, optional): Download description. Defaults to "Click here to download: ".
12,258
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def csv_to_geojson( in_...
Converts a csv containing points (latitude and longitude) into an ee.FeatureCollection. Args: in_csv (str): File path or HTTP URL to the input csv file. For example, https://raw.githubusercontent.com/giswqs/data/main/world/world_cities.csv latitude (str, optional): Column name for the latitude column. Defaults to 'lati...
12,259
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def download_from_url(url, ...
Converts a csv file containing points (latitude, longitude) into a shapefile. Args: in_csv (str): File path or HTTP URL to the input csv file. For example, https://raw.githubusercontent.com/giswqs/data/main/world/world_cities.csv out_shp (str): File path to the output shapefile. latitude (str, optional): Column name fo...
12,260
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def download_file( url=...
Converts a csv file with latlon info to a point shapefile. Args: in_csv (str): The input csv file containing longitude and latitude columns. out_shp (str): The file path to the output shapefile. latitude (str, optional): The column name of the latitude column. Defaults to 'latitude'. longitude (str, optional): The colu...
12,261
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def csv_to_gdf(in_csv, lati...
Creates points for a CSV file and converts them to a vector dataset. Args: in_csv (str): The file path to the input CSV file. output (str): The file path to the output vector dataset. latitude (str, optional): The name of the column containing latitude coordinates. Defaults to "latitude". longitude (str, optional): The...
12,262
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def ee_to_gdf( ee_objec...
Downloads an ee.FeatureCollection as a shapefile. Args: ee_object (object): ee.FeatureCollection filename (str): The output filepath of the shapefile. columns (list, optional): A list of attributes to export. Defaults to None. sort_columns (bool, optional): Whether to sort the columns alphabetically. Defaults to False....
12,263
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def ee_to_df( ee_object...
Downloads an ee.FeatureCollection as a CSV file. Args: ee_object (object): ee.FeatureCollection filename (str): The output filepath of the CSV file. columns (list, optional): A list of attributes to export. Defaults to None. remove_geom (bool, optional): Whether to remove the geometry column. Defaults to True. sort_col...
12,264
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def ee_export_vector( e...
Downloads an ee.Dictionary as a CSV file. Args: data_dict (ee.Dictionary): The input ee.Dictionary. out_csv (str): The output file path to the CSV file. by_row (bool, optional): Whether to use by row or by column. Defaults to False. timeout (int, optional): Timeout in seconds. Defaults to 300 seconds. proxies (dict, op...
12,265
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def numpy_to_ee(np_array, c...
Creates an ee.Image from netCDF variables band_names that are read from nc_file. Currently only supports variables in a regular longitude/latitude grid (EPSG:4326). Args: nc_file (str): the name of the netCDF file to read var_names (str or list): the name(s) of the variable(s) to read band_names (list, optional): if gi...
12,266
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Extracts a rectangular region of pixels from an image into a numpy array. Args: ee_object (ee.Image): The image to sample. region (ee.Geometry, optional): The region to sample. Defaults to None. bands (list, optional): The list of band names to extract. Defaults to None. scale (int, optional): A nominal scale in meters...
12,267
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def install_package(package...
Open an Earth Engine ImageCollection as an Xarray Dataset. This function is a wrapper for xee. EarthEngineBackendEntrypoint.open_dataset(). See https://github.com/google/Xee/blob/main/xee/ext.py#L886 Args: dataset: An asset ID for an ImageCollection, or an ee.ImageCollection object. drop_variables (optional): Variables...
12,268
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Takes a full screenshot of the selected monitor. Args: filename (str): The output file path to the screenshot. monitor (int, optional): The monitor to take the screenshot. Defaults to 1.
12,269
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def in_colab_shell(): "...
Opens the URL in a new browser tab.
12,270
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Open a browser and navigate to the geemap API documentation.
12,271
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple try: from IPython.displ...
Displays a YouTube video within Jupyter notebooks. Args: id (str, optional): Unique ID of the video. Defaults to 'h0pz3S6Tvx0'.
12,272
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def random_string(string_le...
Creates a colorbar based on the provided palette. Args: width (int, optional): Width of the colorbar in pixels. Defaults to 150. height (int, optional): Height of the colorbar in pixels. Defaults to 30. palette (list, optional): Palette for the colorbar. Each color can be provided as a string (e.g., 'red'), a hex strin...
12,273
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Gets the minimum bounding box for a geojson polygon. Args: geojson (dict): A geojson dictionary. Returns: tuple: Returns a tuple containing the minimum bounding box in the format of (lower_left(lat, lon), upper_right(lat, lon)), such as ((13, -130), (32, -120)).
12,274
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Search location by address and lat/lon coordinates. Args: location (str): Place name or address max_rows (int, optional): Maximum number of records to return. Defaults to 10. reverse (bool, optional): Search place based on coordinates. Defaults to False. Returns: list: Returns a list of locations.
12,275
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Checks whether a pair of coordinates is valid. Args: location (str): A pair of latlon coordinates separated by comma or space. Returns: bool: Returns True if valid.
12,276
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Extracts latlon from text. Args: location (str): A pair of latlon coordinates separated by comma or space. Returns: bool: Returns (lat, lon) if valid.
12,277
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Retrieves the thumbnail URL of an Earth Engine asset. Args: asset_id (str): An Earth Engine asset id. timeout (int, optional): Timeout in seconds. Defaults to 300. proxies (dict, optional): Proxy settings. Defaults to None. Returns: str: An http url of the thumbnail.
12,278
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Extracts Earth Engine API documentation from https://developers.google.com/earth-engine/api_docs as a csv file. Args: outfile (str, optional): The output file path to a csv file. Defaults to None. timeout (int, optional): Timeout in seconds. Defaults to 300. proxies (dict, optional): Proxy settings. Defaults to None.
12,279
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def read_api_csv(): """...
Search Earth Engine API and user assets. If you received a warning (IOPub message rate exceeded) in Jupyter notebook, you can relaunch Jupyter notebook using the following command: jupyter notebook --NotebookApp.iopub_msg_rate_limit=10000 Args: asset_limit (int, optional): The number of assets to display for each asset...
12,280
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Extract legend from an Earth Engine class table on the Earth Engine Data Catalog page such as https://developers.google.com/earth-engine/datasets/catalog/MODIS_051_MCD12Q1 Args: ee_class_table (str): An Earth Engine class table with triple quotes. Returns: dict: Returns a legend dictionary that can be used to create a ...
12,281
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Create a QGIS Layer Style (.qml) based on an Earth Engine class table from the Earth Engine Data Catalog page such as https://developers.google.com/earth-engine/datasets/catalog/MODIS_051_MCD12Q1 Args: ee_class_table (str): An Earth Engine class table with triple quotes. out_qml (str): File path to the output QGIS Laye...
12,282
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Create a QGIS Layer Style (.qml) for NLCD data Args: out_qml (str): File path to the output qml.
12,283
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def get_direct_url(url): ...
Loads a Cloud Optimized GeoTIFF (COG) as an Image. Only Google Cloud Storage is supported. The URL can be one of the following formats: Option 1: gs://pdd-stac/disasters/hurricane-harvey/0831/20170831_172754_101c_3B_AnalyticMS.tif Option 2: https://storage.googleapis.com/pdd-stac/disasters/hurricane-harvey/0831/2017083...
12,284
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def get_direct_url(url): ...
Loads a list of Cloud Optimized GeoTIFFs (COG) as an ImageCollection. URLs is a list of URL, which can be one of the following formats: Option 1: gs://pdd-stac/disasters/hurricane-harvey/0831/20170831_172754_101c_3B_AnalyticMS.tif Option 2: https://storage.googleapis.com/pdd-stac/disasters/hurricane-harvey/0831/2017083...
12,285
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def check_titiler_endpoint(...
Get a tile layer from a Cloud Optimized GeoTIFF (COG). Source code adapted from https://developmentseed.org/titiler/examples/notebooks/Working_with_CloudOptimizedGeoTIFF_simple/ Args: url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/...
12,286
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def check_titiler_endpoint(...
Creates a COG mosaic from a csv/txt file stored locally for through HTTP URL. Args: filepath (str): Local path or HTTP URL to the csv/txt file containing COG URLs. skip_rows (int, optional): The number of rows to skip in the file. Defaults to 0. titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://t...
12,287
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def check_titiler_endpoint(...
Get the centroid of a Cloud Optimized GeoTIFF (COG). Args: url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz". Returns: tuple: A...
12,288
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple class PlanetaryComputerEndp...
Get a tile layer from a single SpatialTemporal Asset Catalog (STAC) item. Args: url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json collection (str): The Microsoft Planetary Compu...
12,289
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def stac_bounds( url=No...
Get the centroid of a single SpatialTemporal Asset Catalog (STAC) item. Args: url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json collection (str): The Microsoft Planetary Compute...
12,290
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def check_titiler_endpoint(...
Get band names of a single SpatialTemporal Asset Catalog (STAC) item. Args: url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json collection (str): The Microsoft Planetary Computer ...
12,291
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def check_titiler_endpoint(...
Get band info of a STAC item. Args: url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l...
12,292
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def check_titiler_endpoint(...
Get band info of a STAC item. Args: url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json collection (str): The Microsoft Planetary Computer STAC collection ID, e.g., landsat-8-c2-l...
12,293
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def check_package(name, URL...
Get vmin and vmax from COG. Args: source (str | TileClient): A local COG file path or TileClient object. bands (str | list, optional): A list of band names. Defaults to None. Raises: ValueError: If source is not a TileClient object or a local COG file path. Returns: tuple: A tuple of vmin and vmax.
12,294
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def check_package(name, URL...
Get band names from COG. Args: source (str | TileClient): A local COG file path or TileClient Returns: list: A list of band names.
12,295
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def bbox_to_geojson(bounds)...
Convert a list of bbox coordinates representing [left, bottom, right, top] to geojson FeatureCollection. Args: coords (list): A list of bbox coordinates representing [left, bottom, right, top]. Returns: dict: A geojson FeatureCollection.
12,296
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def get_bounds(geometry, no...
Get the centroid of a GeoJSON. Args: geometry (dict): A GeoJSON dict. north_up (bool, optional): . Defaults to True. transform ([type], optional): . Defaults to None. Returns: list: [lon, lat]
12,297
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def image_date(img, date_fo...
Gets image properties. Args: img (ee.Image): The input image. date_format (str, optional): The output date format. Defaults to 'YYYY-MM-dd HH:mm:ss'. Returns: dd.Dictionary: The dictionary containing image properties.
12,298
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def image_max_value(img, re...
Gets image descriptive statistics. Args: img (ee.Image): The input image to calculate descriptive statistics. region (object, optional): The region over which to reduce data. Defaults to the footprint of the image's first band. scale (float, optional): A nominal scale in meters of the projection to work in. Defaults to...
12,299
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def ee_export_vector( e...
Summarizes the values of a raster within the zones of another dataset and exports the results as a csv, shp, json, kml, or kmz. Args: in_value_raster (object): An ee.Image or ee.ImageCollection that contains the values on which to calculate a statistic. in_zone_vector (object): An ee.FeatureCollection that defines the ...
12,300
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def ee_export_vector( e...
Summarizes the area or percentage of a raster by group within the zones of another dataset and exports the results as a csv, shp, json, kml, or kmz. Args: in_value_raster (object): An integer Image that contains the values on which to calculate area/percentage. in_zone_vector (object): An ee.FeatureCollection that defi...
12,301
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Calculate the area (m2) of each each feature in a feature collection. Args: fc (object): The feature collection to compute the area. Returns: object: ee.FeatureCollection
12,302
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Calculate the area (km2) of each each feature in a feature collection. Args: fc (object): The feature collection to compute the area. Returns: object: ee.FeatureCollection
12,303
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Calculate the area (square mile) of each each feature in a feature collection. Args: fc (object): The feature collection to compute the area. Returns: object: ee.FeatureCollection
12,304
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Calculate the area (hectare) of each each feature in a feature collection. Args: fc (object): The feature collection to compute the area. Returns: object: ee.FeatureCollection
12,305
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Remove .geo coordinate field from a FeatureCollection Args: fc (object): The input FeatureCollection. Returns: object: The output FeatureCollection without the geometry field.
12,306
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Retrieves the image cell size (e.g., spatial resolution) Args: img (object): ee.Image Returns: float: The nominal scale in meters.
12,307
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Gets image band names. Args: img (ee.Image): The input image. Returns: ee.List: The returned list of image band names.
12,308
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def image_area(img, region=...
Calculates the area of each class of an image. Args: img (object): ee.Image groups (object, optional): The groups to use for the area calculation. Defaults to None. region (object, optional): The region over which to reduce data. Defaults to the footprint of the image's first band. scale (float, optional): A nominal sc...
12,309
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def image_value_list(img, r...
Create a histogram of an image. Args: img (ee.Image): The image to calculate the histogram. region (ee.Geometry | ee.FeatureCollection, optional): The region over which to reduce data. Defaults to the footprint of the image's first band. scale (float, optional): A nominal scale in meters of the projection to work in. D...
12,310
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def image_scale(img): "...
Calculate statistics for an image by zone. Args: image (ee.Image): The image to calculate statistics for. zones (ee.Image): The zones to calculate statistics for. out_csv (str, optional): The path to the output CSV file. Defaults to None. labels (list, optional): The list of zone labels to use for the output CSV. Defau...
12,311
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Create a latitude grid. Args: step (float, optional): The step size in degrees. Defaults to 1.0. west (int, optional): The west boundary in degrees. Defaults to -180. east (int, optional): The east boundary in degrees. Defaults to 180. south (int, optional): The south boundary in degrees. Defaults to -85. north (int, o...
12,312
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Create a longitude grid. Args: step (float, optional): The step size in degrees. Defaults to 1.0. west (int, optional): The west boundary in degrees. Defaults to -180. east (int, optional): The east boundary in degrees. Defaults to 180. south (int, optional): The south boundary in degrees. Defaults to -85. north (int, ...
12,313
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def ee_export_vector( e...
Create a fishnet (i.e., rectangular grid) based on an input vector dataset. Args: data (str | ee.Geometry | ee.Feature | ee.FeatureCollection): The input vector dataset. It can be a file path, HTTP URL, ee.Geometry, ee.Feature, or ee.FeatureCollection. h_interval (float, optional): The horizontal interval in degrees. I...
12,314
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def ee_export_vector( e...
Extracts image values to points. Args: in_fc (object): ee.FeatureCollection. image (object): The ee.Image to extract pixel values. out_fc (object, optional): The output feature collection. Defaults to None. scale (ee.Projectoin, optional): A nominal scale in meters of the projection to sample in. If unspecified,the sca...
12,315
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Reclassify an image. Args: img (object): The image to which the remapping is applied. in_list (list): The source values (numbers or EEArrays). All values in this list will be mapped to the corresponding value in 'out_list'. out_list (list): The destination values (numbers or EEArrays). These are used to replace the cor...
12,316
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Smooths an image. Args: img (object): The image to be smoothed. reducer (object): ee.Reducer kernel (object): ee.Kernel Returns: object: ee.Image
12,317
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Renames image bands. Args: img (object): The image to be renamed. in_band_names (list): The list of input band names. out_band_names (list): The list of output band names. Returns: object: The output image with the renamed bands.
12,318
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Converts all bands in an image to an image collection. Args: img (object): The image to convert. Returns: object: ee.ImageCollection
12,319
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Finds Landsat images by WRS path number and row number. Args: landsat_col (str): The image collection id of Landsat. path_num (int): The WRS path number. row_num (int): the WRS row number. Returns: object: ee.ImageCollection
12,320
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Converts a string to an ee.Number. Args: in_str (str): The string to convert to a number. Returns: object: ee.Number
12,321
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Accumulates elements of an array along the given axis. Args: arr (object): Array to accumulate. Returns: object: ee.Number
12,322
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Calculates the mean of an array along the given axis. Args: arr (object): Array to calculate mean. Returns: object: ee.Number
12,323
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def get_annual_NAIP(year, R...
Creates annual NAIP imagery mosaic. Args: start_year (int, optional): The starting year. Defaults to 2009. end_year (int, optional): The ending year. Defaults to 2019. Returns: object: ee.ImageCollection
12,324
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def mosaic(images, output, ...
Create an NAIP mosaic of a specified year for a specified region. Args: year (int): The specified year to create the mosaic for. region (object): ee.Geometry Returns: object: ee.Image
12,325
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def mosaic(images, output, ...
Create annual NAIP mosaic for a given region. Args: region (object): ee.Geometry add_NDVI (bool, optional): Whether to add the NDVI band. Defaults to True. add_NDWI (bool, optional): Whether to add the NDWI band. Defaults to True. Returns: object: ee.ImageCollection
12,326
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Retrieves NWI dataset for a given HUC8 watershed. Args: HUC08_Id (str): The HUC8 watershed id. region (object): ee.Geometry exclude_riverine (bool, optional): Whether to exclude riverine wetlands. Defaults to True. Returns: object: ee.FeatureCollection
12,327
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Filters HUC08 watersheds intersecting a given region. Args: region (object): ee.Geometry Returns: object: ee.FeatureCollection
12,328
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Filters HUC10 watersheds intersecting a given region. Args: region (object): ee.Geometry Returns: object: ee.FeatureCollection
12,329
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Finds a HUC08 watershed based on a given HUC08 ID Args: HUC08_Id (str): The HUC08 ID. Returns: object: ee.FeatureCollection
12,330
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Finds a HUC10 watershed based on a given HUC08 ID Args: HUC10_Id (str): The HUC10 ID. Returns: object: ee.FeatureCollection
12,331
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Finds NWI dataset for a given HUC08 watershed. Args: HUC08_Id (str): The HUC08 watershed ID. exclude_riverine (bool, optional): Whether to exclude riverine wetlands. Defaults to True. Returns: object: ee.FeatureCollection
12,332
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Converts NWI vector dataset to image and add color to it. Args: fc (object): ee.FeatureCollection Returns: object: ee.Image
12,333
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple def nwi_rename(names): ...
null
12,334
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Calculates summary statistics by group. Args: collection (object): The input feature collection column (str): The value column to calculate summary statistics. group (str): The name of the group column. group_name (str): The new group name to use. stats_type (str): The type of summary statistics. return_dict (bool): Wh...
12,335
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Aggregates over a given property of the objects in a collection, calculating the sum, min, max, mean, sample standard deviation, sample variance, total standard deviation and total variance of the selected property. Args: collection (FeatureCollection): The input feature collection to calculate summary statistics. colu...
12,336
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Aggregates over a given property of the objects in a collection, calculating the sum, min, max, mean, sample standard deviation, sample variance, total standard deviation and total variance of the selected property. Args: collection (FeatureCollection): The input feature collection to calculate statistics. column (str)...
12,337
import csv import datetime import io import json import math import os import requests import shutil import tarfile import urllib.request import warnings import zipfile import ee import ipywidgets as widgets from ipytree import Node, Tree from typing import Union, List, Dict, Optional, Tuple The provided code snippet ...
Rounds a number to a specified number of decimal places. Args: num (ee.Number): The number to round. decimal (int, optional): The number of decimal places to round. Defaults to 2. Returns: ee.Number: The number with the specified decimal places rounded.