reV.qa_qc.qa_qc.QaQc
- class QaQc(out_dir)[source]
Bases:
object
reV QA/QC
- Parameters:
out_dir (str) – Directory path to save summary data and plots too
Methods
create_scatter_plots
([plot_type, cmap])Create scatter plot for all compatible summary .csv files
exclusions_mask
(excl_h5, out_dir[, ...])Create inclusion mask from given layers dictionary, dump to disk and plot
h5
(h5_file, out_dir[, dsets, group, ...])Run QA/QC by computing summary stats from dsets in h5_file and plotting scatters plots of compatible summary stats
supply_curve
(sc_table, out_dir[, columns, ...])Plot supply curve
Attributes
Output directory
- property out_dir
Output directory
- Returns:
str
- create_scatter_plots(plot_type='plotly', cmap='viridis', **kwargs)[source]
Create scatter plot for all compatible summary .csv files
- Parameters:
plot_type (str, optional) – plot_type of plot to create ‘plot’ or ‘plotly’, by default ‘plotly’
cmap (str, optional) – Colormap name, by default ‘viridis’
kwargs (dict) – Additional plotting kwargs
- classmethod h5(h5_file, out_dir, dsets=None, group=None, process_size=None, max_workers=None, plot_type='plotly', cmap='viridis', **kwargs)[source]
Run QA/QC by computing summary stats from dsets in h5_file and plotting scatters plots of compatible summary stats
- Parameters:
h5_file (str) – Path to .h5 file to run QA/QC on
out_dir (str) – Directory path to save summary tables and plots too
dsets (str | list, optional) – Datasets to summarize, by default None
group (str, optional) – Group within h5_file to summarize datasets for, by default None
process_size (int, optional) – Number of sites to process at a time, by default None
max_workers (int, optional) – Number of workers to use when summarizing 2D datasets, by default None
plot_type (str, optional) – plot_type of plot to create ‘plot’ or ‘plotly’, by default ‘plotly’
cmap (str, optional) – Colormap name, by default ‘viridis’
kwargs (dict) – Additional plotting kwargs
- classmethod supply_curve(sc_table, out_dir, columns=None, lcoe=SupplyCurveField.MEAN_LCOE, plot_type='plotly', cmap='viridis', sc_plot_kwargs=None, scatter_plot_kwargs=None)[source]
Plot supply curve
- Parameters:
sc_table (str) – Path to .csv file containing supply curve table
out_dir (str) – Directory path to save summary tables and plots too
columns (str | list, optional) – Column(s) to summarize, if None summarize all numeric columns, by default None
lcoe (str, optional) – LCOE value to plot, by default
SupplyCurveField.MEAN_LCOE
plot_type (str, optional) – plot_type of plot to create ‘plot’ or ‘plotly’, by default ‘plotly’
cmap (str, optional) – Colormap name, by default ‘viridis’
sc_plot_kwargs (dict, optional) – Kwargs for supply curve plot, by default None
scatter_plot_kwargs (dict) – Kwargs for scatter plot, by default None
- classmethod exclusions_mask(excl_h5, out_dir, layers_dict=None, min_area=None, kernel='queen', hsds=False, plot_type='plotly', cmap='viridis', plot_step=100, **kwargs)[source]
Create inclusion mask from given layers dictionary, dump to disk and plot
- Parameters:
excl_h5 (str) – Path to exclusions .h5 file
layers_dict (dict | NoneType) – Dictionary of LayerMask arugments {layer: {kwarg: value}}
min_area (float | NoneType) – Minimum required contiguous area in sq-km
kernel (str) – Contiguous filter method to use on final exclusions
hsds (bool) – Boolean flag to use h5pyd to handle .h5 ‘files’ hosted on AWS behind HSDS
plot_type (str, optional) – plot_type of plot to create ‘plot’ or ‘plotly’, by default ‘plotly’
cmap (str, optional) – Colormap name, by default ‘viridis’
plot_step (int) – Step between points to plot
kwargs (dict) – Additional plotting kwargs