Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

elisaliv
Copy link
Collaborator

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 🙂

@elisaliv elisaliv requested a review from luigibrancati July 28, 2023 23:02
self._data_array = super().download_data()

def transform_data(self: TimeSeriesPlotInstance):
df_down = self._data_array.rio.write_crs("EPSG:4326")
Copy link
Collaborator Author

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")
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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,
Copy link
Collaborator Author

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,
Copy link
Collaborator Author

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?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant