-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modularize plotting APIs #27
base: main
Are you sure you want to change the base?
Conversation
self._data_array = super().download_data() | ||
|
||
def transform_data(self: TimeSeriesPlotInstance): | ||
df_down = self._data_array.rio.write_crs("EPSG:4326") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still have to change variable names here
x=self._data_array.coords["time"], | ||
markers="o", | ||
) | ||
fig.update_xaxes(title="Month") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a variable
_plot_type: PlotType = PlotType.time_series | ||
_data_array: DataArray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this is the right type. It becomes a dataframe in line 188
_data_array: DataArray | ||
|
||
def __init__( | ||
self: PlottingInterface, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to use named arguments here
case DatasetName.eac4: | ||
assert self.eac4_parameters is not None | ||
data = EAC4Instance( | ||
self.eac4_parameters.data_variable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense if we used named args here as well, in the EAC4Instance
class. I'd also suggest we make these class names more similar (e.g. EAC4Instance and GHGInstance?)
The development is not finished yet. I'm opening a PR already so that you can check how I'm doing it and give me any feedback in the comments 🙂