1

I have a general question about the dea-tools plotting module. I am wondering if functions such as rgb can be applied generally to xarray datasets or if one must follow the method for loading in data (e.g. dc.load()). It's just that I have an established xarray dataset and the rgb plotting function is all I need to visualise timeseries data but I am struggling to get it to work at the moment (without having explored the DEA tools code too extensively).

1 Answer 1

1

The DEA Tools Python package is designed to be used in conjunction with an Open Data Cube installation, and they have some functions that are specific to the environment they were written for.

That said, many of the tools work anywhere, including the rgb() plotting function.

And having said that, a lot of the functions were written before some of the newer tools existed, for example, odc-geo. You can do a lot of things, like plotting RGB with these generic tools.

For example:

import odc.geo.xr  # Required to add the `.odc` extensions to your Xarray

data = # Load an Xarray here

data.band.odc.explore()  # Show one band of data on an interactive map

data.odc.explore()  # Show the data as RGB on a map
1
  • 1
    I'd also recommend odc.geo for what you're trying to do - DEA Tools has some big dependencies so probably isn't the best choice if all you need is the RGB function. If you want to plot a non-interactive RGB plot with odc-geo, you can do something like this too: data.odc.to_rgba().plot.imshow() Feb 6 at 23:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.