pyValEIA.stats.tables
Functions to create tables of statistics.
Functions
|
Decision table summing hit/miss/corr-neg/false-pos states by satellite. |
|
Style decision table. |
|
Create table including the Liemohn Skill Scores 1-4. |
|
Style the LSS decision table. |
Module Contents
- pyValEIA.stats.tables.decision_table_sat(states, sats=None, sat_key='Sat', eia_type='eia', model_name='Model', const_name='Swarm')[source]
Decision table summing hit/miss/corr-neg/false-pos states by satellite.
- Parameters:
- statespd.DataFrame
DataFrame of model data including skill and local times built by multiday_states_report
- satslist-like or NoneType
List of satellites specified by states[sat_key] to include in table, if None all will be included (default=None)
- sat_keystr
Key in states to access the satellite separator (default=’Sat’)
- eia_typestr
EIA state, e.g. ‘eia’, ‘peak’, etc., that declairs what is considered a hit.
- model_namestr
Model name for decision table label (default=’Model’)
- const_namestr
Satellite constellation name (default=’Swarm’)
- Returns:
- table_framepd.DataFrame
DataFrame in table format separated by satellite and event state (state, non-state). Index using: table_frame.loc[(
f’{const_name} {satellite}’, eia_type), (model_name, eia_type)]
- pyValEIA.stats.tables.style_df_table(df_table, eia_type, sat_names=None)[source]
Style decision table.
- Parameters:
- df_tablepd.DataFrame
DataFrame created by decision_table_sat
- eia_typestr
string designating which eia type is being reported
- sat_nameslist-like or NoneType
List of satellite names in df_table or None to use Swarm defaults.
- Returns:
- styled_framepd.DataFrame
Styled DataFrame
- Raises:
- ValueError
For unknown constellation name
- pyValEIA.stats.tables.lss_table_sat(model1, model2, model1_name='Model1', model2_name='Model2', sats=None, sat_key='Sat', const_name='Swarm')[source]
Create table including the Liemohn Skill Scores 1-4.
- Parameters:
- model1pd.DataFrame
DataFrame of 1st model data including skill and local times built by multiday_states_report
- model2pd.DataFrame
DataFrame of 2nd model data including skill and local times built by multiday_states_report
- model1_namestr
String of name of model1 (default=’Model1’)
- model2_namestr
String of name for model2 (default=’Model2’)
- satslist of strings kwarg
swarm satellites ‘A’, ‘B’, and ‘C’ as default can specify just 1 or 2
- satslist-like or NoneType
List of satellites specified by states[sat_key] to include in table, if None all will be included (default=None)
- sat_keystr
Key in model1 and model2 used to access the satellite separator (default=’Sat’)
- const_namestr
Satellite constellation name (default=’Swarm’)
- Returns:
- lss_dfpd.DataFrame
DataFrame in table format separated by satellite and Liemohn skill score
See also
io.load.multiday_states_report
- pyValEIA.stats.tables.style_lss_table(lss_df, sat_names=None)[source]
Style the LSS decision table.
- Parameters:
- lss_dfpd.DataFrame
DataFrame created by lss_table_sat
- sat_nameslist-like or NoneType
List of satellite names in lss_df or None to use Swarm defaults.
- Returns:
- styled_tablepd.DataFrame
LSS table with dividers