nwm_eval.create_plots#

Module for creating plots to visualize the metrics calculated for NWM evaluation.

Functions:
  • get_metric_long_name: Get long names for metrics based on the library used for calculating the metrics.

  • filter_by_lead_metric: Filter the metric DataFrame by lead times and metrics based on the configuration.

  • gather_all_metrics: Gather metrics from all datasets into a single DataFrame.

  • add_tag_to_filename: Add a tag to the filename if it exists in the config.

  • save_plot: Save the plot to a file with a name based on the metric, lead time, dataset, and other parameters.

  • group_df_by_location: Group DataFrame by location and return a tuple of DataFrames (in_list, out_list).

  • get_metric_dataframe: Get the metric DataFrame by gathering all metrics and then filtering by metric subset and lead times.

  • create_spatial_map: Create spatial maps for each dataset, metric, and lead time.

  • set_up_figure: Set up a matplotlib figure with dynamic sizing based on data.

  • add_shared_legend: Add a shared legend to the figure.

  • create_boxplot: Create boxplots for each metric in the configuration.

  • create_histogram: Create histograms for each metric in the configuration.

Functions

add_shared_legend

Add a shared legend to the figure.

add_tag_to_filename

Add a tag to the filename if it exists in the config.

barchart_all_metrics

Create a bar chart comparing datasets for each metric.

barchart_by_metric

Create a bar chart comparing datasets for each metric and lead time.

create_all_plots

Create all plots based on the configuration.

create_barchart

Create a bar chart comparing datasets for each metric and lead time.

create_boxplot

Create boxplots for each metric in the configuration.

create_histogram

Create histograms for each metric in the configuration.

create_metric_table

Create a metric table based on the configuration.

create_spatial_map

Create spatial maps for each dataset, metric, and lead time.

create_time_series

Create a time series plot for each dataset in the configuration.

filter_by_lead_metric

Filter the metric DataFrame by lead times and metrics.

gather_all_metrics

Gather metrics from all datasets into a single DataFrame.

get_metric_dataframe

Get the metric DataFrame by gathering all metrics and then filtering by metric subset and lead times.

get_metric_groups

Get metric groups for the configuration.

get_metric_long_name

Get long names for metrics.

get_time_series

Get forecast or observed time series data (and unit) from forecast or observed data file.

group_df_by_location

Group DataFrame by location and return a tuple of DataFrames (in_list, out_list).

plot_time_series

Plot time series of observed and forecasted streamflow for a single location.

save_plot

Save the plot to a file.

set_up_figure

Set up a matplotlib figure with dynamic sizing based on data.