frflib.plots.utils
Module Contents
Functions
|
|
|
function that generates the data for the bar plot - multi realisation runs per forecaster |
|
get result summary by fluid and by run - to be used in front multi real foreacst page |
|
generate the result distribution |
|
generate a dataframe for a tornado chart with min and max values for parameters |
|
Select the top group for a category - all the remaining group will be casted to 'other' |
|
based on a list generate a color dictionary |
|
function allows to create a dict map of color / group |
|
Lightens the given color by multiplying (1-luminosity) by the given amount. |
|
allows to create a map category color - derived from an existing one |
- frflib.plots.utils.plot_get_timeserie_sum(field_data: frflib.data_class.input_data.InputData, wf_list=None, col_list=None, well_list=None)
- Parameters:
field_data –
wf_list –
col_list –
well_list –
- Returns:
- frflib.plots.utils.get_count_per_method_multi(dict_multi_summary, well_list=None)
function that generates the data for the bar plot - multi realisation runs per forecaster
- Parameters:
dict_multi_summary – attribute of multi real
well_list – well list - default None
- Returns:
- frflib.plots.utils.get_result_summary_by_run(dict_multi_summary, well_list=None)
get result summary by fluid and by run - to be used in front multi real foreacst page
- Parameters:
dict_multi_summary –
well_list –
- Returns:
- frflib.plots.utils.get_result_distribution(dict_multi_summary, well_list=None)
generate the result distribution
- Parameters:
dict_multi_summary –
well_list –
- Returns:
- frflib.plots.utils.prepare_tornado(dict_multi_summary, df_runs, well_list=None, run_names=None)
generate a dataframe for a tornado chart with min and max values for parameters
- Parameters:
dict_multi_summary –
- Returns:
dataframe tornado
- frflib.plots.utils.get_main_group(df, groupby, min_elements=0, select_top=5)
Select the top group for a category - all the remaining group will be casted to ‘other’
- Parameters:
df –
groupby –
min_elements –
select_top –
- Returns:
- frflib.plots.utils.map_list_to_color(group_list, color_scale='tab10')
based on a list generate a color dictionary
- Parameters:
group_list –
color_scale –
- Returns:
- frflib.plots.utils.get_group_colors(df, groupby, min_elements=0, select_top=None, color_scale='tab10')
function allows to create a dict map of color / group it allows to keep the same colors while plotting different graphs
- Parameters:
df – dataframe
groupby – groupby value -> to be used
min_elements – min elements for the group to be considered (otherwise => other)
select_top – select only top groups (otherwise =other)
color_scale – color scale (matplotlib names)
- Returns:
dict category / color
- frflib.plots.utils.lighten_color(color, amount=0.5)
Lightens the given color by multiplying (1-luminosity) by the given amount. Input can be matplotlib color string, hex string, or RGB tuple.
Examples: >> lighten_color(‘g’, 0.3) >> lighten_color(‘#F034A3’, 0.6) >> lighten_color((.3,.55,.1), 0.5)
- frflib.plots.utils.get_group_colors_from_map(input_map_color, cat_list)
allows to create a map category color - derived from an existing one example using a color per field to create a map field_year the category needs to be separated by ‘_’ and the name needs to be similar to the name used in the static data
- Parameters:
input_map_color –
cat_list –
- Returns: