Last active
March 31, 2025 01:47
-
-
Save robbibt/a08d3dcb55fd4b560502f09d0ef2d01c to your computer and use it in GitHub Desktop.
Check ODC dataset counts (e.g. "final", "nrt", "interim")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import datacube | |
dc = datacube.Datacube() | |
# Get table of dataset counts | |
product_dict = { | |
product: {maturity: dc.index.datasets.count(product=product, dataset_maturity=maturity) | |
for maturity in ["final", "nrt", "interim"]} | |
for product in ["ga_s2am_ard_3", "ga_s2bm_ard_3", "ga_s2cm_ard_3"] | |
} | |
pd.DataFrame.from_dict(product_dict).T | |
# Get exact datasets | |
id_list = list(dc.index.datasets.search_returning(["id"], product="ga_s2bm_ard_3", dataset_maturity="final")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From @jeremyh: