Skip to content

Commit

Permalink
fix(doc)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasK committed Dec 15, 2023
1 parent 920cc56 commit 1cee45b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 8 additions & 3 deletions examples/common_band_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from earthdaily.earthdatastore.cube_utils import asset_mapper
from rich.table import Table
from rich.console import Console

console = Console(force_interactive=True)

##############################################################################
Expand All @@ -20,8 +21,12 @@
# to use the central wavelength (rededge70 is rededge1 of sentinel-2 for example).
#

for collection,assets in asset_mapper._asset_mapper_config.asset_mapper_collections.items():
table = Table("asset","EarthDaily Common band name",title=f"Earthdaily common names for {collection}")
for common_name, asset in assets[0].items():
for collection, assets in asset_mapper._asset_mapper_config.items():
table = Table(
"asset",
"EarthDaily Common band name",
title=f"Earthdaily common names for {collection}",
)
for common_name, asset in assets[0].items():
table.add_row(asset, common_name)
console.print(table)
6 changes: 6 additions & 0 deletions examples/multisensors_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
datacube["ndvi"].plot.imshow(
col="time", col_wrap=3, vmin=0, vmax=0.8, cmap="RdYlGn"
)
plt.show()

##############################################################################
# See the NDVI mean evolution
# -------------------------------------------

datacube["ndvi"].groupby("time").mean(...).plot.line(x="time")
plt.title("NDVI evolution")
plt.show()

0 comments on commit 1cee45b

Please sign in to comment.