Note
Go to the end to download the full example code.
Explore collection metadata using earthdaily
Import librairies
from rich.table import Table
from rich.console import Console
from earthdaily import EarthDataStore
console = Console()
Init earthdatastore with environment variables or default credentials
eds = EarthDataStore()
Explore available collections
table = Table("Available collections")
for t in eds.explore():
table.add_row(t)
console.print(table)
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Available collections ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ ai-ready-mosaics │
│ ai-ready-mosaics-preview │
│ ai-ready-mosaics-sample │
│ alsat-1b-l2a-cog-edagro │
│ alsat-1b-l2a-cog-edagro-ag-cloud-mask │
│ building-changes-map │
│ cbers-4-l2a-cog-edagro │
│ cbers-4-l2a-cog-edagro-ag-cloud-mask │
│ cbers4-mux │
│ cbers4-mux-clip │
│ cbers4-mux-l1c │
│ cropland-data-layer-us │
│ deimos-1-l2a-cog-edagro │
│ deimos-1-l2a-cog-edagro-ag-cloud-mask │
│ deimos-l2a-cog-edagro │
│ deimos-l2a-cog-edagro-ag-cloud-mask │
│ deimos1-catalog │
│ deimos1-l1c │
│ dmc-l2a-cog-edagro │
│ dmc-l2a-cog-edagro-ag-cloud-mask │
│ dove-psb-sd-boa │
│ earthdaily-simulated-cloudless-l2a-cog-edagro │
│ earthdaily-simulated-l2a-cog-edagro │
│ earthdaily-simulated-l2a-cog-edagro-ag-cloud-mask │
│ ecmwf-mars │
│ ecmwf-open-data │
│ ecostress-eco-l2t-lste-002 │
│ eda-albedo-map │
│ eda-analysis-ready-mosaic │
│ eda-brightness-invariant │
│ eda-calibration-sites │
│ eda-cross-calibration │
│ eda-dem │
│ eda-geoid │
│ eda-landcover │
│ eda-reference-image │
│ eda-water-mask │
│ edagro-analytics-crop-mask-in-season │
│ edagro-analytics-crops-layer │
│ edagro-analytics-field-borders-layer │
│ edagro-analytics-field-boundaries │
│ edagro-landsat-cross-cal-coefficient │
│ edc-daily-acquisition-requests │
│ esa-worldcover-landcover-2020-v100 │
│ esa-worldcover-landcover-2021-v200 │
│ esa-worldcover-s1-vvvhratio-2020-v100 │
│ esa-worldcover-s1-vvvhratio-2021-v200 │
│ esa-worldcover-s2-nvdi-2020-v100 │
│ esa-worldcover-s2-nvdi-2021-v200 │
│ esa-worldcover-s2-rgbnir-2020-v100 │
│ esa-worldcover-s2-rgbnir-2021-v200 │
│ esa-worldcover-s2-swir-2020-v100 │
│ esa-worldcover-s2-swir-2021-v200 │
│ gaofen-1-l2a-cog-edagro │
│ gaofen-1-l2a-cog-edagro-ag-cloud-mask │
│ gaofen-6-l2a-cog-edagro │
│ gaofen-6-l2a-cog-edagro-ag-cloud-mask │
│ goes │
│ himawari-l1b │
│ himawari-l2-cloud │
│ huanjing-2-l2a-cog-edagro │
│ huanjing-2-l2a-cog-edagro-ag-cloud-mask │
│ jilin-1-cog-edagro │
│ jilin-1-cog-edagro-ag-cloud-mask │
│ kazstsat-l2a-cog-edagro │
│ kazstsat-l2a-cog-edagro-ag-cloud-mask │
│ landsat-c2l1 │
│ landsat-c2l1-data-coverage │
│ landsat-c2l2-sr │
│ landsat-c2l2-st │
│ landsat-l2-cog-ag-cloud-mask │
│ lulc-classification-map │
│ modis-43A4-061 │
│ modis-aqua-calibrated-radiance │
│ modis-calibrated-radiance │
│ modis-mod04-l2-061 │
│ modis-mod07-l2-061 │
│ modis-mod11-l2-061 │
│ modis-mod11a2-061 │
│ modis-mod21-l2-061 │
│ modis-mod21a2-061 │
│ modis-mod35-l2-061 │
│ modis-myd11-l2-061 │
│ modis-myd11a2-061 │
│ modis-myd21-l2-061 │
│ modis-myd21a2-061 │
│ modis-myd35-l2-061 │
│ mrc-catalog │
│ mrc-l1c │
│ msg-seviri │
│ msg-seviri-cloud-mask │
│ nst-observer-catalog │
│ nst-observer-l1c │
│ nst-observer-l2a │
│ palsar-catalog │
│ palsar-grd │
│ public-crop-mask │
│ resourcesat-2-l2a-cog-edagro │
│ resourcesat-2-l2a-cog-edagro-ag-cloud-mask │
│ sentinel-1-grd │
│ sentinel-1-rtc │
│ sentinel-2-c1-l2a │
│ sentinel-2-c1-l2a-data-coverage │
│ sentinel-2-eda-cloud-mask │
│ sentinel-2-eda-cloud-mask-data-coverage │
│ sentinel-2-l1c │
│ sentinel-2-l1c-data-coverage │
│ sentinel-2-l1c-ml-cloud-mask │
│ sentinel-2-l2a │
│ sentinel-2-l2a-cog-ag-cloud-mask │
│ sentinel-2-l2a-cog-ag-cloud-mask-geosys-private │
│ sentinel-2-l2a-data-coverage │
│ sentinel-2-methane-product │
│ simedc-ai-ready-data │
│ simedc-ai-ready-data-clip │
│ simedc-analysis-ready-data │
│ simedc-analysis-ready-data-clip │
│ simedc-quick-ortho │
│ simedc-quick-ortho-clip │
│ simedc-swir-catalog │
│ simedc-swir-catalog-data-coverage │
│ simedc-swir-l1c │
│ simedc-swir-l1c-clip │
│ simedc-swir-l2a │
│ simedc-swir-l2a-clip │
│ simedc-tir-catalog │
│ simedc-tir-l1c │
│ simedc-tir-l1c-clip │
│ simedc-visual-nrg │
│ simedc-visual-nrg-clip │
│ simedc-visual-rgb │
│ simedc-visual-rgb-clip │
│ simedc-vnir-catalog │
│ simedc-vnir-catalog-data-coverage │
│ simedc-vnir-l1c │
│ simedc-vnir-l1c-clip │
│ simedc-vnir-l2a │
│ simedc-vnir-l2a-clip │
│ typha-classification-map │
│ venus-l2a │
│ venus-l2a-clip │
│ viirs-vj121-002 │
│ viirs-vj121a1d-002 │
│ viirs-vj121a1n-002 │
│ viirs-vj121a2-002 │
│ viirs-vnp21-002 │
│ viirs-vnp21a1d-002 │
│ viirs-vnp21a1n-002 │
│ viirs-vnp21a2-002 │
│ worldview-cog-edagro │
│ worldview-cog-edagro-ag-cloud-mask │
│ zy-1-cog-edagro │
│ zy-1-cog-edagro-ag-cloud-mask │
└───────────────────────────────────────────────────┘
Explore a specific collection
collection = eds.explore("venus-l2a")
console.log(collection.properties)
[15:22:08] { summary_stack.py:36
'type': 'Collection',
'id': 'venus-l2a',
'stac_version': '1.0.0',
'description': 'venus-l2a',
'links': [
{
'rel': 'self',
'href':
'https://api.eds.earthdaily.com/archive/v1/stac/v
1/collections/venus-l2a',
'type': 'application/json'
},
{
'rel': 'parent',
'href':
'https://api.eds.earthdaily.com/archive/v1/stac/v
1',
'type': 'application/json'
},
{
'rel': 'items',
'href':
'https://api.eds.earthdaily.com/archive/v1/stac/v
1/collections/venus-l2a/items',
'type': 'application/geo+json'
},
{
'rel': 'root',
'href':
'https://api.eds.earthdaily.com/archive/v1/stac/v
1',
'type': 'application/json',
'title': 'Platform API (STAC
Compliant)'
}
],
'stac_extensions': [
'https://earthdaily-stac-extensions.s3.am
azonaws.com/eda_stats/v1.0.0/schema.json'
],
'item_assets': None,
'eda_stats:items': {
'count': 35771,
'count_by_year': {
'2017': 398,
'2018': 6134,
'2019': 9996,
'2020': 7207,
'2021': 0,
'2022': 3803,
'2023': 6376,
'2024': 1857
},
'count_by_year_month': {
'2017': {
'2017-01': 0,
'2017-02': 0,
'2017-03': 0,
'2017-04': 0,
'2017-05': 0,
'2017-06': 0,
'2017-07': 0,
'2017-08': 0,
'2017-09': 0,
'2017-10': 0,
'2017-11': 101,
'2017-12': 297
},
'2018': {
'2018-01': 193,
'2018-02': 564,
'2018-03': 318,
'2018-04': 610,
'2018-05': 451,
'2018-06': 502,
'2018-07': 646,
'2018-08': 757,
'2018-09': 267,
'2018-10': 503,
'2018-11': 617,
'2018-12': 706
},
'2019': {
'2019-01': 640,
'2019-02': 657,
'2019-03': 776,
'2019-04': 838,
'2019-05': 879,
'2019-06': 862,
'2019-07': 948,
'2019-08': 847,
'2019-09': 1060,
'2019-10': 935,
'2019-11': 767,
'2019-12': 787
},
'2020': {
'2020-01': 176,
'2020-02': 554,
'2020-03': 815,
'2020-04': 754,
'2020-05': 826,
'2020-06': 729,
'2020-07': 803,
'2020-08': 894,
'2020-09': 871,
'2020-10': 785,
'2020-11': 0,
'2020-12': 0
},
'2021': {
'2021-01': 0,
'2021-02': 0,
'2021-03': 0,
'2021-04': 0,
'2021-05': 0,
'2021-06': 0,
'2021-07': 0,
'2021-08': 0,
'2021-09': 0,
'2021-10': 0,
'2021-11': 0,
'2021-12': 0
},
'2022': {
'2022-01': 0,
'2022-02': 0,
'2022-03': 274,
'2022-04': 385,
'2022-05': 423,
'2022-06': 577,
'2022-07': 482,
'2022-08': 614,
'2022-09': 212,
'2022-10': 282,
'2022-11': 209,
'2022-12': 345
},
'2023': {
'2023-01': 423,
'2023-02': 571,
'2023-03': 682,
'2023-04': 616,
'2023-05': 322,
'2023-06': 459,
'2023-07': 527,
'2023-08': 716,
'2023-09': 644,
'2023-10': 660,
'2023-11': 467,
'2023-12': 289
},
'2024': {
'2024-01': 388,
'2024-02': 395,
'2024-03': 255,
'2024-04': 248,
'2024-05': 189,
'2024-06': 168,
'2024-07': 214,
'2024-08': 0,
'2024-09': 0,
'2024-10': 0,
'2024-11': 0,
'2024-12': 0
}
}
},
'title': 'Venµs L2A',
'extent': {
'spatial': {
'bbox': [
[
-155.37677,
-67.1161,
170.49466,
79.1044
]
]
},
'temporal': {
'interval': [
[
'2017-11-01T10:06:54Z',
'2024-07-18T05:58:23Z'
]
]
}
},
'license': 'CC BY-NC 4.0',
'providers': [
{
'name': 'Theia',
'roles': [
'licensor',
'producer',
'processor'
]
},
{
'name': 'EarthDaily Analytics',
'roles': ['processor', 'host'],
'url': 'https://earthdaily.com'
}
],
'summaries': {
'gsd': [4, 5],
'mission': ['venus'],
'eo:bands': [
{
'name': 'B1',
'common_name': 'coastal',
'description': 'B1',
'center_wavelength': 0.424
},
{
'name': 'B2',
'common_name': 'coastal',
'description': 'B2',
'center_wavelength': 0.447
},
{
'name': 'B3',
'common_name': 'blue',
'description': 'B3',
'center_wavelength': 0.492
},
{
'name': 'B4',
'common_name': 'green',
'description': 'B4',
'center_wavelength': 0.555
},
{
'name': 'B5',
'common_name': 'yellow',
'description': 'B5',
'center_wavelength': 0.62
},
{
'name': 'B6',
'common_name': 'yellow',
'description': 'B6',
'center_wavelength': 0.62
},
{
'name': 'B7',
'common_name': 'red',
'description': 'B7',
'center_wavelength': 0.666
},
{
'name': 'B8',
'common_name': 'rededge',
'description': 'B8',
'center_wavelength': 0.702
},
{
'name': 'B9',
'common_name': 'rededge',
'description': 'B9',
'center_wavelength': 0.741
},
{
'name': 'B10',
'common_name': 'rededge',
'description': 'B10',
'center_wavelength': 0.782
},
{
'name': 'B11',
'common_name': 'nir08',
'description': 'B11',
'center_wavelength': 0.861
},
{
'name': 'B12',
'common_name': 'nir09',
'description': 'B12',
'center_wavelength': 0.909
}
],
'platform': ['VENUS'],
'instruments': ['VENUS'],
'constellation': ['VENUS']
}
}
List properties available per item
table = Table("properties", "values", "dtype", title=f"Properties for {collection}")
for k, v in collection.item_properties.items(): # item_properties is a dict
table.add_row(k, str(v), type(v).__name__)
console.print(table)
Properties for Exploring collection "venus-l2a"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┓
┃ properties ┃ values ┃ dtype ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━┩
│ constellation │ VENUS │ str │
│ created │ 2024-07-27T00:07:31.240837Z │ str │
│ datetime │ 2024-07-18T05:58:23.000000Z │ str │
│ description │ │ str │
│ eda:geometry_tags │ ['RESOLVED_CLOCKWISE_POLYGON'] │ list │
│ eda:loose_validation_status │ VALID │ str │
│ eda:num_cols │ 10886 │ int │
│ eda:num_rows │ 9720 │ int │
│ eda:original_geometry │ {'type': 'Polygon', 'coordinates': │ dict │
│ │ [[[46.154724121094, -15.772232055664], │ │
│ │ [46.561134338379, -15.769696235657], │ │
│ │ [46.563858032227, -16.121057510376], │ │
│ │ [46.15673828125, -16.123653411865], │ │
│ │ [46.154724121094, -15.772232055664]]]} │ │
│ eda:product_type │ REFLECTANCE │ str │
│ eda:sensor_type │ OPTICAL │ str │
│ eda:source_created │ 2024-07-26T04:16:20.000000Z │ str │
│ eda:source_updated │ 2024-07-26T04:21:27.000000Z │ str │
│ eda:status │ PUBLISHED │ str │
│ eda:tracking_id │ LMgWQmvP4xDBKD7fwf7XHH │ str │
│ eda:unusable_cover │ 4.0 │ float │
│ eda:water_cover │ 0.0 │ float │
│ end_datetime │ 2024-07-18T05:58:23.000000Z │ str │
│ eo:bands │ [{'name': 'B1', 'common_name': │ list │
│ │ 'coastal', 'description': 'B1', │ │
│ │ 'center_wavelength': 0.424}, {'name': │ │
│ │ 'B2', 'common_name': 'coastal', │ │
│ │ 'description': 'B2', │ │
│ │ 'center_wavelength': 0.447}, {'name': │ │
│ │ 'B3', 'common_name': 'blue', │ │
│ │ 'description': 'B3', │ │
│ │ 'center_wavelength': 0.492}, {'name': │ │
│ │ 'B4', 'common_name': 'green', │ │
│ │ 'description': 'B4', │ │
│ │ 'center_wavelength': 0.555}, {'name': │ │
│ │ 'B5', 'common_name': 'yellow', │ │
│ │ 'description': 'B5', │ │
│ │ 'center_wavelength': 0.62}, {'name': │ │
│ │ 'B6', 'common_name': 'yellow', │ │
│ │ 'description': 'B6', │ │
│ │ 'center_wavelength': 0.62}, {'name': │ │
│ │ 'B7', 'common_name': 'red', │ │
│ │ 'description': 'B7', │ │
│ │ 'center_wavelength': 0.666}, {'name': │ │
│ │ 'B8', 'common_name': 'rededge', │ │
│ │ 'description': 'B8', │ │
│ │ 'center_wavelength': 0.702}, {'name': │ │
│ │ 'B9', 'common_name': 'rededge', │ │
│ │ 'description': 'B9', │ │
│ │ 'center_wavelength': 0.741}, {'name': │ │
│ │ 'B10', 'common_name': 'rededge', │ │
│ │ 'description': 'B10', │ │
│ │ 'center_wavelength': 0.782}, {'name': │ │
│ │ 'B11', 'common_name': 'nir08', │ │
│ │ 'description': 'B11', │ │
│ │ 'center_wavelength': 0.861}, {'name': │ │
│ │ 'B12', 'common_name': 'nir09', │ │
│ │ 'description': 'B12', │ │
│ │ 'center_wavelength': 0.909}] │ │
│ eo:cloud_cover │ 4.0 │ float │
│ gsd │ 4.0 │ float │
│ instruments │ ['VENUS'] │ list │
│ license │ CC-BY-NC-4.0 │ str │
│ mission │ venus │ str │
│ platform │ VENUS │ str │
│ processing:level │ L2A │ str │
│ proj:epsg │ 32738 │ int │
│ providers │ [{'name': 'Theia', 'roles': │ list │
│ │ ['licensor', 'producer', │ │
│ │ 'processor']}, {'url': │ │
│ │ 'https://earthdaily.com', 'name': │ │
│ │ 'EarthDaily Analytics', 'roles': │ │
│ │ ['processor', 'host']}] │ │
│ sat:absolute_orbit │ 37555 │ int │
│ start_datetime │ 2024-07-18T05:58:23.000000Z │ str │
│ theia:location │ BOMBETOK │ str │
│ theia:product_id │ VENUS-XS_20240718-055823-000_L2A_BOMB… │ str │
│ theia:product_version │ 3.1 │ str │
│ theia:publication_date │ 2024-07-26T04:09:15.991000Z │ str │
│ theia:sensor_mode │ XS │ str │
│ theia:source_uuid │ 1db9d36d-4ac9-5e90-a8a6-8d131543bcfc │ str │
│ title │ VENUS-XS_20240718-055823-000_L2A_BOMB… │ str │
│ updated │ 2024-07-27T00:42:35.622561Z │ str │
│ view:azimuth │ 98.409243 │ float │
│ view:incidence_angle │ 33.278014999999996 │ float │
│ view:sun_azimuth │ 52.0377014474 │ float │
│ view:sun_elevation │ 31.999223066299997 │ float │
└─────────────────────────────┴────────────────────────────────────────┴───────┘
Read assets and metadata
table = Table("assets", "common_name", "description", title=f"Assets for {collection}")
for asset in collection.assets():
table.add_row(
asset,
collection.assets(asset).get("eo:bands", [{}])[0].get("common_name"),
collection.assets(asset).get("eo:bands", [{}])[0].get("description"),
)
console.print(table)
Assets for Exploring collection "venus-l2a"
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ assets ┃ common_name ┃ description ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ atmospheric_biophysical_parameters │ │ │
│ detailed_cloud_mask │ │ │
│ edge_image │ │ │
│ image_file_FRE_B1 │ coastal │ B1 │
│ image_file_FRE_B10 │ rededge │ B10 │
│ image_file_FRE_B11 │ nir08 │ B11 │
│ image_file_FRE_B12 │ nir09 │ B12 │
│ image_file_FRE_B2 │ coastal │ B2 │
│ image_file_FRE_B3 │ blue │ B3 │
│ image_file_FRE_B4 │ green │ B4 │
│ image_file_FRE_B5 │ yellow │ B5 │
│ image_file_FRE_B6 │ yellow │ B6 │
│ image_file_FRE_B7 │ red │ B7 │
│ image_file_FRE_B8 │ rededge │ B8 │
│ image_file_FRE_B9 │ rededge │ B9 │
│ image_file_SRE_B1 │ coastal │ B1 │
│ image_file_SRE_B10 │ rededge │ B10 │
│ image_file_SRE_B11 │ nir08 │ B11 │
│ image_file_SRE_B12 │ nir09 │ B12 │
│ image_file_SRE_B2 │ coastal │ B2 │
│ image_file_SRE_B3 │ blue │ B3 │
│ image_file_SRE_B4 │ green │ B4 │
│ image_file_SRE_B5 │ yellow │ B5 │
│ image_file_SRE_B6 │ yellow │ B6 │
│ image_file_SRE_B7 │ red │ B7 │
│ image_file_SRE_B8 │ rededge │ B8 │
│ image_file_SRE_B9 │ rededge │ B9 │
│ interpolated_pixel_mask │ │ │
│ job_processing_data │ │ │
│ license │ │ │
│ mask │ │ │
│ pixel_mask │ │ │
│ quality_mask │ │ │
│ saturation_mask │ │ │
│ solar_data │ │ │
│ stac_json │ │ │
│ thumbnail │ │ │
│ useful_image │ │ │
│ useful_image_data │ │ │
│ viewing_data │ │ │
└────────────────────────────────────┴─────────────┴─────────────┘
Total running time of the script: (0 minutes 1.481 seconds)