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 a shared legend to the figure. |
|
Add a tag to the filename if it exists in the config. |
|
Create a bar chart comparing datasets for each metric. |
|
Create a bar chart comparing datasets for each metric and lead time. |
|
Create all plots based on the configuration. |
|
Create a bar chart comparing datasets for each metric and lead time. |
|
Create boxplots for each metric in the configuration. |
|
Create histograms for each metric in the configuration. |
|
Create a metric table based on the configuration. |
|
Create spatial maps for each dataset, metric, and lead time. |
|
Create a time series plot for each dataset in the configuration. |
|
Filter the metric DataFrame by lead times and metrics. |
|
Gather metrics from all datasets into a single DataFrame. |
|
Get the metric DataFrame by gathering all metrics and then filtering by metric subset and lead times. |
|
Get metric groups for the configuration. |
|
Get long names for metrics. |
|
Get forecast or observed time series data (and unit) from forecast or observed data file. |
|
Group DataFrame by location and return a tuple of DataFrames (in_list, out_list). |
|
Plot time series of observed and forecasted streamflow for a single location. |
|
Save the plot to a file. |
|
Set up a matplotlib figure with dynamic sizing based on data. |