Skip to content

Conversation

@schlunma
Copy link
Contributor

@schlunma schlunma commented Apr 11, 2023

Description

This PR adds a diagnostic that provides a high-level interface to seaborn, a Python data visualization library based on matplotlib. This diagnostic is highly customizable (every seaborn plotting function is supported).

For this diagnostic, the input data is arranged into a single pandas.DataFrame, which is then used as input for the Seaborn function defined by the option seaborn_func.

In addition, this PR

  • adds a new category in the recipe doc for general-purpose diagnostics.
  • retires the deprecated seaborn.set() in favor of seaborn.set_theme() in all diagnostic that use it. seaborn.set is an alias of seaborn.set_theme, so this does not change any functionality.

Link to documentation: https://esmvaltool--3155.org.readthedocs.build/en/3155/recipes/recipe_seaborn.html

Example figure:

seaborn_relplot


Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.

New or updated recipe/diagnostic


To help with the number of pull requests:

@schlunma schlunma added this to the v2.9.0 milestone Apr 11, 2023
@schlunma schlunma self-assigned this Apr 11, 2023
Copy link
Contributor

@valeriupredoi valeriupredoi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

absolutely stunning plots! Isn't the seaborn diag better suited to sit in esmvaltool/diag_scripts/shared better than in the main diags dir - it's not effectively a scientific diagnostic AFAIU but rather, a way to process and display data

@schlunma
Copy link
Contributor Author

schlunma commented Jun 7, 2023

In my understanding, esmvaltool/diag_scripts/shared provides code that can be used within a diagnostic, but not as a diagnostic (i.e., called within a recipe). Since the seaborn diagnostic can be called from the recipe, I think it should not go there.

I will also add 1/2 more example plots (PDF) which can be produced with this diagnostic, so please do no merge just yet 😅

@valeriupredoi
Copy link
Contributor

Ok I guess this pne then falls in the validation recipes/diag category - a utility of sorts still. We should probably create a dedicated repo for these types. Please do add more plots, they look marvellous 🦄

@schlunma
Copy link
Contributor Author

Just added another example to the recipe and the doc:
seaborn_displot

This can be merged now from my side 🚀

Copy link
Contributor

@remi-kazeroni remi-kazeroni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work, @schlunma! All looks good to me, nicely documented and the recipe runs fine. Just a tiny typo to be fixed and I can press the merge button 👍

@remi-kazeroni remi-kazeroni merged commit 548074f into main Jun 14, 2023
@remi-kazeroni remi-kazeroni deleted the seaborn_diag branch June 14, 2023 10:23
ehogan added a commit that referenced this pull request Jun 26, 2023
…old_and_clone_task_rtw

* recipe_test_workflow_prototype: (199 commits)
  #3169: Upgrade the RTW to work with ESMValTool v2.8.0
  [Condalock] Update Linux condalock file (#3237)
  Modified links to the tutorial (#3236)
  Add ESMValCore release `v2.8.1` into the documentation (#3235)
  Generate climatology on the fly for AutoAssess soil moisture (#3197)
  New recipe and diagnostic for Arctic-midlatitude research (#3021)
  Fixed pandas diagnostics for pandas>=2.0.0 (#3209)
  Update obs4MIPs dataset to the current naming scheme in recipe_smpi.yml (#2991)
  Add variable long names to provenance record in monitoring diagnostics (#3222)
  Extension of NASA MERRA2 CMORizer (cl, cli, clivi, clw, clwvi) (#3167)
  Remove "fx_variable" from recipe_wenzel14jgr.yml (#3212)
  [Condalock] Update Linux condalock file (#3217)
  Add Seaborn diagnostic (#3155)
  Remove fx_variables from ipccwg1ar5ch9 recipes (#3215)
  Remove "fx_variable" from recipe_tebaldi21esd.yml (#3211)
  Update recipe_impact.yml to work with newer versions of `pandas` (#3220)
  Use ESMValCore v2.9.0 release candidates (#3219)
  [Github Actions ] Check if python minor version changed after Julia install in development installation test (#3213)
  New plot_type 1d_profile in monitor  (#3178)
  Add support for using a dask distributed scheduler (#3151)
  ...
@remi-kazeroni remi-kazeroni mentioned this pull request Jul 3, 2023
6 tasks
jvegreg pushed a commit that referenced this pull request Jan 14, 2024
Co-authored-by: Valeriu Predoi <[email protected]>
Co-authored-by: Rémi Kazeroni <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants